Skip to content

Commit

Permalink
add a note about syncing up hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
renzmann committed Jan 24, 2023
1 parent 8c4abf0 commit 1a12641
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions README.org
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,18 @@ this:
:after (lambda (&rest _r) (treesit-auto-apply-remap)))
#+end_src

** Keep track of your hooks

This package does not modify any of your major mode hooks. That is, if you have
functions in =python-mode-hook=, but not in =python-ts-mode-hook=, then your hook
from =python-mode= will not be applied, assuming =python-ts-mode= is what gets
loaded. For major modes in which this is a concern, the current recommendation
is to address this as part of your configuration.

#+begin_src emacs-lisp
(setq python-ts-mode-hook python-mode-hook)
#+end_src

** Full example

This is how I configure =treesit-auto= for my own personal use.
Expand Down

0 comments on commit 1a12641

Please sign in to comment.