coc-julia
coc-julia copied to clipboard
Numerous "Missing reference" warnings even with `"julia.lint.missingrefs": false`.
For instance with this in coc-settings.json
:
"julia.environmentPath": ".",
"julia.lint.missingrefs": false,
and the following simple file:
using Revise Missing reference: Revise
Although using Revise
yields no error in a REPL opened in the same folder.
Maybe Revise is not part of your Project.toml but only available through some other environment in the stack?
@lassepe Hm, in this case, would the repl not error when I try using Revise
? Anyway, the message still appears on whatever reference I use from my local package. Does the julia LSP server actually activate
s my current environment?
(I'm still struggling to construct a mwe, because I'm not familiar with Julia yet.)
I can reproduce with a fresh package:
In an empty folder:
$ julia
julia> using PkgSkeleton
julia> PkgSkeleton.generate("empty_package")
...
successfully generated empty_package
then cd empty_package
and setup src/empty_packages.jl
module empty_package
function f()
println("Hey")
end
end # module
then when editing empty_package/main.jl
using empty_package Missing reference: empty_package
empty_package.f() Missing reference: empty_package
coc-nvim should activate the current project. But for that to work you need to be inside the directory I belief. Did you launch nvim within empty_package
in your example above?
Yeah, I was within empty_package
folder and opened file with nvim main.jl
.
Closing as I cannot reproduce anymore :)