Optimisations

This commit is contained in:
Curt Spark 2024-12-17 23:56:22 +00:00
parent 4cdf45b531
commit 49898f5744
1 changed files with 48 additions and 10 deletions

View File

@ -313,8 +313,19 @@ This greatly improves performance/startup time of emacs.
#+BEGIN_SRC emacs-lisp
(use-package gcmh
:ensure t
:config
(gcmh-mode 1))
:init
(gcmh-mode 1)
;; Ensure garbage collector does not run TOO frequently which causes random freezes
(defun gcmh-mode-optimisation-setup-hook ()
(setq gc-cons-threshold most-positive-fixnum))
(defun gcmh-mode-optimisation-exit-hook ()
(setq gc-cons-threshold 800000))
(add-hook 'minibuffer-setup-hook 'gcmh-mode-optimisation-setup-hook)
(add-hook 'minibuffer-exit-hook 'gcmh-mode-optimisation-exit-hook)
)
#+END_SRC
*** Doom Modeline
Tweaks to doom modeline
@ -340,6 +351,23 @@ Midnight mode will automatically clear up configured buffers or buffers that hav
(setq midnight-mode t)
#+END_SRC
*** Fontification
#+BEGIN_SRC emacs-lisp
(jit-lock-mode 1)
(setq jit-lock-stealth-time 1.25)
(setq jit-lock-stealth-nice 0.5) ;; Seconds between font locking.
(setq jit-lock-chunk-size 4096)
(setq jit-lock-defer-time 0)
(with-eval-after-load 'evil
(add-hook 'evil-insert-state-entry-hook
(lambda ()
(setq jit-lock-defer-time 0.25)) nil t)
(add-hook 'evil-insert-state-exit-hook
(lambda ()
(setq jit-lock-defer-time 0)) nil t))
#+END_SRC
** Eshell
*** Bash-like Completion
#+BEGIN_SRC emacs-lisp
@ -1217,7 +1245,7 @@ LSP Bridge is meant to be a super fast LSP integration.
(use-package lsp-bridge
:straight '(lsp-bridge :type git :host github :repo "manateelazycat/lsp-bridge"
:files (:defaults "*.el" "*.py" "acm" "core" "langserver" "multiserver" "resources")
:build (:not compile))
:build (:not compile)) ;; Do not compile lsp-bridge
:init
;; Automatically start the lsp_bridge.py process on the remote host (which needs to support bash) when opening a tramp file
(setq lsp-bridge-enable-log t)
@ -1227,11 +1255,17 @@ LSP Bridge is meant to be a super fast LSP integration.
;;(setq lsp-bridge-remote-python-file "~/.emacs.d/straight/repos/lsp-bridge/lsp_bridge.py")
(setq lsp-bridge-remote-log "~/.emacs.d/lbr_log.txt")
(setq lsp-bridge-diagnostic-fetch-idle 2)
(setq acm-enable-capf t)
(setq acm-enable-icon t)
(setq acm-enable-lsp-workspace-symbol t)
(setq acm-backend-search-file-words-enable-fuzzy-match t)
(setq acm-enable-yas t)
(setq acm-backend-lsp-candidate-min-length 1)
(setq acm-backend-elisp-candidate-min-length 1)
(setq acm-backend-yas-candidate-min-length 1)
(setq lsp-bridge-enable-org-babel t)
(setq acm-enable-doc-markdown-render 'async)
@ -1287,9 +1321,12 @@ Mingus is a frontend for GNU Emacs to the Music Player daemon. The interface clo
#+BEGIN_SRC emacs-lisp
(use-package mingus
:ensure t
:config
(define-key mingus-global-map (kbd "<XF86AudioRaiseVolume>") 'mingus-vol-up)
(define-key mingus-global-map (kbd "<XF86AudioLowerVolume>") 'mingus-vol-down)
)
(with-eval-after-load 'mingus
(define-key mingus-playlist-mode-map (kbd "<XF86AudioRaiseVolume>") 'mingus-vol-up)
(define-key mingus-playlist-mode-map (kbd "<XF86AudioLowerVolume>") 'mingus-vol-down)
(define-key mingus-playlist-mode-map (kbd "C-s") 'mingus-query)
)
#+END_SRC
@ -1344,10 +1381,11 @@ For more information on setup, you should check out `https://github.com/ch11ng/e
Install the package, enable it and ensure that it always is installed, and then configure:
*** EXWM
#+BEGIN_SRC emacs-lisp
(use-package exwm
:ensure t
:config
(exwm-enable))
(print "exwm reach")
(use-package exwm
:ensure t
:config
(exwm-enable))
#+END_SRC
**** Configuration
#+BEGIN_SRC emacs-lisp