Improved emacs load time

This commit is contained in:
Random936 2023-09-24 20:23:31 -07:00
parent eeb1f21ad0
commit fe4262ae6a
2 changed files with 53 additions and 40 deletions

View File

@ -134,6 +134,7 @@ Install use package for easier installation of other packages.
(require 'use-package) (require 'use-package)
(setq use-package-always-ensure t) (setq use-package-always-ensure t)
(setq use-package-compute-statistics t)
#+end_src #+end_src
Fixes path issue that occurs on mac. Fixes path issue that occurs on mac.
@ -154,8 +155,8 @@ This is a list of installed packages not included in any other category.
Command Log Mode creates a window that logs all commands and corresponding keybindings. Command Log Mode creates a window that logs all commands and corresponding keybindings.
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package command-log-mode (use-package command-log-mode
:defer :defer t
:config (global-command-log-mode)) :config (global-command-log-mode))
#+end_src #+end_src
@ -164,7 +165,8 @@ Command Log Mode creates a window that logs all commands and corresponding keybi
*Magit* adds several features to Emacs that make using git easier. *Magit* adds several features to Emacs that make using git easier.
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package magit) (use-package magit
:defer t)
#+end_src #+end_src
*** Helpful *** Helpful

View File

@ -5,7 +5,8 @@ This will include any language server packages and configuration.
** HTML ** HTML
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package web-mode (use-package web-mode
:defer t
:mode "\\.html\\'" :mode "\\.html\\'"
:hook (web-mode . lsp-deferred)) :hook (web-mode . lsp-deferred))
#+end_src #+end_src
@ -13,7 +14,8 @@ This will include any language server packages and configuration.
** JavaScript/Typescript ** JavaScript/Typescript
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package typescript-mode (use-package typescript-mode
:defer t
:mode ("\\.ts\\'" "\\.js\\'") :mode ("\\.ts\\'" "\\.js\\'")
:hook (typescript-mode . lsp-deferred)) :hook (typescript-mode . lsp-deferred))
#+end_src #+end_src
@ -27,7 +29,8 @@ Install the ~typescript-language-server~ through npm.
** Python ** Python
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package python-mode (use-package python-mode
:defer t
:mode ("\\.py\\'") :mode ("\\.py\\'")
:hook (python-mode . lsp-deferred)) :hook (python-mode . lsp-deferred))
#+end_src #+end_src
@ -41,7 +44,8 @@ Install the ~python-lsp-server~ though pip.
** C/C++ ** C/C++
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package ccls (use-package ccls
:defer t
:hook ((c-mode cc-mode c++-mode objc-mode cuda-mode) . :hook ((c-mode cc-mode c++-mode objc-mode cuda-mode) .
(lambda () (require 'ccls) (lsp))) (lambda () (require 'ccls) (lsp)))
:config :config
@ -57,35 +61,40 @@ Install ~ccls~ with homebrew using the following command.
** Golang ** Golang
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package go-mode (use-package go-mode
:defer t
:hook (go-mode . lsp-deferred)) :hook (go-mode . lsp-deferred))
#+end_src #+end_src
** Rust ** Rust
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package rustic (use-package rustic
:defer t
:hook (rust-mode . lsp-deferred)) :hook (rust-mode . lsp-deferred))
#+end_src #+end_src
** C# ** C#
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package csharp-mode (use-package csharp-mode
:defer t
:hook (csharp-mode . lsp-deferred)) :hook (csharp-mode . lsp-deferred))
#+end_src #+end_src
** JSON ** JSON
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package json-mode (use-package json-mode
:defer t
:hook (json-mode . lsp-deferred)) :hook (json-mode . lsp-deferred))
#+end_src #+end_src
** Yaml ** Yaml
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package yaml-mode (use-package yaml-mode
:defer t
:hook (yaml-mode . lsp-deferred)) :hook (yaml-mode . lsp-deferred))
#+end_src #+end_src
@ -94,7 +103,8 @@ Install ~ccls~ with homebrew using the following command.
To install the corresponding LSP, you need to install ~yls~. Using the command ~pip install -U yls-yara~. Keep in mind that ~yls~ is dependent on an up to date version of ~yara-python~. To install the corresponding LSP, you need to install ~yls~. Using the command ~pip install -U yls-yara~. Keep in mind that ~yls~ is dependent on an up to date version of ~yara-python~.
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package yara-mode (use-package yara-mode
:defer t
:hook (yara-mode . lsp-deferred) :hook (yara-mode . lsp-deferred)
:config :config
(with-eval-after-load 'lsp-mode (with-eval-after-load 'lsp-mode
@ -110,6 +120,7 @@ To install the corresponding LSP, you need to install ~yls~. Using the command ~
** R ** R
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package ess (use-package ess
:defer t
:hook (R-mode . lsp-deferred)) :hook (R-mode . lsp-deferred))
#+end_src #+end_src