Closed
Description
Summary
Ref. julia-vscode/LanguageServer.jl#1155 (comment)
gy
should not try to actually request the type location if the server does not support it.
Reproduction Steps
I tried this:
- Create a julia source file with this content:
struct Example
a::Int
end
function foo(bar::Example)
bar.a
end
- Open the file in helix, with the julia LS installed
- Move the cursor over the
Example
in the function signature ofbar
- Enter
gy
(nothing happens) - Check the log for the error message of the LS
I expected this to happen:
Ideally, just a log message that the method is not supported by the server.
Instead, this happened:
The language server crashed due to not supporting that method. See the linked github issue for the reasoning why the LS crashes, which is intentional.
Helix log
~/.cache/helix/helix.log
Relevant log section, showing the error message of the LS.
2022-09-11T16:59:49.163 helix_lsp::transport [ERROR] err <- "ERROR: Unknown method textDocument/typeDefinition.\n"
2022-09-11T16:59:49.163 helix_lsp::transport [ERROR] err <- "Stacktrace:\n"
2022-09-11T16:59:49.192 helix_lsp::transport [ERROR] err <- " [1] error(s::String)\n"
2022-09-11T16:59:49.192 helix_lsp::transport [ERROR] err <- " @ Base ./error.jl:35\n"
2022-09-11T16:59:49.193 helix_lsp::transport [ERROR] err <- " [2] dispatch_msg(x::JSONRPC.JSONRPCEndpoint{Base.PipeEndpoint, Base.PipeEndpoint}, dispatcher::JSONRPC.MsgDispatcher, msg::Dict{String, Any})\n"
2022-09-11T16:59:49.193 helix_lsp::transport [ERROR] err <- " @ JSONRPC ~/.julia/packages/JSONRPC/P0G1p/src/typed.jl:81\n"
2022-09-11T16:59:49.193 helix_lsp::transport [ERROR] err <- " [3] run(server::LanguageServerInstance)\n"
2022-09-11T16:59:49.193 helix_lsp::transport [ERROR] err <- " @ LanguageServer ~/.julia/packages/LanguageServer/0vsx2/src/languageserverinstance.jl:382\n"
2022-09-11T16:59:49.194 helix_lsp::transport [ERROR] err <- " [4] runserver(pipe_in::Base.PipeEndpoint, pipe_out::Base.PipeEndpoint, env_path::String, depot_path::String, err_handler::Nothing, symserver_store_path::Nothing)\n"
2022-09-11T16:59:49.194 helix_lsp::transport [ERROR] err <- " @ LanguageServer ~/.julia/packages/LanguageServer/0vsx2/src/runserver.jl:41\n"
2022-09-11T16:59:49.194 helix_lsp::transport [ERROR] err <- " [5] runserver()\n"
2022-09-11T16:59:49.194 helix_lsp::transport [ERROR] err <- " @ LanguageServer ~/.julia/packages/LanguageServer/0vsx2/src/runserver.jl:39\n"
2022-09-11T16:59:49.194 helix_lsp::transport [ERROR] err <- " [6] top-level scope\n"
2022-09-11T16:59:49.194 helix_lsp::transport [ERROR] err <- " @ none:1\n"
Platform
Linux 5.19.7-arch1-1
Terminal Emulator
footy
Helix Version
helix 22.08.1