Major refactor & optimization of how modules load their packages
Now that we are loading package autoloads files (as part of the generated doom-package-autoload-file when running make autoloads), many :commands properties are redundant. In fact, many def-package! blocks are redundant. In some cases, we can do without a config.el file entirely, and can move into the autoloads file or rely entirely on package autoloads. Also, many settings have been moved in their module's autoloads files, which makes them available ASAP; their use no longer depends on module load order. This gained me a modest ~10% boost in startup speed.
This commit is contained in:
parent
6a140209b8
commit
09cb4f6716
93 changed files with 644 additions and 846 deletions
|
@ -1,17 +1,16 @@
|
|||
;;; lang/csharp/config.el -*- lexical-binding: t; -*-
|
||||
|
||||
(def-package! csharp-mode :mode "\\.cs$")
|
||||
|
||||
(def-package! shader-mode :mode "\\.shader$") ; unity shaders
|
||||
(add-to-list 'auto-mode-alist '("\\.shader$" . shader-mode)) ; unity shaders
|
||||
|
||||
|
||||
(def-package! omnisharp
|
||||
:after csharp-mode
|
||||
:hook (csharp-mode . omnisharp-mode)
|
||||
:commands omnisharp-install-server
|
||||
:preface
|
||||
(setq omnisharp-auto-complete-want-documentation nil
|
||||
omnisharp-cache-directory (concat doom-cache-dir "omnisharp"))
|
||||
:config
|
||||
(add-hook! csharp-mode #'(flycheck-mode omnisharp-mode))
|
||||
(add-hook 'csharp-mode-hook #'flycheck-mode)
|
||||
|
||||
(defun +csharp|cleanup-omnisharp-server ()
|
||||
"Clean up the omnisharp server once you kill the last csharp-mode buffer."
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue