diff options
Diffstat (limited to '')
-rw-r--r-- | emacs/custom/my-prog.el | 10 | ||||
-rw-r--r-- | emacs/custom/my-tree-sitter.el | 21 | ||||
-rw-r--r-- | emacs/init.el | 1 |
3 files changed, 22 insertions, 10 deletions
diff --git a/emacs/custom/my-prog.el b/emacs/custom/my-prog.el index c4865a5..578207c 100644 --- a/emacs/custom/my-prog.el +++ b/emacs/custom/my-prog.el @@ -3,16 +3,6 @@ ;;; Commentary: ;;; 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) diff --git a/emacs/custom/my-tree-sitter.el b/emacs/custom/my-tree-sitter.el new file mode 100644 index 0000000..d19362e --- /dev/null +++ b/emacs/custom/my-tree-sitter.el @@ -0,0 +1,21 @@ +;;; my-tree-sitter.el --- configure emacs for tree-sitter -*- lexical-binding: t -*- +;; Author: Franck Cuny <franck@fcuny.net> + +;;; Commentary: + +;;; 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) + +(provide 'my-tree-sitter) + +;;; my-tree-sitter.el ends here diff --git a/emacs/init.el b/emacs/init.el index 0a4b12a..910bae5 100644 --- a/emacs/init.el +++ b/emacs/init.el @@ -49,6 +49,7 @@ (require 'my-tramp) (require 'my-elfeed) +(require 'my-tree-sitter) (require 'my-lsp) (require 'my-lang-go) (require 'my-lang-python) |