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
|
||||
|
||||
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 = {} },
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue