neovim LSP <-> arduino-language-server crashes on textDocument/definition method. #159
Open
3 tasks done
Labels
type: imperfection
Perceived defect in any part of project
Describe the problem
"nvim" LSP client detach from arduino-language-server with error
Unresolved .ino path
ontextDocument/definition
method, when the definition is located on a "not tracked" file.I learned from the source code that the "tracked files" are those which are saved from
textDocument/didOpen
methods. and to send that from "nvim", I just open the file containing the definition once.To reproduce
callme.ino
test_server.ino
init.lua
callme
function call and runExpected behavior
From the text editor point of view, the
callme.ino
file should get opened and the cursor should be on the functioncallme
.Arduino Language Server version
0.7.4 and latest main branch commit
6c64232f29f8e61
Arduino CLI version
0.27.1
Operating system
Linux
Operating system version
Ubuntu 22
Additional context
Logged Error.
I fixed the problem suppressing the error by changing the
idePathToIdeURI()
function toBut I do not think this is a good solution and would introduce other problems.
Other tries I made
I tried to open the project with several commands but all gave the same behavior.
nvim test_server.ino nvim . nvim test_server.ino callme.ino
The only workaround that leads to opening the definition is by opening the
callme.ino
file:e callme.ino
explicitly once before trying to calltextDocument/definition
.Issue checklist
The text was updated successfully, but these errors were encountered: