Files
openidea/languages/astro.toml
d0whc3r ad382a7824 feat(astro): add Astro language support and editor mode (#712)
Astro files get their own language: TypeScript frontmatter, HTML template with TSX expressions in text and tags, TypeScript scripts, astro-ls and oxlint servers, and file-type icons.
2026-11-06 09:44:09 +08:00

28 lines
1.1 KiB
TOML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
id = "astro"
name = "Astro"
extensions = ["astro"]
block-comment = ["<!--", "-->"]
indent = { tab-size = 2, insert-spaces = true }
ui-mode = "Astro"
[[language-servers]]
name = "astro-ls"
command = "astro-ls"
args = ["--stdio"]
root-markers = ["astro.config.mjs", "astro.config.js", "astro.config.ts", "astro.config.mts", "astro.config.cjs", "astro.config.cts"]
# astro-ls ships no TypeScript and refuses to start without `tsdk`. Servers start
# in their workspace root, so this relative path is the project's own TypeScript
# (6 or older: 7 has no tsserverlibrary.js). A TypeScript elsewhere, such as an
# npm workspace root, goes in Settings › Language Servers › astro-ls ›
# Initialization options as an absolute `typescript.tsdk`.
initialization-options = { typescript = { tsdk = "node_modules/typescript/lib" } }
install-hint = "npm i -g @astrojs/language-server, and add typescript@6 to the project"
[[language-servers]]
name = "oxlint"
command = "oxlint"
args = ["--lsp"]
root-markers = [".oxlintrc.json", ".oxlintrc.jsonc", "oxlint.config.ts", "oxlint.config.mts"]
require-root-marker = true
install-hint = "npm i -D oxlint"