Skip to content

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

Closed
@Ma94xx

Description

@Ma94xx

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: imperfectionPerceived defect in any part of project

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions