helix icon indicating copy to clipboard operation
helix copied to clipboard

roots for `[language-server.mylsp-name]`

Open yoomaxxx opened this issue 2 years ago • 6 comments

Hello, I want use [language-server.mylsp-name] directive with roots = [] like in [[language]] directive.

What exists at the moment does not satisfy DRY principle

For example:

[language-server.tailwindcss]
command = "tailwindcss-language-server"
args = ["--stdio"]
roots = ['tailwindcss.config.js']
[language-server.unocss]
command = "unocss-language-server"
args = ["--stdio"]
roots = ['unocss.config.js']
[[language]]
name = "html"
scope = "text.html.basic"
injection-regex = "html"
file-types = ["html"]
roots = []
language-servers = ["tailwindcss", "unocss", "vscode-html-language-server"]
auto-format = true
indent = { tab-width = 2, unit = "  " }

yoomaxxx avatar Aug 30 '23 15:08 yoomaxxx

Provide an issue description. This is not actionable

pascalkuthe avatar Aug 30 '23 15:08 pascalkuthe

Provide an issue description. This is not actionable

[redacted]

yoomaxxx avatar Aug 30 '23 15:08 yoomaxxx

DRY is questionable for coding but it doesn't make any sense for a config file. Specifying roots folders per language seems perfectly fine to me.

However, I do agree that adding a roots folder to the language server config makes sense for a different reason: Multiple different language servers may actually expect different roots for the same language.

These roots should be merged with the per-language roots.

pascalkuthe avatar Aug 30 '23 16:08 pascalkuthe

am currently working this.

would each language-server config have several roots or a single root.

for example:

[language-server.unocss]
command = "unocss-language-server"
args = ["--stdio"]
roots = ["unocss.config.js"]

or

[language-server.unocss]
command = "unocss-language-server"
args = ["--stdio"]
root = "unocss.config.js"

KenCox94 avatar Sep 03 '23 02:09 KenCox94

am currently working this.

would each language-server config have several roots or a single root.

for example:

[language-server.unocss]
command = "unocss-language-server"
args = ["--stdio"]
roots = ["unocss.config.js"]

or

[language-server.unocss]
command = "unocss-language-server"
args = ["--stdio"]
root = "unocss.config.js"

several roots

yoomaxxx avatar Sep 03 '23 12:09 yoomaxxx

Hello! Is this feature currently being worked on? If not, I would be happy to work on it.

JulianGCalderon avatar Aug 18 '24 17:08 JulianGCalderon

I will start working on this since the last comment about picking this up was a couple years ago.

hackeryarn avatar Apr 23 '25 12:04 hackeryarn