I tried giving VS Code a shot (Atom is my go-to editor). I guess I got too motivated after reading the recent opinions on optimal IDE for Julia…I was wondering if anyone has encountered a “Missing Reference” error could provide some help? The code runs fine but I’d like to not have these warnings, if possible. Happy to provide a screenshot if it helps but this seems similar to what was mentioned here
In my experience they do not yet work very well. However, there is an option in the VS Code extension settings to have the linter running, but also disable “missing reference” warning.
I am also having this issue. Would you mind providing more detail about finding this setting? I went to File->Settings and clicked on extensions. There are a lot of options under extensions.
You look up your extensions, click on the wheel for the Julia extension, then click on “extension settings” or something similar and then you choose this:
If you do not want to use the linter at all, you can also untick this option:
The problem with this is that I really do want the missing ref warnings, I just want them to be accurate. Turning this off makes debugging more difficult if you’ve misspelled a function name or something like that.
I’m wondering if there’s a way to add references so that the extension is aware of them? Maybe @davidanthoff has a good solution for this? I’d be happy to contribute here as I use VS Code on a daily basis and lately I’ve been using a lot of DataFramesMeta.jl and Makie.jl and I have to prefix all of my function calls to avoid the warnings (e.g. DataFramesMeta.where() or Makie.plot()).
In the case of plotting, this usually isn’t a big deal, but with DataFramesMeta I use the @linq macro to chain a bunch of operations together so prefixing everything with DataFramesMeta results in really nasty-looking code.
This is a known problem, we just need to fix it. Not super trivial, but I think we should hopefully resolve it relatively soonish (think weeks not months).
I just installed JuliaPro on my laptop and installed the Julia extension to VS Code and got all the Missing Reference errors anytime I have a using statement
I’m more than happy to put some time into assisting with this if you all need an extra pair of hands. I don’t know anything about writing a VS Code extension but, according to the Microsoft docs, it requires having Node.js installed. JavaScript/Node was my first programming language so if there’s something here I can do (without getting in the way), I’m willing to put in a couple of hours per week on this to make the tool better . Feel free to reach out and let me know.
Any update regarding this issue? I still get these warnings when using packages. I could disable them but the linter still doesn’t know what packages I’m using so I miss out on a lot of info regarding the methods in the package and possible syntax errors.
It’s really easy to reproduce. Simply creating a new Julia file and having a using Example (where Example is an added package in the global environment), the linter would show a warning underlining Example and any functions in it saying “Missing Reference”. Running the REPL runs the code just fine. Should I post an issue in LanguageServer or the VSCode extension?