Replies: 21 comments
-
I am not sure if it could be configured currently. I think it can't. |
Beta Was this translation helpful? Give feedback.
-
I think the general way to configure things is: Copy languages.toml to language-server = { command = "typescript-language-server", args = ["--stdio"] } But I don't actually know what you can change there. |
Beta Was this translation helpful? Give feedback.
-
I think he meant the language specific configuration, not like the args. |
Beta Was this translation helpful? Give feedback.
-
That's still a bit of a hack. We should probably allow adding new language definitions without the need for the user to copy the I think the best way here would be to have |
Beta Was this translation helpful? Give feedback.
-
I actually meant exactly what @thomkeh said |
Beta Was this translation helpful? Give feedback.
-
Would this PR solve the issue? |
Beta Was this translation helpful? Give feedback.
-
Should this be closed now that #654 is merged? |
Beta Was this translation helpful? Give feedback.
-
The thread has multiple features mentioned, so I'll answer them in order:
You have to check the supported list of LSPs and install the one corresponding to your language.
See the "Default LSP" column in https://docs.helix-editor.com/lang-support.html.
https://github.com/helix-editor/helix/wiki/How-to-install-the-default-language-servers
Since #654 is merged instead of copying the default
It's possible to send config values to the LSP itself for fine-tuning it's behavior, see #2063 (comment) for an example. This issue could be closed, but we still don't have any solid, centralized docs in https://docs.helix-editor.com describing LSP in detail (including why it's required, pointing to the LSP installation wiki, etc). |
Beta Was this translation helpful? Give feedback.
-
I've just heard about helix editor and wanted to try it, LSP without config - nice. Checked out the docs, and installed taplo, as recommended, with
Searching the web didn't help, except to find the diagnostics above.
|
Beta Was this translation helpful? Give feedback.
-
It looks like you're running an older helix release - taplo was added after the 22.03 release: #2302 so you'll need to run 22.05 |
Beta Was this translation helpful? Give feedback.
-
I think it would be good to show a full example of how to translate a more complicated setup into the format that helix wants. #2063 (comment) provides a great example of how to port over a simple configuration, but I'm trying to work with a configuration with nested tables and it's not going well. |
Beta Was this translation helpful? Give feedback.
-
@cinerea0 Could you share the configuration with the nested tables? We could add the ported examples to the wiki too. |
Beta Was this translation helpful? Give feedback.
-
@sudormrfbin After a bit more tinkering I realized that it isn't so much a nested table as it is lua not having the syntax to express the difference between tables and arrays, which TOML does. I've still included my configurations below in case they make a good example. Lua for Neovimtexlab = {
build = {
forwardSearchAfter = true,
onSave = true
},
chktex = {
onEdit = true,
},
forwardSearch = {
executable = 'zathura',
args = { '--synctex-forward', '%l:1:%f', '%p' }
},
} TOML for Helix[[language]]
name = "latex"
config = { texlab = { build = { onSave = true, forwardSearchAfter = true }, forwardSearch = { executable = "zathura", args = [ "--synctex-forward", "%l:1:%f", "%p" ] }, chktex = { onEdit = true } } } EDIT: Actually, there were nested tables, and the TOML representation is quite awkward looking. |
Beta Was this translation helpful? Give feedback.
-
The TOML representation doesn't look that bad if you spread it out (I think I did it correctly, no Latex knowledge here). [[language]]
name = "latex"
[language.config.texlab.build]
onSave = true
forwardSearchAfter = true
[language.config.texlab.forwardSearch]
executable = "zathura"
args = [ "--synctex-forward", "%l:1:%f", "%p" ]
[language.config.texlab.chktex]
onEdit = true |
Beta Was this translation helpful? Give feedback.
-
@MGlolenstine That does indeed work. We were workshopping it in #2758, for some reason no one came up with that representation. |
Beta Was this translation helpful? Give feedback.
-
@cinerea0 I'm glad I was able to help! The beauty of TOML is that you can reformat and reorganise your keys as much as you want to make it as readable as you want :) |
Beta Was this translation helpful? Give feedback.
-
Using comments in this page I was able to get forward synctex search to work on macos (with Skim). I wonder if anybody has got inverse search to work as well. Apparently this is still a problem with helix itself. I searched for a while and I couldn't find a way to ask a current hx process to switch to a particular file:lineno via a shell command... Ideally it could be something like Is there any way this feature could be added? By the way, helix rocks! I was (and still am) a vscode user, but I have so much fun using helix that I am really considering switching to it for all my work. You have my admiration for the excellent work 😊 |
Beta Was this translation helpful? Give feedback.
-
Apparently the config parameter is now defunct. How do we configure this now? |
Beta Was this translation helpful? Give feedback.
-
@robrecord good question. I just added a rust config thing to use clippy and would also like to know how to make it work |
Beta Was this translation helpful? Give feedback.
-
@gozes @robrecord I think I figured it out. Like some other lsp configs it seems with the new way things work we need to turn the previously mentioned config into: [[language]]
name = "latex"
[language-server.texlab.config.texlab.build]
onSave = true
forwardSearchAfter = true
[language-server.texlab.config.texlab.forwardSearch]
executable = "zathura"
args = [ "--synctex-forward", "%l:1:%f", "%p" ]
[language-server.texlab.config.texlab.chktex]
onEdit = true Basically, all the keys given in the texlab Wiki like This works for me (I built from master on the 26th of august), hope this works for you too! |
Beta Was this translation helpful? Give feedback.
-
I think we can close this, this issue is just quite old/stale. I consider the docs at https://docs.helix-editor.com/master/languages.html#language-server-configuration sufficient, especially with the many examples in the wiki: https://github.com/helix-editor/helix/wiki/How-to-install-the-default-language-servers. If people have specific suggestions on how the docs can be improved they can open new issues (or even better a PR). |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Describe your feature request
Nowhere in the docs does it actually explain how you configure an LSP.
I just found this project and whilst it looks interesting I have essentially no way of understanding how to set it up without going through the source code.
looks interesting though :)
Beta Was this translation helpful? Give feedback.
All reactions