Skip to content

Commit b718819

Browse files
committed
- fix imenu local variable
1 parent 44fc361 commit b718819

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

gdscript-ts-mode.el

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,11 @@ It must be a function with two arguments: TYPE and NAME.")
6565
"Return Imenu label for parent node using TYPE and NAME."
6666
(format "%s..." (gdscript-ts-imenu-format-item-label type name)))
6767

68+
(defun gdscript-ts-imenu-format-parent-item-jump-label (type _name)
69+
"Return Imenu label for parent node jump using TYPE and NAME."
70+
(if (string= type "class")
71+
"*class definition*"
72+
"*function definition*"))
6873

6974
;;; Keywords
7075

@@ -199,8 +204,8 @@ Similar to `gdscript-imenu-create-index' but use tree-sitter."
199204
(tree (treesit-induce-sparse-tree
200205
node
201206
(rx (or (seq bol
202-
(or "onready" "export" "")
203-
"_variable_statement"
207+
(or "onready_" "export_" "")
208+
"variable_statement"
204209
eol)
205210
(seq bol
206211
(or "function" "class")

0 commit comments

Comments
 (0)