Skip to content
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

Language sever unable to locate libraries in the $HOME/Arduino/libraries directory #163

Open
tomhepworth opened this issue Jun 28, 2023 · 1 comment

Comments

@tomhepworth
Copy link

tomhepworth commented Jun 28, 2023

I have the standard configuration of arduino-language-server in neovim.

The line #include <Wire.h> gives me a "file not found" error. The same with other libraries. I have generated a compile_commands.json with arduino-cli but this does not make any difference.

Is there a way to pass include paths to the language server?

My configuration:

local DEFAULT_FBQN="arduino:avr:uno"

local MY_FQBN = DEFAULT_FBQN

print(MY_FQBN)

require'lspconfig'.arduino_language_server.setup{
    cmd = {
        "arduino-language-server",
	"-clangd",
	"/usr/local/bin/clangd",
 	"-cli", 
	"/usr/local/bin/arduino-cli",
        "-cli-config",
	"/home/.../thomas.hepworth/.arduino15/arduino-cli.yaml",
        "-fqbn",
        MY_FQBN
    }
}
@nabakolu
Copy link

I do have the same problem.
But including your libraries (which are 'file not found'), then compiling once with arduino-cli fixes this for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants