Move the major mode remap for treesitter into the use-package block.

This commit is contained in:
Tom Alexander 2023-05-27 11:53:27 -04:00
parent 68bd5818ae
commit 0eb5a8cc2b
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE
2 changed files with 13 additions and 13 deletions

View File

@ -24,8 +24,6 @@
)
)
(add-to-list 'major-mode-remap-alist '(rust-mode . rust-ts-mode))
(use-package rust-mode
:pin nongnu
:mode "\\.rs\\'"
@ -43,6 +41,8 @@
(add-hook 'before-save-hook 'eglot-format-buffer nil 'local)
))
)
:init
(add-to-list 'major-mode-remap-alist '(rust-mode . rust-ts-mode))
:config
(treesit-install-language-grammar 'rust)
;; Add keybindings for interacting with Cargo

View File

@ -1,11 +1,11 @@
(defun yaml-backspace (arg)
"Special handling of yaml backspace."
(interactive "*p")
(if mark-active
(backward-delete-char-untabify arg)
(yaml-electric-backspace arg)
)
)
;; (defun yaml-backspace (arg)
;; "Special handling of yaml backspace."
;; (interactive "*p")
;; (if mark-active
;; (backward-delete-char-untabify arg)
;; (yaml-electric-backspace arg)
;; )
;; )
(defun yaml-format-buffer ()
"Run prettier."
@ -27,9 +27,9 @@
(add-hook 'before-save-hook 'yaml-format-buffer nil 'local)
))
)
:bind (
(:map yaml-mode-map ([backspace] . yaml-backspace))
)
;; :bind (
;; (:map yaml-mode-map ([backspace] . yaml-backspace))
;; )
)
(provide 'lang-yaml)