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