aboutsummaryrefslogtreecommitdiffstats
path: root/queries/yaml
diff options
context:
space:
mode:
authorChristian Clason <c.clason@uni-graz.at>2023-06-12 09:54:30 -0600
committerChristian Clason <c.clason@uni-graz.at>2025-05-12 18:43:40 +0200
commit692b051b09935653befdb8f7ba8afdb640adf17b (patch)
tree167162b6b129ae04f68c5735078521a72917c742 /queries/yaml
parentfeat(c-family): inherit injections (diff)
downloadnvim-treesitter-692b051b09935653befdb8f7ba8afdb640adf17b.tar
nvim-treesitter-692b051b09935653befdb8f7ba8afdb640adf17b.tar.gz
nvim-treesitter-692b051b09935653befdb8f7ba8afdb640adf17b.tar.bz2
nvim-treesitter-692b051b09935653befdb8f7ba8afdb640adf17b.tar.lz
nvim-treesitter-692b051b09935653befdb8f7ba8afdb640adf17b.tar.xz
nvim-treesitter-692b051b09935653befdb8f7ba8afdb640adf17b.tar.zst
nvim-treesitter-692b051b09935653befdb8f7ba8afdb640adf17b.zip
feat!: drop modules, general refactor and cleanup
Diffstat (limited to 'queries/yaml')
-rw-r--r--queries/yaml/folds.scm4
-rw-r--r--queries/yaml/highlights.scm99
-rw-r--r--queries/yaml/indents.scm7
-rw-r--r--queries/yaml/injections.scm81
-rw-r--r--queries/yaml/locals.scm9
5 files changed, 0 insertions, 200 deletions
diff --git a/queries/yaml/folds.scm b/queries/yaml/folds.scm
deleted file mode 100644
index c426afb87..000000000
--- a/queries/yaml/folds.scm
+++ /dev/null
@@ -1,4 +0,0 @@
-[
- (block_mapping_pair)
- (block_sequence_item)
-] @fold
diff --git a/queries/yaml/highlights.scm b/queries/yaml/highlights.scm
deleted file mode 100644
index 9aed59ce4..000000000
--- a/queries/yaml/highlights.scm
+++ /dev/null
@@ -1,99 +0,0 @@
-(boolean_scalar) @boolean
-
-(null_scalar) @constant.builtin
-
-(double_quote_scalar) @string
-
-(single_quote_scalar) @string
-
-((block_scalar) @string
- (#set! priority 99))
-
-(string_scalar) @string
-
-(escape_sequence) @string.escape
-
-(integer_scalar) @number
-
-(float_scalar) @number
-
-(comment) @comment @spell
-
-[
- (anchor_name)
- (alias_name)
-] @label
-
-(tag) @type
-
-[
- (yaml_directive)
- (tag_directive)
- (reserved_directive)
-] @keyword.directive
-
-(block_mapping_pair
- key: (flow_node
- [
- (double_quote_scalar)
- (single_quote_scalar)
- ] @property))
-
-(block_mapping_pair
- key: (flow_node
- (plain_scalar
- (string_scalar) @property)))
-
-(flow_mapping
- (_
- key: (flow_node
- [
- (double_quote_scalar)
- (single_quote_scalar)
- ] @property)))
-
-(flow_mapping
- (_
- key: (flow_node
- (plain_scalar
- (string_scalar) @property))))
-
-[
- ","
- "-"
- ":"
- ">"
- "?"
- "|"
-] @punctuation.delimiter
-
-[
- "["
- "]"
- "{"
- "}"
-] @punctuation.bracket
-
-[
- "*"
- "&"
- "---"
- "..."
-] @punctuation.special
-
-; help deal with for yaml's norway problem https://www.bram.us/2022/01/11/yaml-the-norway-problem/
-; only using `true` and `false`, since Treesitter parser targets YAML spec 1.2 https://github.com/nvim-treesitter/nvim-treesitter/pull/7512#issuecomment-2565397302
-(block_mapping_pair
- value: (block_node
- (block_sequence
- (block_sequence_item
- (flow_node
- (plain_scalar
- (string_scalar) @boolean
- (#any-of? @boolean "TRUE" "FALSE" "True" "False")))))))
-
-(block_mapping_pair
- value: (flow_node
- (plain_scalar
- (string_scalar) @boolean
- (#any-of? @boolean "TRUE" "FALSE" "True" "False"))))
diff --git a/queries/yaml/indents.scm b/queries/yaml/indents.scm
deleted file mode 100644
index f7146d316..000000000
--- a/queries/yaml/indents.scm
+++ /dev/null
@@ -1,7 +0,0 @@
-[
- (block_mapping_pair
- value: (block_node))
- (block_sequence_item)
-] @indent.begin
-
-(ERROR) @indent.auto
diff --git a/queries/yaml/injections.scm b/queries/yaml/injections.scm
deleted file mode 100644
index 143af1924..000000000
--- a/queries/yaml/injections.scm
+++ /dev/null
@@ -1,81 +0,0 @@
-((comment) @injection.content
- (#set! injection.language "comment"))
-
-; Github actions ("run") / Gitlab CI ("scripts")
-; Taskfile scripts ("cmds", "cmd", "sh")
-(block_mapping_pair
- key: (flow_node) @_run
- (#any-of? @_run "run" "script" "before_script" "after_script" "cmds" "cmd" "sh")
- value: (flow_node
- (plain_scalar
- (string_scalar) @injection.content)
- (#set! injection.language "bash")))
-
-(block_mapping_pair
- key: (flow_node) @_run
- (#any-of? @_run "run" "script" "before_script" "after_script" "cmds" "cmd" "sh")
- value: (block_node
- (block_scalar) @injection.content
- (#set! injection.language "bash")
- (#offset! @injection.content 0 1 0 0)))
-
-(block_mapping_pair
- key: (flow_node) @_run
- (#any-of? @_run "run" "script" "before_script" "after_script" "cmds" "sh")
- value: (block_node
- (block_sequence
- (block_sequence_item
- (flow_node
- (plain_scalar
- (string_scalar) @injection.content))
- (#set! injection.language "bash")))))
-
-(block_mapping_pair
- key: (flow_node) @_run
- (#any-of? @_run "script" "before_script" "after_script" "cmds" "sh")
- value: (block_node
- (block_sequence
- (block_sequence_item
- (block_node
- (block_scalar) @injection.content
- (#set! injection.language "bash")
- (#offset! @injection.content 0 1 0 0))))))
-
-; Prometheus Alertmanager ("expr")
-(block_mapping_pair
- key: (flow_node) @_expr
- (#eq? @_expr "expr")
- value: (flow_node
- (plain_scalar
- (string_scalar) @injection.content)
- (#set! injection.language "promql")))
-
-(block_mapping_pair
- key: (flow_node) @_expr
- (#eq? @_expr "expr")
- value: (block_node
- (block_scalar) @injection.content
- (#set! injection.language "promql")
- (#offset! @injection.content 0 1 0 0)))
-
-(block_mapping_pair
- key: (flow_node) @_expr
- (#eq? @_expr "expr")
- value: (block_node
- (block_sequence
- (block_sequence_item
- (flow_node
- (plain_scalar
- (string_scalar) @injection.content))
- (#set! injection.language "promql")))))
-
-(block_mapping_pair
- key: (flow_node) @_expr
- (#eq? @_expr "expr")
- value: (block_node
- (block_sequence
- (block_sequence_item
- (block_node
- (block_scalar) @injection.content
- (#set! injection.language "promql")
- (#offset! @injection.content 0 1 0 0))))))
diff --git a/queries/yaml/locals.scm b/queries/yaml/locals.scm
deleted file mode 100644
index f7c79e082..000000000
--- a/queries/yaml/locals.scm
+++ /dev/null
@@ -1,9 +0,0 @@
-[
- (stream)
- (document)
- (block_node)
-] @local.scope
-
-(anchor_name) @local.definition
-
-(alias_name) @local.reference