Skip to content

Commit

Permalink
set up rjsx-mode using evil-matchit 4.0.0 feature
Browse files Browse the repository at this point in the history
  • Loading branch information
Chen Bin committed Dec 5, 2024
1 parent fbbed37 commit a6b1a51
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lisp/init-evil.el
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,14 @@ COUNT, BEG, END, TYPE is used. If INCLUSIVE is t, the text object is inclusive.
(forward-line 1)
(evil-search search t t (point))))

(with-eval-after-load 'rjsx-mode
(my-ensure 'evil-matchit)
(when (functionp 'evilmi-add-one-plugin-rule)
(defun my-rjsx-jump-tag ()
(when (string-match "</?>" (string-trim (evilmi-sdk-curline)))
(rjsx-jump-tag)))
(evilmi-add-one-plugin-rule #'rjsx-mode #'my-rjsx-jump-tag)))

;; "gd" or `evil-goto-definition' now use `imenu', `xref' first,
;; BEFORE searching string from `point-min'.
;; xref part is annoying because I already use `counsel-etags' to search tag.
Expand Down

0 comments on commit a6b1a51

Please sign in to comment.