-
-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to set a project specific board-name #80
Comments
Also if I change the board-name or -fqbn manually, completion seems to stop working. I have tested this with the ESP32 boards, as soon as I change the I'm on vim, using the coc.nvim pluging. My configuration for the server was; "arduino": {
"command": "~/.local/bin/arduino-language-server",
"rootPatterns": [
"*.ino"
],
"filetypes": [
"arduino"
],
"args": [
"-cli",
"arduino-cli",
"-cli-config",
"~/.arduino15/arduino-cli.yaml",
"-clangd",
"clangd",
"-board-name",
"ESP32 Dev Module",
"-fqbn",
"esp32:esp32:esp32"
]
} |
I'm in the same situation, though I'm not using coc but nvim native lsp implementation. |
The same problem |
Running
I'm using nvim-lsp and I've installed the lsp via LspInstaller, don't know if that makes a difference. |
I'm using Neovim LSP and have installed arduino-language-server using Taken from the project ./arduino-language-server \
-clangd /usr/local/bin/clangd \
-cli /usr/local/bin/arduino-cli \
-cli-config $HOME/.arduino15/arduino-cli.yaml |
👋 We dropped support for sketch.json in favor of sketch.yaml. For the one using require'lspconfig'.arduino_language_server.setup{
on_new_config = function(config, root_dir)
local file = io.open(root_dir .. '/sketch.yaml', "r")
if file == nil then
return
end
local fqbn = "arduino:avr:uno"
local lines = file:lines()
for line in lines do
if string.find(line, "fqbn") then
fqbn = string.gsub(line, "%s+fqbn:%s", "")
end
end
file:close()
config.cmd = {
"arduino-language-server",
"-fqbn", fqbn,
}
end,
cmd = {
"arduino-language-server",
"-fqbn", "arduino:avr:uno",
}
} sketch.yaml
profiles:
portenta_c33:
fqbn: arduino:renesas_portenta:portenta_c33
platforms:
- platform: arduino:renesas_portenta (1.0.2) |
Looking at the
--help
command of the LS, it tells that we can change the-board-name
variable using or the-fqbn
variable using JSON-RPC. I'm not sure how to do this.It would be extremely helpful if any maintainer/contributor could provide an example.
The text was updated successfully, but these errors were encountered: