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)
(setq use-package-always-ensure t)
(setq use-package-compute-statistics t)
#+end_src
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.
#+begin_src emacs-lisp
(use-package command-log-mode
:defer
(use-package command-log-mode
:defer t
:config (global-command-log-mode))
#+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.
#+begin_src emacs-lisp
(use-package magit)
(use-package magit
:defer t)
#+end_src
*** Helpful

View File

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