summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/regexp-opt.el
diff options
context:
space:
mode:
authorJuri Linkov <juri@linkov.net>2025-03-03 20:38:40 +0200
committerJuri Linkov <juri@linkov.net>2025-03-03 20:38:40 +0200
commitdbc0e5a52d855773a495e0ca89b738f8f2246df9 (patch)
tree54fd0d304e1e4ca470d1c17d7a6c375e8e4c0a1a /lisp/emacs-lisp/regexp-opt.el
parent10abb87f0519b3d53d6b7078703d3a0120e3aaa8 (diff)
downloademacs-dbc0e5a52d855773a495e0ca89b738f8f2246df9.tar.gz
emacs-dbc0e5a52d855773a495e0ca89b738f8f2246df9.tar.bz2
emacs-dbc0e5a52d855773a495e0ca89b738f8f2246df9.zip
Improve treesit settings for js-ts-mode (bug#73404)
* lisp/progmodes/js.el (js--treesit-font-lock-settings): Add 'class' alongside 'class_declaration'. (js--treesit-defun-name): Add "variable_declaration" alongside "lexical_declaration". (js--treesit-valid-imenu-entry): Add "variable_declaration" and provide the predicate to 'treesit-node-top-level'. (js--treesit-sentence-nodes): Add "jsx_attribute" like in html-ts-mode instead of jsx elements matched in 'js--treesit-list-nodes'. (js--treesit-list-nodes): Add "jsx_element" and "jsx_self_closing_element" instead of "_jsx_string". (js--treesit-simple-imenu-settings): Move "method_definition" to separate section "Method" from the "Class" section. Add "variable_declaration" to the "Variable" section. (js-ts-mode--outline-predicate): New variable. (js--treesit-defun-type-regexp): Add bos/eos. (js--treesit-jsdoc-comment-regexp): Add bos/eos. (js-ts-mode): Set treesit-outline-predicate to 'js-ts-mode--outline-predicate'. * lisp/textmodes/mhtml-ts-mode.el (mhtml-ts-mode--html-defun-name): Remove unused function. (mhtml-ts-mode): Use 'js-ts-mode--outline-predicate' in 'treesit-aggregated-outline-predicate'. * lisp/textmodes/yaml-ts-mode.el (yaml-ts-mode--outline-predicate): Use 'treesit-node-top-level' instead of 'treesit-parent-until'.
Diffstat (limited to 'lisp/emacs-lisp/regexp-opt.el')
0 files changed, 0 insertions, 0 deletions