Move the major mode remap for treesitter into the use-package block.
This commit is contained in:
parent
68bd5818ae
commit
0eb5a8cc2b
@ -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
|
||||||
|
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user