diff options
| -rw-r--r-- | queries/yaml/highlights.scm | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/queries/yaml/highlights.scm b/queries/yaml/highlights.scm index d41068359..9aed59ce4 100644 --- a/queries/yaml/highlights.scm +++ b/queries/yaml/highlights.scm @@ -80,3 +80,20 @@ "---" "..." ] @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")))) |
