feat: Syntax highlighting for Astro files (#3829)
This commit is contained in:
parent
0d8ffa6b4a
commit
ffb41a94f0
4 changed files with 25 additions and 0 deletions
|
@ -1,5 +1,6 @@
|
||||||
| Language | Syntax Highlighting | Treesitter Textobjects | Auto Indent | Default LSP |
|
| Language | Syntax Highlighting | Treesitter Textobjects | Auto Indent | Default LSP |
|
||||||
| --- | --- | --- | --- | --- |
|
| --- | --- | --- | --- | --- |
|
||||||
|
| astro | ✓ | | | |
|
||||||
| awk | ✓ | ✓ | | `awk-language-server` |
|
| awk | ✓ | ✓ | | `awk-language-server` |
|
||||||
| bash | ✓ | | | `bash-language-server` |
|
| bash | ✓ | | | `bash-language-server` |
|
||||||
| beancount | ✓ | | | |
|
| beancount | ✓ | | | |
|
||||||
|
|
|
@ -1754,3 +1754,15 @@ language-server = { command = "jsonnet-language-server", args= ["-t", "--lint"]
|
||||||
[[grammar]]
|
[[grammar]]
|
||||||
name = "jsonnet"
|
name = "jsonnet"
|
||||||
source = { git = "https://github.com/sourcegraph/tree-sitter-jsonnet", rev = "0475a5017ad7dc84845d1d33187f2321abcb261d" }
|
source = { git = "https://github.com/sourcegraph/tree-sitter-jsonnet", rev = "0475a5017ad7dc84845d1d33187f2321abcb261d" }
|
||||||
|
|
||||||
|
[[language]]
|
||||||
|
name = "astro"
|
||||||
|
scope = "source.astro"
|
||||||
|
injection-regex = "astro"
|
||||||
|
file-types = ["astro"]
|
||||||
|
roots = []
|
||||||
|
indent = { tab-width = 2, unit = " " }
|
||||||
|
|
||||||
|
[[grammar]]
|
||||||
|
name = "astro"
|
||||||
|
source = { git = "https://github.com/virchau13/tree-sitter-astro", rev = "5f5c3e73c45967df9aa42f861fad2d77cd4e0900" }
|
||||||
|
|
3
runtime/queries/astro/highlights.scm
Normal file
3
runtime/queries/astro/highlights.scm
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
; inherits: html
|
||||||
|
|
||||||
|
["---"] @punctuation.delimiter
|
9
runtime/queries/astro/injections.scm
Normal file
9
runtime/queries/astro/injections.scm
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
; inherits: html
|
||||||
|
|
||||||
|
((frontmatter
|
||||||
|
(raw_text) @injection.content)
|
||||||
|
(#set! injection.language "typescript"))
|
||||||
|
|
||||||
|
((interpolation
|
||||||
|
(raw_text) @injection.content)
|
||||||
|
(#set! injection.language "tsx"))
|
Loading…
Add table
Reference in a new issue