mirror of
https://github.com/jimeh/.emacs.d.git
synced 2026-02-19 13:46:41 +00:00
fix(language/toml): switch back to conf-toml-mode from toml-ts-mode
toml-ts-mode seems to have severe performance issues on larger files spanning hundreds of lines. So let's switch back to conf-toml-mode again, for now at least.
This commit is contained in:
@@ -23,7 +23,8 @@
|
||||
:custom
|
||||
(prettier-js-command "prettier-pnp")
|
||||
(prettier-js-args '("--quiet"
|
||||
"--pnp" "@prettier/plugin-php"))
|
||||
"--pnp" "@prettier/plugin-php"
|
||||
"--pnp" "prettier-plugin-toml"))
|
||||
|
||||
:preface
|
||||
(defun siren-prettier-js-mode-enable ()
|
||||
|
||||
@@ -23,9 +23,9 @@
|
||||
(if (fboundp 'toml-ts-mode)
|
||||
(use-package toml-ts-mode
|
||||
:straight (:type built-in)
|
||||
;; TODO: Revisit toml-ts-mode at some point the future. It's a bit buggy
|
||||
;; at the moment.
|
||||
:mode "\\.toml\\'" "Cargo\\.lock\\'"
|
||||
;;; TODO: Revisit toml-ts-mode at some point the future. Performance is
|
||||
;;; exceptionally bad on larger files of a few hundred lines.
|
||||
;; :mode "\\.toml\\'" "Cargo\\.lock\\'"
|
||||
|
||||
:hook
|
||||
(toml-ts-mode . siren-toml-mode-setup)
|
||||
@@ -39,14 +39,18 @@
|
||||
(use-package lsp-toml
|
||||
:straight lsp-mode
|
||||
:hook
|
||||
(toml-mode . siren-lsp-lua-mode-setup)
|
||||
(conf-toml-mode . siren-lsp-lua-mode-setup)
|
||||
(toml-ts-mode . siren-lsp-lua-mode-setup)
|
||||
|
||||
:preface
|
||||
(defun siren-lsp-lua-mode-setup ()
|
||||
;; Disable semantic tokens as it typically causes an annoying delay with the
|
||||
;; syntax highlighting as you type. Essentially all new text is a very faded
|
||||
;; out grey color for the first 1-2 seconds as you type.
|
||||
(setq-local lsp-semantic-tokens-enable nil)
|
||||
|
||||
(lsp-format-buffer-on-save-mode t)
|
||||
(lsp-deferred))
|
||||
)
|
||||
(lsp-deferred)))
|
||||
|
||||
(provide 'siren-toml)
|
||||
;;; siren-toml.el ends here
|
||||
|
||||
Reference in New Issue
Block a user