Skip to content

Commit

Permalink
Add c-ts-mode to evil-jump-item c major modes
Browse files Browse the repository at this point in the history
Fixes #1908
  • Loading branch information
tomdl89 committed Jun 16, 2024
1 parent f29ad3c commit eddac6b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion evil-commands.el
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ and jump to the corresponding one."
((and (not (eolp)) (evil-looking-at-end-comment t))
(forward-comment -1))
((and
(memq major-mode '(c-mode c++-mode))
(memq major-mode '(c-mode c++-mode c-ts-mode))
(require 'hideif nil t)
(with-no-warnings
(let* ((hif-else-regexp (concat hif-cpp-prefix "\\(?:else\\|elif[ \t]+\\)"))
Expand Down

3 comments on commit eddac6b

@kvaneesh
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That works. Should c++-ts-mode also be added to that list?

@tomdl89
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kvaneesh assuming you are a C/C++ developer (which I'm not) you'll probably be much better placed to answer that than me. I'm happy to add it if you like. Just lemme know.

@kvaneesh
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding c++-ts-mode make it work with c++ mode too
(memq major-mode '(c-mode c++-mode c-ts-mode c++-ts-mode))

Please sign in to comment.