I know there have been several threads on this topic already. Examples include going to definitions in packages or included definitions. Most of these threads just seem to be dangling with no resolution.
In my experience, “go to definition” almost never works.
Perhaps I’m doing something wrong or my expectations are unrealistic but pycharm has no such problems.
When I have a package open for development, VSC does not recognize its methods, and jumping to definition does not work. I already asked about this, and I don’t think I got a definitive answer.
It does for me but I think one must have the entire directory (normally the src dir) loaded in the EXPLORER such that it can sniff in all files that may have the type/function definition.
This seems to be coming up more often (i.e. Go To Definition (F12) does not work for functions in an included file). I had a workflow that used to work okay (required a few Julia language server restarts every so often) but recently it doesn’t work and I can’t access intellisense (and hence go to definition) in most of my own files.
General advice that may or may not help:
Open the project as a folder in VS code, instead of individual files.
Create an environment for your project and activate that in VS code
If you are using modules, adopt a standard package structure - e.g. using PkgTemplates.jl.
Not immediately, and if fact I’m not exactly sure what made it work but I think it was the fact that I include("testa.jl") in the module and in the VSC repl I did a using *package*
If StaticLint would be better documented and could be used and tested stand-alone more people would test it and contribute, and these issues would get fixed faster …
Thanks - that did fix that particular issue. It’s not an obvious workaround (at least to me) and doesn’t address the bigger issue that navigation is unreliable.