Random JS changes

This commit is contained in:
Alexander Rosenberg 2024-12-25 19:06:19 -08:00
parent ed237a2e03
commit 459705d05a
Signed by: Zander671
GPG Key ID: 5FD0394ADBD72730

31
init.el
View File

@ -187,18 +187,18 @@
(blueprint "https://github.com/huanie/tree-sitter-blueprint")
(kdl "https://github.com/tree-sitter-grammars/tree-sitter-kdl")))
;; Tree sitter major mode conversions
(setq major-mode-remap-alist
'((c-mode . c-ts-mode)
(c++-mode . c++-ts-mode)
(c-or-c++-mode . c-or-c++-ts-mode)
(python-mode . python-ts-mode)
(java-mode . java-ts-mode)
(rust-mode . rust-ts-mode)
(json-mode . json-ts-mode)
(yaml-mode . yaml-ts-mode)
(css-mode . css-ts-mode)
(js-mode . js-ts-mode)
(cmake-mode . cmake-ts-mode)))
(dolist (ent '((c-mode . c-ts-mode)
(c++-mode . c++-ts-mode)
(c-or-c++-mode . c-or-c++-ts-mode)
(python-mode . python-ts-mode)
(java-mode . java-ts-mode)
(rust-mode . rust-ts-mode)
(json-mode . json-ts-mode)
(yaml-mode . yaml-ts-mode)
(css-mode . css-ts-mode)
(javascript-mode . js-ts-mode)
(cmake-mode . cmake-ts-mode)))
(add-to-list 'major-mode-remap-alist ent))
(defun my/treesit-compile-all (force)
"Compile all the modules defined in `treesit-language-source-alist'.
If FORCE, recompile all modules, even ones that are already compiled.
@ -1642,6 +1642,11 @@ otherwise, call `bibtex-find-text'."
(add-to-list 'eglot-server-programs
'(web-mode . ("vscode-html-language-server" "--stdio"))))
;; JavaScript
(use-package js
:ensure nil
:hook (js-ts-mode . eglot-ensure))
;; Polymode
(use-package polymode
:config
@ -2694,7 +2699,7 @@ one of the normal rainbow-delimiters-depth-N-face faces."
:hook (dired-mode . my/-maybe-enable-nerd-icons-dired)
:init
(defun my/-maybe-enable-nerd-icons-dired ()
(unless (bound-and-true-p dirvish--this)
(unless (bound-and-true-p dirvish-override-dired-mode)
(nerd-icons-dired-mode))))
(use-package kind-icon
:after corfu