Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support custom LSP #205

Closed
joerdav opened this issue Jun 10, 2021 · 3 comments
Closed

Support custom LSP #205

joerdav opened this issue Jun 10, 2021 · 3 comments
Labels
A-language-server Area: Language server client C-enhancement Category: Improvements

Comments

@joerdav
Copy link

joerdav commented Jun 10, 2021

I want to use helix but I can't seem to customise the LSPs.
The language is https://github.com/a-h/templ and contains it's own lsp under the command templ lsp, I tried adding an entry in my own languages.toml but it seems there is an enum that stops you from adding your own entry.

@pickfire
Copy link
Contributor

Oh, seemed like you can't right now.

mk_langs!(
// 1) Name for enum
// 2) tree-sitter function to call to get a Language
(Agda, tree_sitter_agda),
(Bash, tree_sitter_bash),
(C, tree_sitter_c),
(CSharp, tree_sitter_c_sharp),
(Cpp, tree_sitter_cpp),
(Css, tree_sitter_css),
(Elixir, tree_sitter_elixir),
(Go, tree_sitter_go),
// (Haskell, tree_sitter_haskell),
(Html, tree_sitter_html),
(Java, tree_sitter_java),
(Javascript, tree_sitter_javascript),
(Json, tree_sitter_json),
(Julia, tree_sitter_julia),
(Php, tree_sitter_php),
(Python, tree_sitter_python),
(Ruby, tree_sitter_ruby),
(Rust, tree_sitter_rust),
(Scala, tree_sitter_scala),
(Swift, tree_sitter_swift),
(Toml, tree_sitter_toml),
(Tsx, tree_sitter_tsx),
(Typescript, tree_sitter_typescript)
);

This requires support to use custom language name.

@pickfire pickfire added A-language-server Area: Language server client C-enhancement Category: Improvements labels Jun 10, 2021
@pickfire pickfire changed the title Is there a way to use custom LSPs? Support custom LSP Jun 10, 2021
@archseer
Copy link
Member

Yeah, we need to be able to define languages in languages.toml without binding them to tree-sitter.

@archseer
Copy link
Member

With languages.toml no longer being tied to a tree sitter grammar, you should be able to define a custom language declaration now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-language-server Area: Language server client C-enhancement Category: Improvements
Projects
None yet
Development

No branches or pull requests

3 participants