Skip to content
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

Arduino LS "rpc.lua" problem with neovim #186

Open
3 tasks done
Ma94xx opened this issue Jun 4, 2024 · 4 comments · May be fixed by #199
Open
3 tasks done

Arduino LS "rpc.lua" problem with neovim #186

Ma94xx opened this issue Jun 4, 2024 · 4 comments · May be fixed by #199
Labels
type: imperfection Perceived defect in any part of project

Comments

@Ma94xx
Copy link

Ma94xx commented Jun 4, 2024

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 Fix error when attempting to determine Arduino data path from CLI output -- Needs review, not backwards compatible #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

Issue checklist

  • I searched for previous reports in the issue tracker
  • I verified the problem still occurs when using the latest version
  • My report contains all necessary details
@Ma94xx Ma94xx added the type: imperfection Perceived defect in any part of project label Jun 4, 2024
@BennehBoy
Copy link

BennehBoy commented Jun 12, 2024

The workaround is to downgrade neovim to 0.9.5, looks like 0.10.x has a breaking change for this LSP.

You'll need to disable symanticTokens in the capabilities too.

@vlappa

This comment has been minimized.

@SeanMcGoff

This comment has been minimized.

@nicolasauler
Copy link

Hey, have we had any developments on this?
Kind of a bummer that the LSP is no longer compatible with current versions of Neovim...

@speelbarrow speelbarrow linked a pull request Nov 3, 2024 that will close this issue
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: imperfection Perceived defect in any part of project
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants