summaryrefslogtreecommitdiff
path: root/emacs
diff options
context:
space:
mode:
Diffstat (limited to 'emacs')
-rw-r--r--emacs40
1 files changed, 26 insertions, 14 deletions
diff --git a/emacs b/emacs
index 331c58c..caf60f3 100644
--- a/emacs
+++ b/emacs
@@ -277,10 +277,26 @@
:ensure t
:defer t)
-(use-package treesit
- :init
- (setq treesit-extra-load-path '("~/.guix-home/profile/lib/tree-sitter")))
-
+(use-package treesit)
+
+(setq treesit-language-source-alist
+ '((bash "https://github.com/tree-sitter/tree-sitter-bash")
+ (cmake "https://github.com/uyha/tree-sitter-cmake")
+ (css "https://github.com/tree-sitter/tree-sitter-css")
+ (elisp "https://github.com/Wilfred/tree-sitter-elisp")
+ (go "https://github.com/tree-sitter/tree-sitter-go")
+ (html "https://github.com/tree-sitter/tree-sitter-html")
+ (javascript "https://github.com/tree-sitter/tree-sitter-javascript" "master" "src")
+ (json "https://github.com/tree-sitter/tree-sitter-json")
+ (make "https://github.com/alemuller/tree-sitter-make")
+ (markdown "https://github.com/ikatyang/tree-sitter-markdown")
+ (python "https://github.com/tree-sitter/tree-sitter-python")
+ (toml "https://github.com/tree-sitter/tree-sitter-toml")
+ (tsx "https://github.com/tree-sitter/tree-sitter-typescript" "master" "tsx/src")
+ (typescript "https://github.com/tree-sitter/tree-sitter-typescript" "master" "typescript/src")
+ (yaml "https://github.com/ikatyang/tree-sitter-yaml")))
+
+
;; Project
(bind-key "C-x p s" 'eat-project)
@@ -331,11 +347,13 @@
(add-hook 'terraform-mode-hook 'my-terraform-mode-init))
(add-hook 'terraform-mode-hook 'eglot-ensure)
+(unless (package-installed-p 'typescript-mode)
+ (package-install 'typescript-mode))
-(add-to-list 'auto-mode-alist '("\\.ts\\'" . typescript-ts-mode))
+(add-to-list 'auto-mode-alist '("\\.ts\\'" . typescript-mode))
(add-to-list 'auto-mode-alist '("\\.tsx\\'" . tsx-ts-mode))
(add-to-list 'auto-mode-alist '("\\.tf\\'" . terraform-mode))
-(add-to-list 'auto-mode-alist '("\\.json\\'" . json-ts-mode))
+(add-to-list 'auto-mode-alist '("\\.json\\'" . json-mode))
(add-to-list 'auto-mode-alist '("\\.ml\\'" . tuareg-mode))
(add-to-list 'auto-mode-alist '("\\.mli\\'" . tuareg-mode))
@@ -368,9 +386,9 @@
(unless (package-installed-p 'smartparens)
(package-install 'smartparens))
-(add-hook 'typescript-ts-mode-hook 'prettier-js-mode)
+(add-hook 'typescript-mode-hook 'prettier-js-mode)
(add-hook 'tsx-ts-mode 'prettier-js-mode)
-(add-hook 'typescript-ts-mode-hook #'smartparens-mode)
+(add-hook 'typescript-mode-hook #'smartparens-mode)
(add-hook 'json-ts-mode-hook #'smartparens-mode)
(add-hook 'tuareg-mode-hook #'smartparens-mode)
(add-hook 'terraform-mode-hook #'smartparens-mode)
@@ -585,12 +603,6 @@
-;; Auto dim buffers
-(unless (package-installed-p 'auto-dim-other-buffers)
- (package-install 'auto-dim-other-buffers))
-
-(auto-dim-other-buffers-mode)
-
;; Keybindings
(defvar marc-minor-mode-map (make-keymap) "marc-minor-mode keymap.")
(define-key marc-minor-mode-map (kbd "C-c C-k") 'eldoc)