arduino-language-server icon indicating copy to clipboard operation
arduino-language-server copied to clipboard

Arduino LS "rpc.lua" problem with neovim

Open Ma94xx opened this issue 8 months ago • 4 comments

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

  1. Installed the LS via Mason in nvim and fixed the version
  2. Downloaded the ls via go as described in #182 with patching the version.
  3. Installed the arduino-cli via pacman
  4. Installed the cores for the atmega2560 I'm using and setup via arduino-cli
  5. 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

Ma94xx avatar Jun 04 '24 08:06 Ma94xx