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

Missing `-version` flag

Open danialnia02 opened this issue 4 months ago • 0 comments

Describe the problem

I am trying to set up my LSP using lsp-config, I downloaded the LSP via mason. On opening up a arduino file, running the LspInfo command, it shows this error

  version:           `Usage of C:\Users\dania\AppData\Local\nvim-data\mason\packages\arduino-language…` (Failed to get version) Tried:
  `C:\Users\dania\AppData\Local\nvim-data\mason\bin\arduino-language-server.CMD --version`
  `C:\Users\dania\AppData\Local\nvim-data\mason\bin\arduino-language-server.CMD -v`
  `C:\Users\dania\AppData\Local\nvim-data\mason\bin\arduino-language-server.CMD version`
  `C:\Users\dania\AppData\Local\nvim-data\mason\bin\arduino-language-server.CMD --help`
  `C:\Users\dania\AppData\Local\nvim-data\mason\bin\arduino-language-server.CMD -h`

While running any of the commands locally on my system, it says that the -version flag is not defined.

I tried running -version against any other LSP that I have such as clangd, marksman and python-lsp-server and all of them returns a version.

I think this is the reason I cant get the Arduino LSP to work.

Is there anyway to suppress it to get or the LSP to show a version?

To reproduce

this is my lsp config.

lspconfig.arduino_language_server.setup {
  cmd = {
    "arduino-language-server",
    "-cli-config", "C:/Users/dania/.arduinoIDE/arduino-cli.yaml",
    "-fqbn", TinyCircuits:samd:tinyscreen",
    "-cli", C:/Users/dania/AppData/Local/arduino-cli_1.0.4/arduino-cli",
    "-clangd", clangd",
  },
}

Expected behavior

I expect the LSP to work as per normal.

Arduino Language Server version

0.7.6

Arduino CLI version

1.0.4

Operating system

Windows

Operating system version

Windows 11

Additional context

No response

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

danialnia02 avatar Oct 23 '24 09:10 danialnia02