Subject: Wrong simple imenu definition for java

From: Benjamin Leis <[email-masked]>
Date: Sat, 27 Apr 2024 18:45:10 +0000

I noticed the treesitter imenu definitions for java in java-ts-mode.el have the following:

  ;; Imenu.
  (setq-local treesit-simple-imenu-settings
              '(("Class" \\`class_declaration\\'</%60class_declaration/'> nil nil)
                ("Interface" \\`interface_declaration\\'</%60interface_declaration/'> nil nil)
                ("Enum" \\`record_declaration\\'</%60record_declaration/'> nil nil)
                ("Method" \\`method_declaration\\'</%60method_declaration/'> nil nil)))
  (treesit-major-mode-setup))

  The 3rd definition for enums should either be for “Record” if that was the intention or match against \\`enum_declaration</%60enum_declaration>   if it really was meant for enums.

Ben