mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-05 22:20:24 -08:00
Add the treesit 'list' thing to csharp/go/php/rust-ts-mode (bug#73404)
* lisp/progmodes/csharp-mode.el (csharp-ts-mode): Add the 'list' and 'sentence' things to 'treesit-thing-settings'. Set 'treesit-outline-predicate'. * lisp/progmodes/go-ts-mode.el (go-ts-mode): Add 'treesit-thing-settings' with the 'list' and 'sentence' things. * lisp/progmodes/php-ts-mode.el (php-ts-mode): Add the 'list' thing to 'treesit-thing-settings'. * lisp/progmodes/rust-ts-mode.el (rust-ts-mode): Add 'treesit-thing-settings' with the 'list' thing.
This commit is contained in:
parent
4f4105e622
commit
f3925732bc
4 changed files with 143 additions and 0 deletions
|
|
@ -290,6 +290,25 @@
|
|||
"type_declaration")))
|
||||
(setq-local treesit-defun-name-function #'go-ts-mode--defun-name)
|
||||
|
||||
(setq-local treesit-thing-settings
|
||||
`((go
|
||||
(list
|
||||
,(rx bos (or "import_spec_list"
|
||||
"var_spec_list"
|
||||
"type_parameter_list"
|
||||
"parameter_list"
|
||||
"parenthesized_type"
|
||||
"type_arguments"
|
||||
"field_declaration_list"
|
||||
"block"
|
||||
"parenthesized_expression"
|
||||
"special_argument_list"
|
||||
"argument_list"
|
||||
"literal_value")
|
||||
eos))
|
||||
(sentence
|
||||
(or "declaration" "statement")))))
|
||||
|
||||
;; Imenu.
|
||||
(setq-local treesit-simple-imenu-settings
|
||||
`(("Function" "\\`function_declaration\\'" nil nil)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue