arduino-language-server
arduino-language-server copied to clipboard
Arduino LS "rpc.lua" problem with neovim
Describe the problem
I'm trying to get the Arduino LS integrated into neovim but I'm out of answers. I'm using Mason to manage the servers, and tried to fix the version as and patched with go as described in #182. When opening a .ino file, LspInfos tells me that 0 clients are attached, and I don't get any features of the LS.
The output of LspLog is the following:
[ERROR][2024-06-04 10:04:33] .../vim/lsp/rpc.lua:770 "rpc" ".../nvim/mason/bin/arduino-language-server" "stderr"
The content of my arduino-lsp config:
local MY_FQBN = "arduino:avr:mega"
require("lspconfig").arduino_language_server.setup({
lspconfig.arduino_language_server.setup({
cmd = {
"arduino-language-server",
"-clangd",
"/usr/bin/clangd", -- I have also tried Mason's clangd, no use either.
"-cli-config",
"/home/max/arduino15/arduino-cli.yaml",
"-cli",
"/usr/bin/arduino-cli",
"-fqbn",
MY_FQBN,
},
on_attach = on_attach,
capabilities = capabilities,
}),
})
I'm not sure if this issue is related to #155 and I hope I wrote all the details needed. Sorry in advance if this is a duplicate!
To reproduce
- Installed the LS via Mason in nvim and fixed the version
- Downloaded the ls via go as described in #182 with patching the version.
- Installed the arduino-cli via pacman
- Installed the cores for the atmega2560 I'm using and setup via arduino-cli
- Wrote and added the arduino-lspconfig
Expected behavior
Integration of the LS in nvim with the expected features like diagnostics and completion
Arduino Language Server version
0.7.6
Arduino CLI version
0.35.3
Operating system
Linux
Operating system version
Arch Linux
Additional context
Additional reports
- https://github.com/arduino/arduino-language-server/issues/186#issuecomment-2379422459
- https://github.com/arduino/arduino-language-server/issues/186#issuecomment-2385541856
- https://github.com/arduino/arduino-language-server/issues/186#issuecomment-2440219680
Issue checklist
- [X] I searched for previous reports in the issue tracker
- [X] I verified the problem still occurs when using the latest version
- [X] My report contains all necessary details