feat(languages): specilize toml file-type for cross-rs config file (#14274)

This commit is contained in:
Kristoffer Plagborg Bak Sørensen
2025-08-20 00:19:44 +02:00
committed by GitHub
parent b81ee02db4
commit 74bb02ffe7
6 changed files with 24 additions and 1 deletions

View File

@@ -31,6 +31,7 @@
| common-lisp | ✓ | | ✓ | | ✓ | `cl-lsp` |
| cpon | ✓ | | ✓ | | | |
| cpp | ✓ | ✓ | ✓ | ✓ | ✓ | `clangd` |
| cross-config | ✓ | ✓ | | | ✓ | `taplo`, `tombi` |
| crystal | ✓ | ✓ | ✓ | ✓ | | `crystalline`, `ameba-ls` |
| css | ✓ | | ✓ | | ✓ | `vscode-css-language-server` |
| csv | ✓ | | | | | |

View File

@@ -4662,7 +4662,7 @@ scope = "source.kconfig"
name = "kconfig"
source = { git = "https://github.com/tree-sitter-grammars/tree-sitter-kconfig" , rev = "9ac99fe4c0c27a35dc6f757cef534c646e944881" }
[[language]]
[[language]]
name = "doxyfile"
scope = "source.doxyfile"
injection-regex = "[Dd]oxyfile"
@@ -4673,3 +4673,13 @@ indent = { tab-width = 4, unit = " " }
[[grammar]]
name = "doxyfile"
source = { git = "https://github.com/tingerrr/tree-sitter-doxyfile/", rev = "18e44c6da639632a4e42264c7193df34be915f34" }
[[language]]
name = "cross-config"
scope = "source.cross-config"
injection-regex = "cross(-config)"
grammar = "toml"
comment-token = "#"
file-types = [{glob = "Cross.toml"}]
language-servers = [ "taplo", "tombi" ]
indent = { tab-width = 2, unit = " " }

View File

@@ -0,0 +1 @@
; inherits: toml

View File

@@ -0,0 +1,9 @@
((comment) @injection.content
(#set! injection.language "comment"))
; https://github.com/cross-rs/cross/blob/main/docs/config_file.md
(pair
(bare_key) @_key (#eq? @_key "pre-build")
(array
(string) @injection.content)
(#set! injection.language "bash"))

View File

@@ -0,0 +1 @@
; inherits: toml

View File

@@ -0,0 +1 @@
; inherits: toml