Replies: 5 comments 8 replies
-
Same here. I followed the steps in the wiki, but it doesn't work and also is shown a s not installed when starting "helix --health"
I am using MacOS, node 19.8.1, pnpm 8.5.1 and helix 23.03. This is my project root's .helix/languages.toml
Has anyone been able to get lsp running for astro files? |
Beta Was this translation helpful? Give feedback.
-
Here's the answer if you are using the master branch like me, else put the command, config, args and etc inside the language-server object under languages. No changes otherwise. [language-server.astro-ls]
command = "astro-ls"
args = [ "--stdio" ]
config = { "typescript" = { "tsdk" = "<path-to-your-global-storage>/pnpm/global/5/node_modules/typescript/lib"}, "environment" = "node" }
[[language]]
name = "astro"
scope = "source.astro"
injection-regex = "astro"
file-types = ["astro"]
roots = ["package.json", "astro.config.mjs"]
language-servers = [ "astro-ls" ] |
Beta Was this translation helpful? Give feedback.
-
Sorry for the late reply. I've not been using helix for a few weeks. Thank for all the help and replies. I'll give it a shot ASAP. |
Beta Was this translation helpful? Give feedback.
-
Hi! for all the volta users, i've managed to make it work using @swarnimarun config, you just need to:
p.s: if you're using typescript I also recommend installing astro's ts-plugin hope it helps :) |
Beta Was this translation helpful? Give feedback.
-
I manage to get astro working by doing a few things. Start by installing (globally):
Next, just configure the astro lsp and language in the [language-server.astro-ls]
command = "astro-ls"
args = ["--stdio"]
config = { typescript = { tsdk = "/home/my-user/.local/share/fnm/aliases/default/lib/node_modules/typescript/lib" }}
[[language]]
name = "astro"
scope = "source.astro"
injection-regex = "astro"
file-types = ["astro"]
language-servers = ["astro-ls"]
formatter = { command = "prettier", args = ["--plugin", "prettier-plugin-astro", "--parser", "astro"] }
auto-format = true In my case I'm using Note: The astro language server should also give you emmet support out of the box. So if you have emmet-ls configured in your |
Beta Was this translation helpful? Give feedback.
-
I tried to setup astro lsp with helix and failed. Could someone help me?
Beta Was this translation helpful? Give feedback.
All reactions