commit 11ef490807df5c74db98e1143bbe99ba6bff2e81
parent 9451c289d1b2344f80bd72c6b30c7d121c16745b
Author: Vincent Demeester <vincent@sbr.pm>
Date: Wed, 5 Jun 2024 10:46:35 +0200
tools/emacs: trying out combobulate/dev…
… and refactor a bit treesitter modes.
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Diffstat:
4 files changed, 30 insertions(+), 30 deletions(-)
diff --git a/tools/emacs/config/programming-config.el b/tools/emacs/config/programming-config.el
@@ -7,10 +7,10 @@
"Where all my sources are.")
(set-register ?s `(file . ,src-dir))
-(use-package yaml-mode
+(use-package yaml-ts-mode
:mode "\\.ya?ml\\'"
- :hook ((yaml-mode . highlight-indentation-mode)
- (yaml-mode . highlight-indentation-current-column-mode)))
+ :hook ((yaml-ts-mode . highlight-indentation-mode)
+ (yaml-ts-mode . highlight-indentation-current-column-mode)))
(use-package conf-mode
:mode ("\\.to?ml\\'" . conf-toml-mode))
diff --git a/tools/emacs/config/programming-go.el b/tools/emacs/config/programming-go.el
@@ -30,9 +30,10 @@
(replace-regexp-in-string " " "_" testrunname)))))
(go-test--go-test (concat "-run " gotest "\\$ .")))))
-(use-package go-mode
- :hook
- (go-mode . go-ts-mode-hook))
+(use-package go-ts-mode
+ :mode (("\\.go$" . go-ts-mode)
+ ("\\.go" . go-ts-mode)
+ ("\\.go\\'" . go-ts-mode)))
(provide 'programming-go)
;;; programming-go.el ends here
diff --git a/tools/emacs/config/programming-nix.el b/tools/emacs/config/programming-nix.el
@@ -4,7 +4,6 @@
;;; Code:
(use-package nix-ts-mode
:if *nix*
- :after (lsp)
:mode ("\\.nix\\'" "\\.nix.in\\'"))
(use-package nix-drv-mode
diff --git a/tools/emacs/config/programming-treesitter.el b/tools/emacs/config/programming-treesitter.el
@@ -8,31 +8,31 @@
(setq treesit-auto-install 'prompt)
(global-treesit-auto-mode))
-(use-package treesit
+(unless (package-installed-p 'combobulate)
+ (package-vc-install '(combobulate :url "https://github.com/mickeynp/combobulate"
+ :branch "development")))
+
+(use-package combobulate
+ :load-path "~/.config/emacs/elpa/combobulate"
:config
- (use-package combobulate
- :preface
- (unless (package-installed-p 'combobulate)
- (package-vc-install '(combobulate :url "https://github.com/mickeynp/combobulate"
- :branch "development")))
- ;; You can customize Combobulate's key prefix here.
- ;; Note that you may have to restart Emacs for this to take effect!
- (setq combobulate-key-prefix "C-c o")
+ ;; You can customize Combobulate's key prefix here.
+ ;; Note that you may have to restart Emacs for this to take effect!
+ (setq combobulate-key-prefix "C-c o")
- ;; Optional, but recommended.
- ;;
- ;; You can manually enable Combobulate with `M-x
- ;; combobulate-mode'.
- :hook
- ((python-ts-mode . combobulate-mode)
- (js-ts-mode . combobulate-mode)
- (html-ts-mode . combobulate-mode)
- (css-ts-mode . combobulate-mode)
- (yaml-ts-mode . combobulate-mode)
- (typescript-ts-mode . combobulate-mode)
- (json-ts-mode . combobulate-mode)
- (tsx-ts-mode . combobulate-mode)
- (go-ts-mode . combobulate-mode))))
+ ;; Optional, but recommended.
+ ;;
+ ;; You can manually enable Combobulate with `M-x
+ ;; combobulate-mode'.
+ :hook
+ (python-ts-mode . combobulate-mode)
+ (js-ts-mode . combobulate-mode)
+ (html-ts-mode . combobulate-mode)
+ (css-ts-mode . combobulate-mode)
+ (yaml-ts-mode . combobulate-mode)
+ (typescript-ts-mode . combobulate-mode)
+ (json-ts-mode . combobulate-mode)
+ (tsx-ts-mode . combobulate-mode)
+ (go-ts-mode . combobulate-mode))
(provide 'programming-treesitter)
;;; programming-treesitter.el ends here