"goto" features don't work for files in sketch src
folder
#722
Labels
topic: language server
Related to the Arduino Language Server
type: imperfection
Perceived defect in any part of project
Describe the problem
Arduino sketches may contain additional code files under the
src
subfolder. This folder is included in the build and source files it contains are recursively compiled.The Arduino IDE's language server-based features include "Go to definition" and "Peek", which reveal the definition of a code component. This works even for definitions in files not currently open in the IDE, such as libraries.
🐛 The "goto" features do not work for code components from files under the
src
subfolder of the sketch.To reproduce
HasSrc.zip
foo.h
in this line:🐛 The
src/foo.h
file does not open in an editor tab.foo.h
again.🐛 The
src/foo.h
file does not open in an editor peek.Expected behavior
The same behavior from the "goto" features when used on code components from the
src
subfolder of the sketch as from files from any other location.Arduino IDE version
Original report
2.0.0-rc3
Last verified with
9a6a457
Operating system
Windows
Operating system version
11
Additional context
Language server logs: HasSrc-logs.zip
I notice that the "goto" attempts trigger the creation of a new Arduino Language Server temporary folder, which breaks the URIs I see for
src/foo.h
in the language server logs (e.g.,file:///C:/Users/per/AppData/Local/Temp/arduino-language-server410042786/sketch/src/foo.h
).The text was updated successfully, but these errors were encountered: