You mean having a Project.toml
? That does indeed work for me and it is the obvious solution. I just think the linter should take into consideration the global environment when that is in fact what is being used.
I can replicate the issues you’re seeing using the language server in emacs via eglot-jl. Notably, I made sure to wait until the symbol server had loaded all packages installed to my global environment and am still seeing the lint error. I believe this used to work, and I’m not immediately seeing any relevant issues in the issue tracker(s), so I’d definitely open an issue for this against LanguageServer.jl.
Alright, will do. Thanks a lot for the confirmation
Your solution makes sense but I haven’t managed to get it to work. I also have a package that I use from scripts in their own directory, and this is what I’ve done:
- navigate to “scripts” directory
activate .
to activate current directory as environmentdev ..
, which adds the Project.toml file with my package under its [deps]- restart the language server
The package is still a “Missing reference”. Is there a simple step I’ve missed?
Edit: I got it to work. My workspaces weren’t switching right.