Hi, I’ve been trying to set up the LSP with treesitter and I’m having a laundry list of issues. Hoping someone can help:
The Rust LSP doesn’t start automatically; however, if I run LspStart Rust followed by LspInfo, I can see that rust_analyzer has autostart set to true.
The zig LSP won’t start at all. Running LspStart zig does nothing, and running LspInfo shows that no filetype is detected while editing a .zig file.
TreeSitter doesn’t seem to work at all. Running TSInstallInfo shows that modules are installed for every language, but running TSStart zig on a .zig file does nothing.
I decided not to use the minimal config since I knew lspconfig was working, and because it would cause lsp_installer to load LSPs twice.
However, I visited the github for the zls, and it turns out that it depends on zig.vim. After I install that, opening a .zig file always gives me an error:
Spawning language server with cmd: `zls` failed. The language server is e
ither not installed, missing from PATH, or not executable.
Then I press enter and ZLS works perfectly. Running :LspInfo says that the client zls is running and with cmd: zls. I think this has something to do with the order the dependency is loaded, but I’m not sure how to fix this.
edit: I’m pretty sure that’s the issue. Starting nvim and then calling :e a.zig results in no error
edit2: Sorry, I was just being stupid. For anyone coming from the future, the solution is just to install zig.vim.