Set treesit to fontify all elements instead of default subset

Change python-mode-hook to use python-base-mode-hook

Copy rust and python hooks to TS equivalents
This commit is contained in:
Evie Litherland-Smith 2023-12-31 09:03:20 +00:00
parent 2c72d80a5e
commit baf19ac4d5

View file

@ -687,15 +687,27 @@ For reference information, see [[https://orgmode.com][Org-mode website]]
:ensure t :ensure t
:hook (prog-mode)) :hook (prog-mode))
(use-package treesit-auto
:config (global-treesit-auto-mode +1))
(use-package direnv (use-package direnv
:ensure t :ensure t
:custom (direnv-always-show-summary nil) :custom (direnv-always-show-summary nil)
:config (direnv-mode +1)) :config (direnv-mode +1))
#+END_SRC #+END_SRC
** Tree-sitter
Set treesit to fontify all elements, default was 3 (out of 4)
#+begin_src emacs-lisp
(use-package treesit
:custom
(treesit-font-lock-level 4))
(use-package treesit-auto
:config (global-treesit-auto-mode +1))
(setq rust-ts-mode-hook rust-mode-hook)
(setq python-ts-mode-hook python-mode-hook)
#+end_src
** Eldoc ** Eldoc
#+begin_src emacs-lisp :tangle yes #+begin_src emacs-lisp :tangle yes
(use-package eldoc (use-package eldoc
@ -962,7 +974,7 @@ Set fill column to 88 and enable display in python buffers
(set-fill-column col) (set-fill-column col)
(display-fill-column-indicator-mode +1)) (display-fill-column-indicator-mode +1))
(add-hook 'python-mode-hook (lambda () (my/enable-fill-column 88))) (add-hook 'python-base-mode-hook (lambda () (my/enable-fill-column 88)))
#+end_src #+end_src
* Internet * Internet