Closed archwebio closed 2 years ago
You'll need to install the default language server for JavaScript: https://github.com/helix-editor/helix/wiki/How-to-install-the-default-language-servers#tsserver
(JavaScript uses the TypeScript language server)
Indeed. Yes, thanks. That worked for me
Better guiding for language server usage in helix seems to be a thing...
I started with the docs on https://helix-editor.com and didn't find instructions there.
I just saw the link in the repo pointing to the installation.
Sorry,
@workingJ Can you provide some example with helix LSP, I've installed helix lsp by ghcup, added language to languages.toml but cannot get it to work anyway, still have "Language server not active for current buffer" issue.
Here is my languages.toml
[[language]] name = "haskell" scope = "source.haskell" injection-regex = "haskell" file-types = ["hs"] roots = [] auto-format = false comment-token = "--" language-server = { command = "haskell-language-server-wrapper", args = ["--lsp"] } indent = { tab-width = 2, unit = " " }
@Max0nyshchenko make sure the Folder with the LSP is also added to your $PATH env var. Currently i have only the configuration for rust, hope this helps:
[[language]]
name = "rust"
scope = "source.rust"
injection-regex = "rust"
file-types = ["rs"]
roots = ["Cargo.toml", "Cargo.lock"]
auto-format = true
comment-token = "//"
language-server = { command = "rust-analyzer" }
indent = { tab-width = 4, unit = " " }
[language.debugger]
name = "lldb-vscode"
transport = "stdio"
command = "lldb-vscode"
@workingJ Thank you, but I cannot get it to work anyway. Updated $PATH env var to
export PATH="$PATH:$HOME/.cabal/bin:$HOME/.ghcup/bin"
I can access haskell-language-server from terminal but helix still gives "Language server not active for current buffer"
------- Edit ---------
Deleting languages.toml did the thing for me.
@Max0nyshchenko great to hear you could fix this, may be there was a bug some where in the languages toml...
@Max0nyshchenko great to hear you could fix this, may be there was a bug some where in the languages toml...
@workingJ Yeah, probably) But it has less code actions available compared to VS Code, when I'm trying Typescript React, no autoimports available in quick fixes. Is it should be like that?
@Max0nyshchenko as far as i have followed the project LSP support is still being worked and improved on. You can open an issue for your case if you'd like.
I have installed the lsps, but they are not connecting to the buffer for some reasons ...
Hello,
I have a Mac with Apple M1 chip.
I just installed the app running:
I added a configuration to change the theme under
~/.config/helix/config.toml
and it works fine.I created a JS file containing a function:
When trying to go to definition by
g
+d
I get a notification:I read through the docs but did not read any specifics on how to connect to the LSP.
Any help is much appreciated.
Thanks,