mirror of
https://github.com/l0ng-ai/openidea.git
synced 2026-11-06 08:07:49 +00:00
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.
28 lines
1.1 KiB
TOML
28 lines
1.1 KiB
TOML
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"
|