fixed ts-mode usage and use-package for file-mode associations

removed treesit-auto for now. didn't work and wasn't necessary,
biggest problem is knowing there's a ts version and fetching
it. otherwise, built in major-mode-remap-alist seems to be fine
This commit is contained in:
2026-08-19 23:20:36 +02:00
parent 8b769c72fa
commit 3693081e32
3 changed files with 38 additions and 22 deletions
+6 -15
View File
@@ -1,14 +1,5 @@
;; Tree-sitter & LSP tweaks (Core transformative changes)
(use-package treesit-auto
:functions global-treesit-auto-mode
:config
(treesit-auto-add-to-auto-mode-alist 'all)
:hook (after-init . global-treesit-auto-mode)
:custom
(treesit-auto-install 'prompt)
)
(use-package treesit-fold
:defer t
:commands (treesit-fold-close
@@ -27,7 +18,8 @@
(set-face-attribute 'treesit-fold-replacement-face nil
:foreground "#808080"
:box nil
:weight 'bold))
:weight 'bold)
)
;; Tree-sitter hooks
(dolist (hook '(c-ts-mode-hook c++-ts-mode-hook java-ts-mode-hook rust-ts-mode-hook go-ts-mode-hook ruby-ts-mode-hook js-ts-mode-hook typescript-ts-mode-hook tsx-ts-mode-hook css-ts-mode-hook html-ts-mode-hook bash-ts-mode-hook cmake-ts-mode-hook dockerfile-ts-mode-hook json-ts-mode-hook toml-ts-mode-hook yaml-ts-mode-hook))
@@ -43,9 +35,8 @@
(defvar my/lsp-mode-hooks
'(c-mode-hook
c++-mode-hook
c-ts-mode-hook
;List of major mode hooks to enable LSP.
'(c-ts-mode-hook
c++-ts-mode-hook
typescript-ts-mode-hook
js-ts-mode-hook
@@ -53,8 +44,8 @@
arduino-mode-hook
toml-ts-mode-hook
json-ts-mode-hook
python-mode-hook)
"List of major mode hooks to enable LSP.")
python-ts-mode-hook)
)
(dolist (hook my/lsp-mode-hooks)
(add-hook hook #'lsp-deferred))