You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
791 B
EmacsLisp

1 year ago
(use-package treesit
:if (ignore-errors (treesit-available-p))
:mode
((rx (literal ".") "rs" eos) . rust-ts-mode)
((rx (literal ".") "py" eos) . python-ts-mode)
((rx (literal ".") "sh" eos) . bash-ts-mode)
:interpreter
1 year ago
("python" . python-ts-mode)
("python3" . python-ts-mode)
("bash" . bash-ts-mode)
("sh" . bash-ts-mode)
("openrc-run" . bash-ts-mode))
1 year ago
(use-package rust-ts-mode
:requires treesit
:hook
(rust-ts-mode . (lambda ()
1 year ago
(when (require 'rust-mode nil t)
(add-hook 'before-save-hook 'rust-before-save-method nil t)
(add-hook 'after-save-hook 'rust-after-save-method nil t)
(use-local-map (make-composed-keymap (list rust-ts-mode-map rust-mode-map)))))))