LSP with Neovim keeps crashing

davibarreira
Wed, 22 Dec 2021 15:33:42 +0000
Tooling

I’m using LSP with Neovim, but for some reason, it keeps crashing when I’m using it in the package I’m developing. I couldn’t pin point what exactly is causing the crash, but here is the first log message that I get as soon as it crashes:

[ERROR][2021-12-22 12:31:15] .../vim/lsp/rpc.lua:417	"rpc"	"/home/davibarreira/.julia/environments/nvim-lspconfig/bin/julia"	"stderr"
'┌ Error: get_hover failed to convert Expr\n│   exception =\n│    TypeError: in Expr, expected Symbol, got a value of type CSTParser.EXPR\n│    Stacktrace:\n│
[1] Expr\n│        @ ./boot.jl:263 [inlined]\n│
[2] get_hover(b::StaticLint.Binding, documentation::String, server::LanguageServerInstance)\n│       @ LanguageServer ~/.julia/packages/LanguageServer/JrIEf/src/requests/hover.jl:58\n│
[3] collect_completions(x::StaticLint.Scope, spartial::String, state::LanguageServer.CompletionState, inclexported::Bool, dotcomps::Bool)\n│        @ LanguageServer ~/.julia/packages/LanguageServer/JrIEf/src/requests/completions.jl:230\n│
[4] collect_completions(x::CSTParser.EXPR, spartial::String, state::LanguageServer.CompletionState, inclexported::Bool, dotcomps::Bool)\n│        @ LanguageServer ~/.julia/packages/LanguageServer/JrIEf/src/requests/completions.jl:212\n│
[5] collect_completions(x::CSTParser.EXPR, spartial::String, state::LanguageServer.CompletionState, inclexported::Bool, dotcomps::Bool) (repeats 4 times)\n│        @ LanguageServer ~/.julia/packages/LanguageServer/JrIEf/src/requests/completions.jl:220\n│
[6] collect_completions\n│        @ ~/.julia/packages/LanguageServer/JrIEf/src/requests/completions.jl:211 [inlined]\n│
[7] textDocument_completion_request(params::LanguageServer.CompletionParams, server::LanguageServerInstance, conn::JSONRPC.JSONRPCEndpoint{Base.PipeEndpoint, Base.PipeEndpoint})\n│        @ LanguageServer ~/.julia/packages/LanguageServer/JrIEf/src/requests/completions.jl:85\n│
[8] (::LanguageServer.var"#96#97"{typeof(LanguageServer.textDocument_completion_request), LanguageServerInstance})(conn::JSONRPC.JSONRPCEndpoint{Base.PipeEndpoint, Base.PipeEndpoint}, params::LanguageServer.CompletionParams)\n│        @ LanguageServer ~/.julia/packages/LanguageServer/JrIEf/src/languageserverinstance.jl:252\n│
[9] dispatch_msg(x::JSONRPC.JSONRPCEndpoint{Base.PipeEndpoint, Base.PipeEndpoint}, dispatcher::JSONRPC.MsgDispatcher, msg::Dict{String, Any})\n│        @ JSONRPC ~/.julia/packages/JSONRPC/yu0G3/src/typed.jl:67\n│
[10] run(server::LanguageServerInstance)\n│        @ LanguageServer ~/.julia/packages/LanguageServer/JrIEf/src/languageserverinstance.jl:361\n│
[11] top-level scope\n│        @ none:31\n│
[12] eval\n│        @ ./boot.jl:373 [inlined]\n│
[13] exec_options(opts::Base.JLOptions)\n│        @ Base ./client.jl:268\n│
[14] _start()\n│        @ Base ./client.jl:495\n└ @ LanguageServer ~/.julia/packages/LanguageServer/JrIEf/src/requests/hover.jl:60\n'

Any idea on what might be going on?

2 posts - 2 participants