Open
Description
Requiring a -fqbn
option on the command line makes it difficult to set project-specific board names, and the current workaround calls for hardcoded FQBN for each individual project, which is inconvenient and error-prone. It would be great if arduino-language-server could accept a -project-root
option and check the sketch.json
inside the project root directory to access all project-specific settings.
Metadata
Metadata
Assignees
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
bradcush commentedon Jun 12, 2022
This should already be the case if your
sketch.json
file is at the same level as yourino
file. In my case I'm usingarduino_language_server
with the Neovim built-in LSP which sets the root directory for the language server based on the location of theino
file. I haven't dug too deep but I have one language server client per root directory. I'm guessing if the language server process is started from a directory that contains asketch.json
file then it will use it.alessio-perugini commentedon Aug 5, 2023
@nalzok it is possible. Just create a
sketch.yaml
in the root of your project and add the following key:default_fqbn: your_fqbn
. By doing so you can change your neovim lspconfig removing the custom function and the-fqbn
flag.