Open kittaakos opened 1 year ago
In my case, the solution for Astronvim was:
config.capabilities.textDocument.semanticTokens = vim.NIL
config.capabilities.workspace.semanticTokens = vim.NIL
arduino_language_server = { -- https://github.com/williamboman/nvim-lsp-installer/tree/main/lua/nvim-lsp-installer/servers/arduino_language_server | https://discord.com/channels/939594913560031363/1078005571451621546/threads/1122910773270818887
on_new_config = function (config, root_dir)
local my_arduino_fqbn = { -- arduino-cli core install arduino:...
["/home/xou/Desktop/xou/programming/hardware/arduino/nano"] = "arduino:avr:nano", -- arduino-cli board listall
["/home/xou/Desktop/xou/programming/hardware/arduino/uno" ] = "arduino:avr:uno" ,
}
local DEFAULT_FQBN = "arduino:avr:uno"
local fqbn = my_arduino_fqbn[root_dir]
if not fqbn then
-- vim.notify(("Could not find which FQBN to use in %q. Defaulting to %q."):format(root_dir, DEFAULT_FQBN))
fqbn = DEFAULT_FQBN
end
config.capabilities.textDocument.semanticTokens = vim.NIL
config.capabilities.workspace.semanticTokens = vim.NIL
config.cmd = { -- https://forum.arduino.cc/t/solved-errors-with-clangd-startup-for-arduino-language-server-in-nvim/1019977
"arduino-language-server",
"-cli-config" , "~/arduino15/arduino-cli.yaml", -- just in case it was /home/xou/.arduino15/arduino-cli.yaml
"-cli" , "/usr/bin/arduino-cli", -- 2023-06-26 ERROR | "Runs" if I set a wrong path
"-clangd" , "/usr/bin/clangd",
"-fqbn" , fqbn
}
end
},
Describe the problem
I am playing with the LS to support multiple running language servers per workspace.
I see the following error:
To reproduce
Install the VS Code extension from my fork: https://github.com/kittaakos/vscode-arduino-tools/tree/multi-ls-support/build-artifacts
Expected behavior
It does not throw.
Arduino Language Server version
0.7.1
Arduino CLI version
0.25.0
Operating system
macOS
Operating system version
12.3.1
Additional context
No response
Issue checklist