helix: Julia LSP not working
Reproduction steps
- Open a julia file.
- LSP does not work.
Environment
- Platform: Linux
- Helix version: v0.4.1-68-g5cee3b63 (master)
~/.cache/helix/helix.log
2021-08-28T12:29:40.183 helix_lsp::transport [ERROR] err <-
2021-08-28T12:29:40.183 helix_lsp::transport [ERROR] err <-
2021-08-28T12:29:40.183 helix_lsp::transport [ERROR] err <-
2021-08-28T12:29:40.183 helix_lsp::transport [ERROR] err <-
2021-08-28T12:29:40.183 helix_lsp::transport [ERROR] err <-
2021-08-28T12:29:40.183 helix_lsp::transport [ERROR] err <-
2021-08-28T12:29:40.183 helix_lsp::transport [ERROR] err <-
2021-08-28T12:29:40.183 helix_lsp::transport [ERROR] err <-
2021-08-28T12:29:40.183 helix_lsp::transport [ERROR] err <-
2021-08-28T12:29:40.183 helix_lsp::transport [ERROR] err <-
2021-08-28T12:29:40.183 helix_lsp::transport [ERROR] err <-
2021-08-28T12:29:40.183 helix_lsp::transport [ERROR] err <-
2021-08-28T12:29:40.183 helix_lsp::transport [ERROR] err <-
2021-08-28T12:29:40.183 helix_lsp::transport [ERROR] err <-
2021-08-28T12:29:40.183 helix_lsp::transport [ERROR] err <-
2021-08-28T12:29:40.183 helix_lsp::transport [ERROR] err <-
2021-08-28T12:29:40.183 helix_lsp::transport [ERROR] err <-
2021-08-28T12:29:40.183 helix_lsp::transport [ERROR] err <-
2021-08-28T12:29:40.183 helix_lsp::transport [ERROR] err <-
2021-08-28T12:29:40.183 helix_lsp::transport [ERROR] err <-
2021-08-28T12:29:40.183 helix_lsp::transport [ERROR] err <-
2021-08-28T12:29:40.183 helix_lsp::transport [ERROR] err <-
2021-08-28T12:29:40.183 helix_lsp::transport [ERROR] err <-
2021-08-28T12:29:40.183 helix_lsp::transport [ERROR] err <-
2021-08-28T12:29:40.183 helix_lsp::transport [ERROR] err <-
2021-08-28T12:29:40.183 helix_lsp::transport [ERROR] err <-
2021-08-28T12:29:40.183 helix_lsp::transport [ERROR] err <-
2021-08-28T12:29:40.183 helix_lsp::transport [ERROR] err <-
2021-08-28T12:29:40.183 helix_lsp::transport [ERROR] err <-
2021-08-28T12:29:40.183 helix_lsp::transport [ERROR] err <-
2021-08-28T12:29:40.183 helix_lsp::transport [ERROR] err <-
2021-08-28T12:29:40.183 helix_lsp::transport [ERROR] err <-
2021-08-28T12:29:40.183 helix_lsp::transport [ERROR] err <-
2021-08-28T12:29:40.183 helix_lsp::transport [ERROR] err <-
2021-08-28T12:29:40.183 helix_lsp::transport [ERROR] err <-
2021-08-28T12:29:40.183 helix_lsp::transport [ERROR] err <-
2021-08-28T12:29:40.183 helix_lsp::transport [ERROR] err <-
2021-08-28T12:29:40.183 helix_lsp::transport [ERROR] err <-
2021-08-28T12:29:40.183 helix_lsp::transport [ERROR] err <-
2021-08-28T12:29:40.183 helix_lsp::transport [ERROR] err <-
2021-08-28T12:29:40.183 helix_lsp::transport [ERROR] err <-
2021-08-28T12:29:40.183 helix_lsp::transport [ERROR] err <-
2021-08-28T12:29:40.183 helix_lsp::transport [ERROR] err <-
2021-08-28T12:29:40.183 helix_lsp::transport [ERROR] err <-
2021-08-28T12:29:40.183 helix_lsp::transport [ERROR] err <-
2021-08-28T12:29:40.183 helix_lsp::transport [ERROR] err <-
Is this related to #413 ?
Just to add, I wonder if it actually not start julia because in htop, no julia process is running.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 57 (51 by maintainers)
I will write a short post soon on how to set it up 😃
https://uncomfyhalomacro.pl/blog/14/
I have a set of changes here: https://github.com/helix-editor/helix/compare/lsp-async-init
(There’s still a couple of things I need to clean up but you can go ahead and test it)
It’s a bit tricky because we now need to buffer any requests sent before initialize is complete and send them at a later time. Julia is also the first LSP I tested that doesn’t support partial document updates (so you need to send the entire doc per keypress! ideally this should get addressed by the server because it’s a lot of traffic when the document is a few kilobytes in size) https://github.com/julia-vscode/LanguageServer.jl/blob/287be7f8457ad28456a390bd8ecff26919d2ee82/src/requests/init.jl#L6
I also went ahead and improved the highlighting queries a bit to match the other grammar conventions so that helix now highlights Julia a bit better 😃
Did some testing today, Helix needs some fixes regarding EOF handling, but the problem now is indeed the initial timeout being too quick. Unlike
rust-analyzer, which also takes a while to analyze the code but immediately starts responding toinitializerequests,LanguageServer.jlwill wait until the code is fully analyzed.I was able to get it running after increasing the timeout to 20s, but the problem is that helix initializes the LSP synchronously, blocking the UI. I’ll need to do some more changes to make this async, but it’s definitely what I’m working on this week.
got it to work by using -J instead of --sysimage
So, currently Julia users need to:
LanguageServerpackage:Also, no Tab completions for writing Unicode characters easily.
I think the problem with the first command is likely the quoting around that last parameter, it might work if you remove the single quotes
'. These should be automatically added by helix when executing the command.It seems to be an error before we even hit the timeout.
I pushed a commit with some more logging (https://github.com/helix-editor/helix/commit/7eff9056802d3d4f67fbaef7ba7dc03e874564c1) can you build from master, try again and give me the
hx -v -vlog output again?