Further housekeeping, bring the initial load down to under 1500 ms
Some checks failed
/ Test config on 20 (push) Failing after 53s

Make the editor load faster by deferring as much as possible until
later use. For example, LSP load is now deferred until first use and
no longer blocking.

Use only elixir-format from elixir-mode, for similar speed
reasons. The rest of the package has been taken over by the treesitter
version of the mode.
This commit is contained in:
Maciej 2025-01-05 08:04:24 +02:00
parent 3ffb484fd8
commit b0361861b4
Signed by: maciej
GPG key ID: 41D62D42D3B0D765
13 changed files with 297 additions and 328 deletions

View file

@ -9,17 +9,12 @@
(declare-function lsp "lsp-mode" nil)
(declare-function column-enforce-n "column-enforce-mode" (number))
;; Elixir mode is used for formatting through elixir-format function,
;; so it needs to be loaded without deferring. One it is, we can
;; make it so that treesit takes over.
(use-package elixir-mode :ensure t
:config
(add-to-list 'auto-mode-alist '("\\.exs\\'" . elixir-ts-mode))
(add-to-list 'auto-mode-alist '("\\.ex\\'" . elixir-ts-mode)))
;; Only load the elixir-format from elixir mode.
(use-package elixir-format :defer t
:ensure (:type git :host github :repo "elixir-editors/emacs-elixir" :files ("elixir-format.el")))
(use-package elixir-ts-mode :ensure t
:after (elixir-mode lsp-mode lsp-ui)
:defer t)
(use-package elixir-ts-mode :ensure t :defer t
:after (elixir-format lsp-mode lsp-ui))
(transient-define-prefix icejam-elixir-lang-menu ()
"Elixir Buffer Commands."

View file

@ -8,7 +8,7 @@
;; a warning from the byte compiler.
(declare-function elpaca-installed-p "elpaca")
(unless (elpaca-installed-p 'markdown-mode)
(use-package markdown-mode :ensure t))
(use-package markdown-mode :ensure t :defer t))
(with-eval-after-load 'markdown-mode
(setq-default markdown-command "pandoc"))