-
-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nvim-lspconfig + arduino-language-server doesn't attach to buffer #187
Comments
This is in the last lines of
It appears to be the same as the output of the |
Does this mean that I need to spin up a arduino cli daemon myself, or is the ls going to do it? |
I encountered a similar issue, which seems to align with the one described in #186. I resolved it by downgrading to Neovim version v0.9.5. It appears that there are breaking changes in the newer versions of Neovim that prevent the LSP client from connecting properly. |
Right. Thank you! |
I found the problem. It is in the https://github.com/bugst/go-lsp package, which arduino LSP depends on. nvim 0.10 passes some new capabilities to the LSP, such as So the solution here will be to add new capabilities to the library mentioned above. The problem is, unfortunately, not fixable from this repo, because the initial request handling and parsing is done in the LSP lib. |
what are the missing capabilities? I would like to know, because then I could try setting them to false in the lsp configuration: -- [...]
local arduino_capabilities = vim.lsp.protocol.make_client_capabilities()
-- now here set some capabilities to false:
arduino_capabilities.unsupportedCapability = false
-- then use arduino_capabilities as the capabilities value for the lspconfig entry
-- [...] |
I tried setting them to false, but it didn't work. I tried to look at the neovim code and I think there is no way to say not to pass inlay hint field to the language server. So even if you set it to false, it will be sent and the language server will crash, because it doesn't expect to see such a field in the json. But anyway, I found out that you can just use
So I personally don't need an |
This fixed it for me: Change this: to this: at the end of the file jsonrpc_protocol.go in the go-lsp library that this lsp depends on. |
Describe the problem
I'm using NvChad. My arduino ls doesn't crash, but doesn't attach to the buffer either.
To reproduce
exerpt of my config:
Expected behavior
Attach to the buffer with the .ino file
Arduino Language Server version
0.7.6
Arduino CLI version
arduino-cli Version: 0.35.3 Commit: 95cfd654 Date: 2024-02-19T13:15:51Z
Operating system
macOS
Operating system version
14.5
Additional context
Issue checklist
The text was updated successfully, but these errors were encountered: