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

View File

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