Closed prassee closed 4 years ago
Does it work with Julia 1.3? Julia 1.4 support does not work properly yet. How did you install lsp-julia
?
I used (https://github.com/gdkrmr/lsp-julia) clone of lsp-julia to try with Julia1.4 (since gdkrmr repo seems to use the latest LangServer). OTTH, while using this repo I got the same error with Julia 1.3.
I installed lsp-julia by cloning https://github.com/non-Jedi/lsp-julia repo and adding to lsp-julia.jl to the loadpath of emacs.
just curious to know any updates about this
I have created another issue I found after updating to the latest code - https://github.com/non-Jedi/lsp-julia/issues/27
For me https://github.com/non-Jedi/lsp-julia works with julia 1.3 and https://github.com/gdkrmr/lsp-julia works with 1.4 (haven't done any tests with 1.3) but flycheck integration does not work, which is why I haven't merged yet.
I'm also facing the same issue with the following
What works?
What not works
include
means files included with in a project. However it works for those added as a Pkg dependency.what is the exact version of lsp-julia
? The one from https://github.com/gdkrmr/lsp-julia currently has issues.
I'm using non-jedi
version https://github.com/non-Jedi/lsp-julia
that works fine for me. Sometimes LanguageServer.jl
doesn't find the symbol. But seems to be a current limitation of LanguageServer.jl
I dont think so as the more specific case is let say I include utils.jl file in main.jl
util.jl
function to_upper(x::String)::String
return uppercase(x)
end
main.jl
include("utils.jl")
lang = "julia"
lang = to_upper(lang)
to_lower(lang)
function to_lower(x::String)
return lower_case(x)
end
In the above code, my specific issue is jump-to-definition :-
but works for
to_lower
doesn't work for
include("utils.jl")
to_upper(lang)
and ends up with a warning
Warning (lsp-mode): Failed to process xref entry for filename ’’: Read error: Is a directory
However the same behaviour works in VSCode hence it should not be issue from LanguageServer
. Based on the warning message, I guess lsp-julia could not infer the mapping between functions and the respective files where they are defined.
OTTH, jump-to-definition works for all the modules where are loaded in to LOAD_PATH.
Hope I made it clear for everyone. (Note :- I've also tried https://github.com/non-Jedi/eglot-jl and observed the same behavior as explained above.)
Hi @prasannakog thanks for the good reproducer. For anyone else following along, the main.jl
/utils.jl
example above actually works inside a package, but it fails outside of a package because LanguageServer.jl uses a uri of "file://utils.jl" if outside of a package. I will file an issue with upstream.
Hi @prasannakog thanks for the good reproducer. For anyone else following along, the
main.jl
/utils.jl
example above actually works inside a package, but it fails outside of a package because LanguageServer.jl uses a uri of "file://utils.jl" if outside of a package. I will file an issue with upstream.
Thanks @non-Jedi for taking this forward. I should have attached the json-log in my issue desc I would try to give as much as details if I found any in the future.
looks like the related issue on the upstream repo got fixed , just curious to know any updates.
@non-Jedi any updated on this
That's up to @gdkrmr to update the versions bundled with lsp-julia. It's fixed upstream.
Thanks ... but @gdkrmr fork of lsp-julia doesn't have issues feature enabled.
He maintains this repo as well
I am maintaining this repository and use my fork as the development version. master
on my repo is currently not working without issues. I would have merged it a long time ago. There were/are numerous open issues on lsp-mode
and LanguageServer.jl
to figure this out and some patches have been merged but without success. The whole thing seems to be the communication between lsp-mode
and LanguageServer.jl
and I am not knowledgeable in the lsp specification. If you want to contribute, @prasannakog, I suggest you start at figuring out what about the communication between eglot
<-> LanguagServer.jl
or vscode
<-> LanguageServer.jl
is different from lsp-mode
<-> LanguageServer.jl
.
Is this working now? Please update according to https://github.com/non-Jedi/lsp-julia/issues/20#issuecomment-682031361 and report back.
It solved the issue for me. It might help to make lsp-julia-default-environment
to "~/.julia/environments/v1.5"
so that users may not need to go down the rabbit hole. Thank you!
Yes, I don't really have a good solution for setting the default environment. I guess the solution is to query julia --version
.
I'm uisng the latest master with Julia 1.4. Basic LSP functions do work but the jumpt to definition and find references. In case of definitions, I can within the file but not to functions or variables defined in other files.
I got the following warning message
Warning (lsp-mode): Failed to process xref entry for filename ’’: Read error: Is a directory, /data/dataworkspace/vamana-ts-modelling