elixir-tools / credo-language-server

LSP implementation for Credo.
MIT License
96 stars 11 forks source link

Add instructions for Helix #29

Closed alanvardy closed 1 year ago

alanvardy commented 1 year ago

Hello @mhanberg I love what you are doing here!

I managed to get this working with Helix on main, which now supports multiple LSPs, by git cloning to get the executable and using the following in the languages.toml configuration:

[[language]]
name = "elixir"
scope = "source.elixir"
injection-regex = "elixir"
file-types = ["ex", "exs"]
roots = ["mix.exs"]
auto-format = false
diagnostic-severity = "Hint"
comment-token = "#"
indent = {tab-width = 2, unit = " "}
language-servers = ["elixir-ls", "credo"]

[language-server.elixir-ls]
command = "elixir-ls"
config = { elixirLS.dialyzerEnabled = true }

[language-server.credo]
command = "/path/to/executable/credo-language-server"
args = ["--stdio=true", "--port=999"]

Would there be a good place to add this example?

mhanberg commented 1 year ago

Hi!

I think a good place for it is in the list of supported editors in the readme.

you can put the code in a details/summary so i looks

like this

```toml [[language]] name = "elixir" scope = "source.elixir" injection-regex = "elixir" file-types = ["ex", "exs"] roots = ["mix.exs"] auto-format = false diagnostic-severity = "Hint" comment-token = "#" indent = {tab-width = 2, unit = " "} language-servers = ["elixir-ls", "credo"] [language-server.elixir-ls] command = "elixir-ls" config = { elixirLS.dialyzerEnabled = true } [language-server.credo] command = "/path/to/executable/credo-language-server" args = ["--stdio=true", "--port=999"] ```