Page 1 of 1

NVIM nvim-lspconfig arduino-cli arduino-language-server

Posted: Tue May 14, 2024 1:02 pm
by BennehBoy
Any adventurous types out there using NVIM as their 'IDE'?

I've recently switched wholesale to linux (Arch) from Windows, and am finding nvim to increasingly be my preferred direction.

I've can easily invoke a shell from within nvim (I'm also using tmux) and compile or upload directly to my boards - this just needs a sketch.yaml within each project to direct arduino-cli as to which board is being used, and what board options are required.

For example I use the following for my bluepill based projects when I also want CDC serial

Code: Select all

default_fqbn: STMicroelectronics:stm32:GenF1:pnum=BLUEPILL_F103CB,usb=CDCgen,xserial=generic,xserial=generic
What I'm not managing to get working so far are hints from the lsp, I just get 'Client quit with the exit code 2 and signal 0'. I'll keep digging at this as I'd really like to solve the issue.

Re: NVIM nvim-lspconfig arduino-cli arduino-language-server

Posted: Thu Jun 13, 2024 2:27 pm
by BennehBoy
I found out why the LSP wouldn't work - neovim 0.10.x has a breaking change. Reverting back to 0.9.5 works but the LSP capabilities must be configured to disable semanticTokens:

config.capabilities.textDocument.semanticTokens = vim.NIL
config.capabilities.workspace.semanticTokens = vim.NIL

Happy neovim'ing :lol: