It seems like I am to stupid to setup the arduino_language_server properly. #781
-
It doesn't attach to the buffer, yet in LspInfo it lists it as compatible. Notify gives me the following message
My setup was installing the lsp with LspInstall. it didn't attach. then I tried to set some of the config as it was written in the docs: local lspconfig = require "lspconfig"
lspconfig.arduino_language_server.setup {
cmd = {
-- Required
"arduino-language-server",
"-cli-config",
"~/.arduino15/arduino-cli.yaml",
-- Optional
-- "-cli",
-- "/usr/bin/arduino-cli",
-- "-clangd",
-- "/usr/bin/clangd",
"-fqbn",
"arduino:avr:uno",
},
-- root_dir = lspconfig.util.find_git_ancestor,
root_dir = function(fname)
-- P(vim.fn.expand "%:p:h")
-- return vim.fn.expand "%:p:h"
local root_files = { vim.fn.expand "%" }
P(fname)
P(root_files)
local primary = lspconfig.util.root_pattern(unpack(root_files))(fname)
P(primary)
return primary
end,
filetypes = { "arduino", "ino" },
} I tried all sorts of combinations, yet nothing worked. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
Hello! Have you set up nvim-lsp-installer ( |
Beta Was this translation helpful? Give feedback.
Hello! Have you set up nvim-lsp-installer (
require("nvim-lsp-installer").setup {}
)?