refactor(:lang): remove redudant mode-alist lines

Amend: 3b58741522
This commit is contained in:
Henrik Lissner
2025-08-30 09:58:12 +02:00
parent 2870697e1a
commit ab4dace692
4 changed files with 2 additions and 14 deletions

View File

@@ -27,9 +27,6 @@
:init
(set-tree-sitter! 'json-mode 'json-ts-mode 'json)
:config
;; HACK: Rely on `major-mode-remap-defaults'.
(cl-callf2 assq-delete-all 'json-ts-mode auto-mode-alist)
(when (modulep! +lsp)
(add-hook 'json-ts-mode-local-vars-hook #'lsp! 'append)))

View File

@@ -40,11 +40,7 @@
(when (modulep! +lsp)
(add-hook 'lua-ts-mode-local-vars-hook #'lsp! 'append)
(when (modulep! :tools lsp +eglot)
(set-eglot-client! 'lua-ts-mode (+lua-generate-lsp-server-command))))
;; HACK: Get rid of redundancies, rely on `major-mode-remap-defaults'
(cl-callf2 delete '("\\.lua\\'" . lua-ts-mode) auto-mode-alist)
(cl-callf2 delete '("\\<lua\\(?:jit\\)?" . lua-ts-mode) interpreter-mode-alist))
(set-eglot-client! 'lua-ts-mode (+lua-generate-lsp-server-command)))))
(use-package! moonscript

View File

@@ -131,9 +131,7 @@ capture, the end position, and the output buffer.")
:when (fboundp 'markdown-ts-mode)
:defer t
:init
(set-tree-sitter! 'markdown-mode 'markdown-ts-mode '(markdown markdown-inline))
:config
(cl-callf2 delete '("\\.md\\'" . markdown-ts-mode) auto-mode-alist))
(set-tree-sitter! 'markdown-mode 'markdown-ts-mode '(markdown markdown-inline)))
(use-package! evil-markdown

View File

@@ -68,9 +68,6 @@
(setq-hook! 'scala-ts-mode-hook lsp-enable-indentation nil)
(add-hook 'scala-ts-mode-local-vars-hook #'lsp! 'append))
;; HACK: Rely on `major-mode-remap-defaults'.
(cl-callf2 assq-delete-all 'scala-ts-mode auto-mode-alist)
(+scala-common-config 'scala-ts-mode))