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:
parent
07e820ac00
commit
bb6f401ff3
3 changed files with 7 additions and 6 deletions
3
nvim/.config/nvim/after/lsp/arduino.lua
Normal file
3
nvim/.config/nvim/after/lsp/arduino.lua
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
return {
|
||||||
|
on_new_config = require("arduino").on_new_config,
|
||||||
|
}
|
||||||
|
|
@ -26,7 +26,7 @@ local function mason_dir()
|
||||||
end
|
end
|
||||||
|
|
||||||
local languages = {
|
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" } } },
|
awk = { ts = { "awk" }, format = { awk = { "gawk" } } },
|
||||||
astro = {
|
astro = {
|
||||||
lsp = { astro = {} },
|
lsp = { astro = {} },
|
||||||
|
|
|
||||||
|
|
@ -137,11 +137,9 @@ local lsp = {
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
-- set up arduino with the help of arduino.nvim plugin
|
-- arduino lsp only works if arduino-cli is installed
|
||||||
if require("core.util").is_available("arduino") then
|
if vim.fn.executable("arduino-cli") == 1 then
|
||||||
register("arduino_language_server", {
|
register("arduino_language_server")
|
||||||
on_new_config = require("arduino").on_new_config,
|
|
||||||
})
|
|
||||||
end
|
end
|
||||||
|
|
||||||
if vim.lsp.is_enabled("vue_ls") then
|
if vim.lsp.is_enabled("vue_ls") then
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue