diff options
author | Marc Coquand <marc@mccd.space> | 2024-05-07 07:20:11 -0500 |
---|---|---|
committer | Marc Coquand <marc@mccd.space> | 2024-05-07 07:20:11 -0500 |
commit | e667015ece8befadd4f319581198de5cf1b1f53d (patch) | |
tree | 14b21c0c71bc31a9969194a62376d13bbaef7830 /emacs | |
parent | f18d938cc3ca393c9a369eeb1ca732aa923df434 (diff) | |
download | rcm-e667015ece8befadd4f319581198de5cf1b1f53d.tar.gz rcm-e667015ece8befadd4f319581198de5cf1b1f53d.tar.bz2 rcm-e667015ece8befadd4f319581198de5cf1b1f53d.zip |
Emacs
Diffstat (limited to 'emacs')
-rw-r--r-- | emacs | 40 |
1 files changed, 26 insertions, 14 deletions
@@ -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) |