summary refs log tree commit diff
path: root/emacs/custom
diff options
context:
space:
mode:
Diffstat (limited to 'emacs/custom')
-rw-r--r--emacs/custom/my-prog.el9
1 files changed, 9 insertions, 0 deletions
diff --git a/emacs/custom/my-prog.el b/emacs/custom/my-prog.el
index 65faad2..b1a0403 100644
--- a/emacs/custom/my-prog.el
+++ b/emacs/custom/my-prog.el
@@ -4,6 +4,15 @@
 
 ;;; Code:
 
+(require 'tree-sitter)
+(require 'tree-sitter-langs)
+;; enable tree-sitter mode for all supported major modes
+(global-tree-sitter-mode)
+;; the minor mode tree-sitter-hl-mode provides the framework for syntax
+;; highlighting. It overrides the regex-based highlighting provided by
+;; font-lock-mode, using the syntax tree provided by tree-sitter-mode
+(add-hook 'tree-sitter-after-on-hook #'tree-sitter-hl-mode)
+
 (customize-set-variable 'Man-notify-method 'aggressive)
 (customize-set-variable 'Man-fontify-manpage-flag t)