-
-
Notifications
You must be signed in to change notification settings - Fork 19
Description
Describe the problem
I set up arduino cli in neovim inside ubuntu wsl with lspconfig and mason.nvim. The problem is, it crashes whenever I even enter a buffer. When I look through the log, the compile command fails because it has the flag " --source-override /tmp/2700121934", removing this flag and running the compile command works from the command line. So when I tried removing that from the source code, it gave me an error of "could not find compile_commands.json"
Here's my init for the lsp:
require('lspconfig').arduino_language_server.setup({
cmd = { "", "-clangd",
"$HOME/.local/share/nvim/mason/bin/clangd", "-cli-config",
"$HOME/snap/arduino-cli/41/.arduino15/arduino-cli.yaml", "-fqbn", "arduino:avr:pro", "-log", "true" },
})
Here's the compile command that it crashes on:
/snap/bin/arduino-cli --config-file $HOME/snap/arduino-cli/41/.arduino15/arduino-cli.yaml compile --fqbn arduino:avr:pro --only-compilation-database --source-override /tmp/3587927762 --build-path /tmp/arduino-language-server1532322847/fullbuild --format json <PROJECT_DIR>
To reproduce
i just created a new sketch, setup arduino ls using the code above, and tried to enter a buffer.
Expected behavior
I would expect it to attach to the buffer and work, but it instantly crashes
Arduino Language Server version
I tried with a build of the current branch, the build that mason uses, and a download of the 0.7.5 release
Arduino CLI version
0.34.1
Operating system
Linux
Operating system version
Ubuntu 22.04.2 LTS
Additional context
n/a
Issue checklist
- I searched for previous reports in the issue tracker
- I verified the problem still occurs when using the latest version
- My report contains all necessary details