summary refs log tree commit diff stats
path: root/user
diff options
context:
space:
mode:
Diffstat (limited to 'user')
-rw-r--r--user/emacs/init.el20
-rw-r--r--user/settings/emacs.nix3
2 files changed, 23 insertions, 0 deletions
diff --git a/user/emacs/init.el b/user/emacs/init.el
index 21dc2499..c6c37467 100644
--- a/user/emacs/init.el
+++ b/user/emacs/init.el
@@ -910,6 +910,26 @@ _p_rev       _u_pper              _=_: upper/lower       _r_esolve
   :config (progn
             (setq treemacs-no-png-images t)))
 
+(use-package tree-sitter
+  :ghook ('(sh-mode-hook
+            c-mode-common-hook
+            css-mode-hook
+            go-mode-hook
+            html-mode-hook
+            nix-mode-hook
+            js-mode-hook
+            js2-mode-hook
+            json-mode-hook
+            typescript-mode-hook
+            python-mode-hook
+            rustic-mode-hook))
+  :ghook 'tree-sitter-after-on-hook #'tree-sitter-hl-mode)
+(use-package tree-sitter-langs
+  :after tree-sitter)
+
+(use-package tree-sitter-indent
+  :ghook ('(rustic-mode-hook)))
+
 (use-package lsp-mode
   :defer 2
   :general (:states 'normal :keymaps 'lsp-mode-map
diff --git a/user/settings/emacs.nix b/user/settings/emacs.nix
index 9d32af43..43fead37 100644
--- a/user/settings/emacs.nix
+++ b/user/settings/emacs.nix
@@ -169,6 +169,9 @@ in
       swiper
       tide
       toml-mode
+      tree-sitter
+      tree-sitter-langs
+      tree-sitter-indent
       typescript-mode
       undo-tree
       use-package