Replace web-mode with just eglot+treesitter
This commit is contained in:
parent
747af2548b
commit
5b58bd2839
39
init.el
39
init.el
|
@ -260,8 +260,18 @@
|
|||
(face-spec-set f new-spec))))
|
||||
(setcar (cdr (assq 'goggles-mode minor-mode-alist)) " O-O"))
|
||||
|
||||
(defun my--set-tab-width-2 ()
|
||||
(setq tab-width 2))
|
||||
|
||||
(use-package treesit
|
||||
:ensure nil
|
||||
:mode
|
||||
("\\.ts\\'" . typescript-ts-mode)
|
||||
("\\.tsx\\'" . tsx-ts-mode)
|
||||
("\\.rs\\'" . rust-ts-mode)
|
||||
:hook
|
||||
(typescript-ts-mode . my--set-tab-width-2)
|
||||
(tsx-ts-mode . my--set-tab-width-2)
|
||||
:init
|
||||
(add-to-list 'major-mode-remap-alist '(sh-mode . bash-ts-mode))
|
||||
(add-to-list 'major-mode-remap-alist '(css-mode . css-ts-mode))
|
||||
|
@ -343,6 +353,10 @@
|
|||
(java-ts-mode . eglot-ensure)
|
||||
(lua-mode . eglot-ensure)
|
||||
(nix-mode . eglot-ensure)
|
||||
(js-mode . eglot-ensure)
|
||||
(js-ts-mode . eglot-ensure)
|
||||
(typescript-ts-mode . eglot-ensure)
|
||||
(tsx-ts-mode . eglot-ensure)
|
||||
:custom
|
||||
(eglot-events-buffer-size 0)
|
||||
(eglot-autoshutdown t))
|
||||
|
@ -484,6 +498,7 @@
|
|||
(org-mode . my-inhibit-hl-line-mode)
|
||||
:custom
|
||||
(org-startup-indented t)
|
||||
(org-startup-with-inline-images t)
|
||||
(org-special-ctrl-a/e t)
|
||||
(org-insert-heading-respect-content t)
|
||||
(org-list-allow-alphabetical t)
|
||||
|
@ -581,13 +596,13 @@
|
|||
(with-eval-after-load 'meow
|
||||
(add-to-list 'meow-mode-state-list '(sldb-mode . motion))))
|
||||
|
||||
(use-package web-mode
|
||||
:mode ("\\.[jt]sx?\\'" . web-mode)
|
||||
:custom
|
||||
(web-mode-css-indent-offset 2)
|
||||
(web-mode-code-indent-offset 2)
|
||||
(web-mode-markup-indent-offset 2)
|
||||
:hook (web-mode . (lambda () (setq-local tab-width 2))))
|
||||
;; (use-package web-mode
|
||||
;; :mode ("\\.\\([jt]sx?\\|css\\)\\'" . web-mode)
|
||||
;; :custom
|
||||
;; (web-mode-css-indent-offset 2)
|
||||
;; (web-mode-code-indent-offset 2)
|
||||
;; (web-mode-markup-indent-offset 2)
|
||||
;; :hook (web-mode . (lambda () (setq-local tab-width 2))))
|
||||
|
||||
(use-package lua-mode
|
||||
:custom
|
||||
|
@ -602,6 +617,8 @@
|
|||
:custom
|
||||
(markdown-command '("pandoc" "--from=markdown" "--to=html5")))
|
||||
|
||||
(use-package csv-mode)
|
||||
|
||||
(use-package meson-mode)
|
||||
|
||||
(use-package spell-fu
|
||||
|
@ -898,6 +915,13 @@
|
|||
(with-eval-after-load 'meow
|
||||
(add-to-list 'meow-mode-state-list '(mu4e-view-mode . motion))))
|
||||
|
||||
(use-package org-msg
|
||||
:after message
|
||||
:demand t
|
||||
:custom
|
||||
(org-msg-convert-citation t)
|
||||
(org-msg-greeting-fmt "\nHi%s,\n\n"))
|
||||
|
||||
(use-package emacs-everywhere
|
||||
:ensure nil
|
||||
:commands emacs-everywhere
|
||||
|
@ -967,6 +991,7 @@
|
|||
sgml-basic-offset 4
|
||||
tab-width 4
|
||||
fill-column 80)
|
||||
;; Because python-mode sets tab-width to 8 for some reason
|
||||
(add-hook 'python-mode-hook (lambda () (setq tab-width 4)))
|
||||
|
||||
(column-number-mode)
|
||||
|
|
Loading…
Reference in a new issue