[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
feature/tree-sitter f9f9b43df5 02/14: Minor change to tree-sitter imenu
From: |
Yuan Fu |
Subject: |
feature/tree-sitter f9f9b43df5 02/14: Minor change to tree-sitter imenu function of js-mode |
Date: |
Fri, 4 Nov 2022 13:19:09 -0400 (EDT) |
branch: feature/tree-sitter
commit f9f9b43df5bdadb54a1ba14e1624aa254d9f092d
Author: Yuan Fu <casouri@gmail.com>
Commit: Yuan Fu <casouri@gmail.com>
Minor change to tree-sitter imenu function of js-mode
If someone don’t like the labels, they can set them to empty strings.
* lisp/progmodes/js.el (js--treesit-imenu-type-alist): Add space.
(js--treesit-imenu-label): Remove space.
---
lisp/progmodes/js.el | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el
index c77c0fb90b..92a8599d7f 100644
--- a/lisp/progmodes/js.el
+++ b/lisp/progmodes/js.el
@@ -3620,10 +3620,10 @@ This function can be used as a value in
`which-func-functions'"
;; Keep this private since we might later change it or generalize it.
(defvar js--treesit-imenu-type-alist
- '((variable . "V")
- (function . "F")
- (class . "C")
- (method . "M"))
+ '((variable . "V ")
+ (function . "F ")
+ (class . "C ")
+ (method . "M "))
"Maps imenu label types to their \"symbol\".
Symbols are prefixed to each label in imenu (see
`js--treesit-imenu-label').")
@@ -3632,7 +3632,7 @@ Symbols are prefixed to each label in imenu (see
"Format label for imenu.
TYPE can be `variable', `function', `class', `method'.
NAME is a string."
- (format "%s %s" (alist-get type js--treesit-imenu-type-alist)
+ (format "%s%s" (alist-get type js--treesit-imenu-type-alist)
name))
(defun js--treesit-imenu-1 (node)
- feature/tree-sitter updated (9909652849 -> c924b6afb6), Yuan Fu, 2022/11/04
- feature/tree-sitter 5416ae5990 01/14: ; Update guides in /admin/notes/tree-sitter, Yuan Fu, 2022/11/04
- feature/tree-sitter c5f24f76eb 05/14: ; * src/treesit.c: Minor comment change., Yuan Fu, 2022/11/04
- feature/tree-sitter ce9e720413 13/14: ; Minor improvement in treesit-inspect-mode, Yuan Fu, 2022/11/04
- feature/tree-sitter 673a55780d 10/14: ; Remove unused tree-sitter functions, Yuan Fu, 2022/11/04
- feature/tree-sitter e0e3299c01 12/14: ; * lisp/treesit.el (treesit-update-ranges): Update all parsers., Yuan Fu, 2022/11/04
- feature/tree-sitter 784f53a215 11/14: ; Replace error with signal in treesit.el, Yuan Fu, 2022/11/04
- feature/tree-sitter c924b6afb6 14/14: ; * lisp/treesit.el (treesit-ready-p): Fix typo., Yuan Fu, 2022/11/04
- feature/tree-sitter e3663d0e9c 03/14: Add contextual tree-sitter font-lock to ts-mode and js-mode, Yuan Fu, 2022/11/04
- feature/tree-sitter f6dc55f516 07/14: ; * lisp/progmodes/js.el (js--fontify-template-string): Fix typo., Yuan Fu, 2022/11/04
- feature/tree-sitter f9f9b43df5 02/14: Minor change to tree-sitter imenu function of js-mode,
Yuan Fu <=
- feature/tree-sitter 8ad4c4009e 09/14: Add treesit-indent-error, Yuan Fu, 2022/11/04
- feature/tree-sitter b86deb617b 06/14: Fix treesit-parser-set-included-ranges, Yuan Fu, 2022/11/04
- feature/tree-sitter d9d66764e2 08/14: Revise tree-sitter facility for multi-language buffers, Yuan Fu, 2022/11/04
- feature/tree-sitter b028d4f7df 04/14: ; Tree-sitter: Don't refontify if entity contained in the region, Yuan Fu, 2022/11/04