Any help getting the LSP working with Helix? #294
-
If you don't know of it, Helix is a modal text editor that has native LSP support. I've been having trouble getting the LSP working correctly using the built in language configurations. It seems to recognize the LSP and allow me to select between four commands (.index, .new, .list, and .tag.list) but none of them seem to do anything. No sign of auto-completion at all either. The following is my languages.toml file. [[language]] I'm not well versed in how LSPs work exactly so any help in getting this to work would be a big help! Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
I found all my solutions in rather roundabout ways, with a few caveats. I'll list them here in case anyone else might find them useful. First, I replaced my 'languages.toml' entry:
This is modeled after the default 'languages.toml' included with helix. (Psst... add this to the same file to get some sweet syntax highlighting!)
This change immediately fixed my auto-completion and diagnostic issues. As for the others, helix's in-house 'go-to-definition' command works perfectly to follow links (this is bound to 'g' in normal mode followed by 'd'). The four commands are still semi-responsive. I can see now that the 'zk.index' command is actually indexing my notebook, as proven by attempting to auto-complete new tags before and after using the command. But, using ':sh zk index' is both quicker and includes a floating results box. The other three commands still don't seem to do much of anything. Using the same ':sh' trick with other commands has mixed results. It works with 'zk list...' using the same floating box as index (though I'm sure this will get very impractical if your list results are numerous). Any other command such as ':sh zk new...' or ':sh zk edit' causes helix to freeze up and forces me to restart, so don't do that! Helix's "space mode" (pressing 'space' in normal mode) seems to solve many problems. Selecting a word and pressing 'space-a' while in normal mode, opens a dialog allowing you to create and link to a new note with the selected word as a title. For a short preview of the first few lines of a file, 'space-k' while the caret is over a link in normal mode works well. For a general command, 'space-f' opens a fuzzy finder for the current folder allowing you to easily search your notebook without crashing helix. Cool! I hope my misadventures help any other zk users considering this new modal text editor. Helix has been very fun so far and has offered a fairly smooth transition from neovim, even without plugin support yet! Happy trails! |
Beta Was this translation helpful? Give feedback.
I found all my solutions in rather roundabout ways, with a few caveats. I'll list them here in case anyone else might find them useful.
First, I replaced my 'languages.toml' entry:
This is modeled after the default 'languages.toml' included with helix.
(Psst... add this to the same file to get some sweet syntax highlighting!)
This…