From 1ad731c6779c661096276b40c2a045f8475fade3 Mon Sep 17 00:00:00 2001 From: Jim Myhrberg Date: Thu, 1 Dec 2022 21:25:40 +0000 Subject: [PATCH] chore(language/yaml): update tree-sitter-langs to get highlight queries for yaml --- modules/languages/siren-yaml.el | 36 --------------------------------- straight/versions/default.el | 2 +- 2 files changed, 1 insertion(+), 37 deletions(-) diff --git a/modules/languages/siren-yaml.el b/modules/languages/siren-yaml.el index fa88c78..98a12c7 100644 --- a/modules/languages/siren-yaml.el +++ b/modules/languages/siren-yaml.el @@ -20,46 +20,10 @@ (yaml-mode . siren-yaml-mode-setup) :preface - ;; Manually set full tree-sitter highlight queries for yaml-mode. This is a - ;; temporary workaround until this PR is merged: - ;; https://github.com/emacs-tree-sitter/tree-sitter-langs/pull/134 - (defun siren-yaml-mode-tree-sitter-setup () - (setq-local tree-sitter-hl-default-patterns - [;; keys - (block_mapping_pair - key: (flow_node [(double_quote_scalar) (single_quote_scalar)] @variable)) - (block_mapping_pair - key: (flow_node (plain_scalar (string_scalar) @variable))) - - ;; keys within inline {} blocks - (flow_mapping - (_ key: (flow_node [(double_quote_scalar) (single_quote_scalar)] @variable))) - (flow_mapping - (_ key: (flow_node (plain_scalar (string_scalar) @variable)))) - - ["[" "]" "{" "}"] @punctuation.bracket - ["," "-" ":" "?" ">" "|"] @punctuation.delimiter - ["*" "&" "---" "..."] @punctuation.special - - [(null_scalar) (boolean_scalar)] @constant.builtin - [(integer_scalar) (float_scalar)] @number - [(double_quote_scalar) (single_quote_scalar) (block_scalar)] @string - (escape_sequence) @escape - - (comment) @comment - [(anchor_name) (alias_name)] @function - (yaml_directive) @type - - (tag) @type - (tag_handle) @type - (tag_prefix) @string - (tag_directive) @property ])) - (defun siren-yaml-mode-setup () (run-hooks 'prog-mode-hook) (setq-local tab-width 2) - (siren-yaml-mode-tree-sitter-setup) (tree-sitter-mode t) (subword-mode t))) diff --git a/straight/versions/default.el b/straight/versions/default.el index cd31e42..0c56d6e 100644 --- a/straight/versions/default.el +++ b/straight/versions/default.el @@ -214,7 +214,7 @@ ("themes" . "b5ff201f4bea4286e9ed015a2043cf2394182232") ("tide" . "4cf6a0d89da7f946565a425a632ee2410a40c7da") ("transient" . "79d1426de173312bd6a3091731675bb010d804ec") - ("tree-sitter-langs" . "8a33fd0ae8c4f9ee15fb5062c0d1199ebc1def09") + ("tree-sitter-langs" . "bf125472c185f098136b26b30d5e74332b4ee46b") ("treemacs" . "b19060f25e55514f3d798d9f5af2dcd5b94a6026") ("treepy.el" . "de1a2ddc3fd7152d0bfbd9e14312ff8a4864ab2b") ("typescript.el" . "17d06bdf938281cf7cd9157189966a2fdfd4f62b")