IDE support when working on GHC
Here are some notes for how I configure Neovim, haskell-language-server, and clangd for an IDE-like experience when working on GHC:
start using this an up-to-date ghc.nix
start a
ghc.nixshell:nix-shell ../ghc.nix --arg withIde trueconfigure
nvim-lspconfig’s HLS support to correctly identify the root directory of a GHC source tree:configure
nvim-lspconfiguseclangd:create a
compile_flags.txtforclangd(ideally this would be upstreamed as a.clangdfile but this mechanism doesn’t appear to work):-xc -Iincludes -Irts -I.hie-bios/stage0/libRun
haskell-language-server-wrapper compiler/GHC.hsto ensure that things work (and generate various things in.hie-bios)Enjoy