Move the definition of treesitter grammars to the init block.
This commit is contained in:
parent
df75bf53e6
commit
c5cc2a36e1
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
(require 'lang-rust)
|
(require 'lang-rust)
|
||||||
|
|
||||||
;; (require 'lang-yaml)
|
(require 'lang-yaml)
|
||||||
|
|
||||||
;; (require 'lang-org)
|
;; (require 'lang-org)
|
||||||
|
|
||||||
|
@ -43,9 +43,9 @@
|
|||||||
)
|
)
|
||||||
:init
|
:init
|
||||||
(add-to-list 'major-mode-remap-alist '(rust-mode . rust-ts-mode))
|
(add-to-list 'major-mode-remap-alist '(rust-mode . rust-ts-mode))
|
||||||
:config
|
|
||||||
(add-to-list 'treesit-language-source-alist '(rust "https://github.com/tree-sitter/tree-sitter-rust"))
|
(add-to-list 'treesit-language-source-alist '(rust "https://github.com/tree-sitter/tree-sitter-rust"))
|
||||||
(treesit-install-language-grammar 'rust)
|
(treesit-install-language-grammar 'rust)
|
||||||
|
:config
|
||||||
;; Add keybindings for interacting with Cargo
|
;; Add keybindings for interacting with Cargo
|
||||||
(use-package cargo
|
(use-package cargo
|
||||||
:hook (rust-ts-mode . cargo-minor-mode))
|
:hook (rust-ts-mode . cargo-minor-mode))
|
||||||
|
@ -15,12 +15,12 @@
|
|||||||
|
|
||||||
(use-package yaml-mode
|
(use-package yaml-mode
|
||||||
:mode
|
:mode
|
||||||
(("playbook\\.tmp\\'" . yaml-mode)
|
(("playbook\\.tmp\\'" . yaml-ts-mode)
|
||||||
("environments/[^/]*/group_vars/[^/]*\\'" . yaml-mode)
|
("environments/[^/]*/group_vars/[^/]*\\'" . yaml-ts-mode)
|
||||||
("environments/[^/]*/host_vars/[^/]*\\'" . yaml-mode)
|
("environments/[^/]*/host_vars/[^/]*\\'" . yaml-ts-mode)
|
||||||
)
|
)
|
||||||
:hook (
|
:hook (
|
||||||
(yaml-mode . (lambda ()
|
(yaml-ts-mode . (lambda ()
|
||||||
(setq eglot-workspace-configuration
|
(setq eglot-workspace-configuration
|
||||||
(list (cons ':yaml (list ':hover :json-false :validate :json-false :completion t))))
|
(list (cons ':yaml (list ':hover :json-false :validate :json-false :completion t))))
|
||||||
(eglot-ensure)
|
(eglot-ensure)
|
||||||
@ -28,8 +28,12 @@
|
|||||||
))
|
))
|
||||||
)
|
)
|
||||||
;; :bind (
|
;; :bind (
|
||||||
;; (:map yaml-mode-map ([backspace] . yaml-backspace))
|
;; (:map yaml-ts-mode-map ([backspace] . yaml-backspace))
|
||||||
;; )
|
;; )
|
||||||
|
:init
|
||||||
|
(add-to-list 'major-mode-remap-alist '(yaml-mode . yaml-ts-mode))
|
||||||
|
(add-to-list 'treesit-language-source-alist '(yaml "https://github.com/ikatyang/tree-sitter-yaml"))
|
||||||
|
(treesit-install-language-grammar 'yaml)
|
||||||
)
|
)
|
||||||
|
|
||||||
(provide 'lang-yaml)
|
(provide 'lang-yaml)
|
||||||
|
Loading…
Reference in New Issue
Block a user