The Angular language server in nvim crashes after each automatic rebuild/reload of nx serve. It crashes with Program does not contain "<PROJECT_PATH>/apps/org/src/app/app.component.ngtypecheck.ts"

I can reproduce this in a clean nx repository setup using npx create-nx-workspace@latest. I've selected angular and integrated monorepo in the setup dialog.

Then I start the dev-server using nx serve projectname.

When I edit any *.component.html file and save it, I get this message most of the times: notify.warn Client angularls quit with exit code 1 and signal 0. Check log for errors: C:\Users\lut\AppData\Local\nvim-data/lsp.log

Inside lsp.log, there's this error message: Program does not contain "c:/Users/myuser/IdeaProjects/projects/test/org/apps/org/src/app/app.component.ngtypecheck.ts"


  • Windows (!!) 10 22H2
  • Neovim v0.10.0
  • LazyVim V12.19.1 with the angular extra enabled
  • @angular/[email protected]
  • Angular 18.0.5
  • NX v19.3.1
  • mason.nvim at 0950b15
  • mason-lspconfig.nvim at 37a336b
  • nvim-lspconfig at 9c9eb07

I aso configured lspconfig to use root_dir as per this question

return {
angularls = {
  root_dir = require("lspconfig.util").root_pattern(".git"),

I've also filed an issue at the angular LSP repo, but it was considered out of scope, because the issue is not reproducible in VS Code, only in nvim.

  • Any hint on where to file the issue would also be helpful, if there is no direct answer on how to fix it. Also would be greatful to know if anyone else can reproduce it.
    – Thomas
    Commented Jun 24 at 16:26
  • This place is not an issue tracker.
    – romainl
    Commented Jun 24 at 16:58
  • @romainl I came here from github.com/neovim/neovim/issues/… Where it says: "Why isn't X language server/feature working?" belong on stackoverflow
    – Thomas
    Commented Jun 24 at 17:17
  • 1
    See also How to debug my vimrc for advice on trimming the Vim side into a minimal example.
    – D. Ben Knoble
    Commented Jun 24 at 18:04


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.