Actually use treesit modes
This commit is contained in:
parent
af2fc95ee3
commit
910628a012
25
init.el
25
init.el
|
@ -188,6 +188,17 @@
|
||||||
|
|
||||||
(use-package treesit
|
(use-package treesit
|
||||||
:ensure nil
|
:ensure nil
|
||||||
|
:init
|
||||||
|
(add-to-list 'major-mode-remap-alist '(sh-mode . bash-ts-mode))
|
||||||
|
(add-to-list 'major-mode-remap-alist '(css-mode . css-ts-mode))
|
||||||
|
(add-to-list 'major-mode-remap-alist '(c-mode . c-ts-mode))
|
||||||
|
(add-to-list 'major-mode-remap-alist '(c++-mode . c++-ts-mode))
|
||||||
|
(add-to-list 'major-mode-remap-alist '(csharp-mode . csharp-ts-mode))
|
||||||
|
(add-to-list 'major-mode-remap-alist '(java-mode . java-ts-mode))
|
||||||
|
(add-to-list 'major-mode-remap-alist '(python-mode . python-ts-mode))
|
||||||
|
(add-to-list 'major-mode-remap-alist '(ruby-mode . ruby-ts-mode))
|
||||||
|
(add-to-list 'major-mode-remap-alist '(js-mode . js-ts-mode))
|
||||||
|
(add-to-list 'major-mode-remap-alist '(js-json-mode . json-ts-mode))
|
||||||
:custom
|
:custom
|
||||||
(treesit-extra-load-path `(,(expand-file-name "tree-sitter-module/dist/"
|
(treesit-extra-load-path `(,(expand-file-name "tree-sitter-module/dist/"
|
||||||
user-emacs-directory))))
|
user-emacs-directory))))
|
||||||
|
@ -199,6 +210,7 @@
|
||||||
|
|
||||||
(use-package aggressive-indent
|
(use-package aggressive-indent
|
||||||
:hook (lispyville-mode
|
:hook (lispyville-mode
|
||||||
|
nix-mode
|
||||||
org-mode))
|
org-mode))
|
||||||
|
|
||||||
(use-package rainbow-delimiters
|
(use-package rainbow-delimiters
|
||||||
|
@ -275,7 +287,7 @@
|
||||||
(dirvish-override-dired-mode))
|
(dirvish-override-dired-mode))
|
||||||
|
|
||||||
(use-package pdf-tools
|
(use-package pdf-tools
|
||||||
:mode (("\\.pdf\\'" . pdf-view-mode))
|
:mode ("\\.pdf\\'" . pdf-view-mode)
|
||||||
:config
|
:config
|
||||||
(pdf-tools-install))
|
(pdf-tools-install))
|
||||||
|
|
||||||
|
@ -286,7 +298,7 @@
|
||||||
(buffer-face-mode))
|
(buffer-face-mode))
|
||||||
|
|
||||||
(use-package org
|
(use-package org
|
||||||
:mode (("\\.org$" . org-mode))
|
:mode ("\\.org$" . org-mode)
|
||||||
:hook ((org-mode . org-indent-mode)
|
:hook ((org-mode . org-indent-mode)
|
||||||
(org-mode . flyspell-mode)
|
(org-mode . flyspell-mode)
|
||||||
(org-mode . auto-fill-mode)
|
(org-mode . auto-fill-mode)
|
||||||
|
@ -317,11 +329,11 @@
|
||||||
:config
|
:config
|
||||||
(editorconfig-mode))
|
(editorconfig-mode))
|
||||||
|
|
||||||
(use-package json-mode
|
|
||||||
:mode "\\.js\\(?:on\\|[hl]int\\(?:rc\\)?\\)\\'")
|
|
||||||
|
|
||||||
(use-package nix-mode
|
(use-package nix-mode
|
||||||
:mode "\\.nix'")
|
:mode "\\.nix'"
|
||||||
|
:hook (nix-mode . (lambda ()
|
||||||
|
(with-eval-after-load 'evil
|
||||||
|
(setq-local evil-shift-width 2)))))
|
||||||
|
|
||||||
(use-package markdown-mode
|
(use-package markdown-mode
|
||||||
:mode ("README\\.md\\'" . gfm-mode)
|
:mode ("README\\.md\\'" . gfm-mode)
|
||||||
|
@ -495,6 +507,7 @@
|
||||||
(add-to-list 'after-make-frame-functions #'frame-make-detect-term)
|
(add-to-list 'after-make-frame-functions #'frame-make-detect-term)
|
||||||
|
|
||||||
(add-to-list 'auto-mode-alist '("\\.yuck\\'" . lisp-mode))
|
(add-to-list 'auto-mode-alist '("\\.yuck\\'" . lisp-mode))
|
||||||
|
(add-to-list 'auto-mode-alist '("flake\\.lock\\'" . js-json-mode))
|
||||||
|
|
||||||
(with-current-buffer "*scratch*"
|
(with-current-buffer "*scratch*"
|
||||||
(cd "~/"))
|
(cd "~/"))
|
||||||
|
|
Loading…
Reference in a new issue