nvim: Move arduino LSP config into lsp dir

Also ensure that clangd and arduino-cli are installed since the lsp
otherwise won't work.
This commit is contained in:
Marty Oehme 2025-06-10 15:28:30 +02:00
parent 07e820ac00
commit bb6f401ff3
Signed by: Marty
GPG key ID: 4E535BC19C61886E
3 changed files with 7 additions and 6 deletions

View file

@ -0,0 +1,3 @@
return {
on_new_config = require("arduino").on_new_config,
}

View file

@ -26,7 +26,7 @@ local function mason_dir()
end
local languages = {
arduino = { lsp = { arduino_language_server = {} }, ts = { "arduino" } },
arduino = { lsp = { clangd = {}, arduino_language_server = { disable = true } }, ts = { "arduino" } },
awk = { ts = { "awk" }, format = { awk = { "gawk" } } },
astro = {
lsp = { astro = {} },

View file

@ -137,11 +137,9 @@ local lsp = {
end,
})
-- set up arduino with the help of arduino.nvim plugin
if require("core.util").is_available("arduino") then
register("arduino_language_server", {
on_new_config = require("arduino").on_new_config,
})
-- arduino lsp only works if arduino-cli is installed
if vim.fn.executable("arduino-cli") == 1 then
register("arduino_language_server")
end
if vim.lsp.is_enabled("vue_ls") then