More emacs performance
This commit is contained in:
@@ -3,6 +3,11 @@
|
|||||||
# path
|
# path
|
||||||
export PATH=$PATH:$HOME/scripts:$HOME/.cargo/bin:$HOME/.cabal/bin:$HOME/.ghcup/bin:$HOME/.local/bin
|
export PATH=$PATH:$HOME/scripts:$HOME/.cargo/bin:$HOME/.cabal/bin:$HOME/.ghcup/bin:$HOME/.local/bin
|
||||||
|
|
||||||
|
# ssh
|
||||||
|
if [ -f ~/.ssh/agent.env ] ; then
|
||||||
|
. ~/.ssh/agent.env > /dev/null
|
||||||
|
fi
|
||||||
|
|
||||||
# editor
|
# editor
|
||||||
export EDITOR="vim"
|
export EDITOR="vim"
|
||||||
export VISIAL=${EDITOR}
|
export VISIAL=${EDITOR}
|
||||||
@@ -17,9 +22,6 @@ export SDL_IM_MODULE='fcitx'
|
|||||||
export XMODIFIERS='@im=fcitx'
|
export XMODIFIERS='@im=fcitx'
|
||||||
export WINIT_UNIX_BACKEND=x11
|
export WINIT_UNIX_BACKEND=x11
|
||||||
|
|
||||||
# university wants me to use intellij, but dwm rightfully hates it
|
|
||||||
export _JAVA_AWT_WM_NONREPARENTING=1
|
|
||||||
|
|
||||||
# gtk and qt theme - requires https://github.com/hargonix/Pop-gruvbox/ in ~/.themes
|
# gtk and qt theme - requires https://github.com/hargonix/Pop-gruvbox/ in ~/.themes
|
||||||
export GTK2_RC_FILES="$HOME/.gtkrc-2.0"
|
export GTK2_RC_FILES="$HOME/.gtkrc-2.0"
|
||||||
export GTK_THEME=Pop-gruvbox:light
|
export GTK_THEME=Pop-gruvbox:light
|
||||||
|
|||||||
@@ -6,7 +6,6 @@
|
|||||||
;
|
;
|
||||||
; ~ M. Thomas
|
; ~ M. Thomas
|
||||||
|
|
||||||
;; Initial optimization blob, mostly taken from doom emacs
|
|
||||||
(let ((file-name-handler-alist nil))
|
(let ((file-name-handler-alist nil))
|
||||||
|
|
||||||
;; Set the gc threshold high initially so the init.el can just be
|
;; Set the gc threshold high initially so the init.el can just be
|
||||||
@@ -17,8 +16,7 @@
|
|||||||
;; Lower the gc threshold again afterwards
|
;; Lower the gc threshold again afterwards
|
||||||
(add-hook 'emacs-startup-hook
|
(add-hook 'emacs-startup-hook
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(setq gc-cons-threshold (* 32 1024 1024)
|
(setq gc-cons-threshold (* 32 1024 1024))))
|
||||||
gc-cons-percentage 0.1)))
|
|
||||||
|
|
||||||
;; This is important for e.g. lsp mode
|
;; This is important for e.g. lsp mode
|
||||||
(setq read-process-output-max (* 3 1024 1024))
|
(setq read-process-output-max (* 3 1024 1024))
|
||||||
@@ -68,10 +66,10 @@
|
|||||||
; default font
|
; default font
|
||||||
(set-face-attribute 'default nil :font "SFMono Nerd Font Mono" :height 140)
|
(set-face-attribute 'default nil :font "SFMono Nerd Font Mono" :height 140)
|
||||||
; more fonts
|
; more fonts
|
||||||
(set-fontset-font t 'unicode "Source Code Pro" nil 'prepend)
|
;(set-fontset-font t 'unicode "Source Code Pro" nil 'prepend)
|
||||||
(set-fontset-font t 'unicode "Noto Color Emoji" nil 'append)
|
;(set-fontset-font t 'unicode "Noto Color Emoji" nil 'append)
|
||||||
; fonts for daemon
|
;; fonts for daemon
|
||||||
(add-to-list 'default-frame-alist '(font . "SFMono Nerd Font Mono"))
|
;(add-to-list 'default-frame-alist '(font . "SFMono Nerd Font Mono"))
|
||||||
|
|
||||||
;; Make ESC quit prompts
|
;; Make ESC quit prompts
|
||||||
(global-set-key (kbd "<escape>") 'keyboard-escape-quit)
|
(global-set-key (kbd "<escape>") 'keyboard-escape-quit)
|
||||||
@@ -97,6 +95,7 @@
|
|||||||
(setq whitespace-style '(face trailing tabs tab-mark))
|
(setq whitespace-style '(face trailing tabs tab-mark))
|
||||||
|
|
||||||
;; straight.el bootstrap
|
;; straight.el bootstrap
|
||||||
|
(setq straight-check-for-modifications 'live)
|
||||||
(defvar bootstrap-version)
|
(defvar bootstrap-version)
|
||||||
(let ((bootstrap-file
|
(let ((bootstrap-file
|
||||||
(expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory))
|
(expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory))
|
||||||
@@ -119,15 +118,15 @@
|
|||||||
|
|
||||||
;; Copy environment
|
;; Copy environment
|
||||||
(use-package exec-path-from-shell
|
(use-package exec-path-from-shell
|
||||||
:straight t)
|
:straight t
|
||||||
|
:config
|
||||||
(exec-path-from-shell-copy-env "SSH_AGENT_PID")
|
(setq exec-path-from-shell-arguments '("-l"))
|
||||||
(exec-path-from-shell-copy-env "SSH_AUTH_SOCK")
|
(exec-path-from-shell-copy-envs '("PATH" "SSH_AGENT_PID" "SSH_AUTH_SOCK")))
|
||||||
(exec-path-from-shell-copy-env "PATH")
|
|
||||||
|
|
||||||
;; Spellchecker
|
;; Spellchecker
|
||||||
(if (executable-find "hunspell")
|
|
||||||
(use-package ispell
|
(use-package ispell
|
||||||
|
:straight t
|
||||||
|
:if (executable-find "hunspell")
|
||||||
:config
|
:config
|
||||||
(setq ispell-program-name "hunspell"
|
(setq ispell-program-name "hunspell"
|
||||||
ispell-dictionary "de_DE,en_GB,en_US")
|
ispell-dictionary "de_DE,en_GB,en_US")
|
||||||
@@ -136,7 +135,7 @@
|
|||||||
:hook
|
:hook
|
||||||
(org-mode . flyspell-mode)
|
(org-mode . flyspell-mode)
|
||||||
(markdown-mode . flyspell-mode)
|
(markdown-mode . flyspell-mode)
|
||||||
(text-mode . flyspell-mode)))
|
(text-mode . flyspell-mode))
|
||||||
|
|
||||||
;; Themes and icons
|
;; Themes and icons
|
||||||
(use-package doom-themes
|
(use-package doom-themes
|
||||||
@@ -245,8 +244,8 @@
|
|||||||
(evil-mode))
|
(evil-mode))
|
||||||
|
|
||||||
(use-package evil-collection
|
(use-package evil-collection
|
||||||
:after evil
|
|
||||||
:straight t
|
:straight t
|
||||||
|
:after evil
|
||||||
:config
|
:config
|
||||||
(evil-collection-init))
|
(evil-collection-init))
|
||||||
|
|
||||||
@@ -304,6 +303,10 @@
|
|||||||
'("pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f"
|
'("pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f"
|
||||||
"pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f"
|
"pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f"
|
||||||
"pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f"))
|
"pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f"))
|
||||||
|
(org-babel-do-load-languages 'org-babel-load-languages '((python . t)
|
||||||
|
(shell . t)
|
||||||
|
(C . t)
|
||||||
|
(dot . t)))
|
||||||
:init
|
:init
|
||||||
(setq org-todo-keywords '((sequence "TODO" "PROGRESS" "|" "DONE"))
|
(setq org-todo-keywords '((sequence "TODO" "PROGRESS" "|" "DONE"))
|
||||||
org-log-done 'time
|
org-log-done 'time
|
||||||
@@ -313,17 +316,6 @@
|
|||||||
("p" "Personal" entry (file "~/org/personal.org") "* TODO %?\n")))
|
("p" "Personal" entry (file "~/org/personal.org") "* TODO %?\n")))
|
||||||
org-edit-src-content-indentation 0))
|
org-edit-src-content-indentation 0))
|
||||||
|
|
||||||
;; enable languages for inline evaluation
|
|
||||||
(org-babel-do-load-languages
|
|
||||||
'org-babel-load-languages '((python . t)
|
|
||||||
(shell . t)
|
|
||||||
(C . t)
|
|
||||||
(dot . t)))
|
|
||||||
; don't ask me every time!
|
|
||||||
(defun my-org-confirm-babel-evaluate (lang body)
|
|
||||||
(not (member lang '("python" "shell" "C" "dot"))))
|
|
||||||
(setq org-confirm-babel-evaluate 'my-org-confirm-babel-evaluate)
|
|
||||||
|
|
||||||
;; fancy bullets for org
|
;; fancy bullets for org
|
||||||
(use-package org-bullets
|
(use-package org-bullets
|
||||||
:straight t
|
:straight t
|
||||||
@@ -432,23 +424,19 @@
|
|||||||
(use-package company-box
|
(use-package company-box
|
||||||
:straight t
|
:straight t
|
||||||
:config
|
:config
|
||||||
(setq company-box-doc-delay 2.0)
|
(setq company-box-doc-delay 2.0
|
||||||
|
company-box-max-candidates 10)
|
||||||
:hook
|
:hook
|
||||||
(company-mode . company-box-mode))
|
(company-mode . company-box-mode))
|
||||||
|
|
||||||
;; project support
|
;; project support
|
||||||
(use-package projectile
|
(use-package projectile
|
||||||
:straight t
|
:straight t
|
||||||
|
:after lsp
|
||||||
:config
|
:config
|
||||||
(setq projectile-completion-system 'ivy)
|
(setq projectile-completion-system 'ivy)
|
||||||
(projectile-mode +1))
|
(projectile-mode +1))
|
||||||
|
|
||||||
;; ui for projectline
|
|
||||||
(use-package counsel-projectile
|
|
||||||
:straight t
|
|
||||||
:init
|
|
||||||
(define-key projectile-mode-map (kbd "M-p") 'projectile-command-map))
|
|
||||||
|
|
||||||
;; snippet support
|
;; snippet support
|
||||||
(defun company-mode/backend-with-yas (backend)
|
(defun company-mode/backend-with-yas (backend)
|
||||||
(if (and (listp backend) (member 'company-yasnippet backend))
|
(if (and (listp backend) (member 'company-yasnippet backend))
|
||||||
@@ -471,11 +459,13 @@
|
|||||||
(use-package yasnippet-snippets
|
(use-package yasnippet-snippets
|
||||||
:straight (yasnippet-snippets :type git :host github :repo "AndreaCrotti/yasnippet-snippets"
|
:straight (yasnippet-snippets :type git :host github :repo "AndreaCrotti/yasnippet-snippets"
|
||||||
:fork (:host github
|
:fork (:host github
|
||||||
:repo "crammk/yasnippet-snippets")))
|
:repo "crammk/yasnippet-snippets"))
|
||||||
|
:after yasnippet)
|
||||||
|
|
||||||
;; compiling for lsp
|
;; compiling for lsp
|
||||||
(use-package flycheck
|
(use-package flycheck
|
||||||
:straight t)
|
:straight t
|
||||||
|
:after lsp)
|
||||||
|
|
||||||
;; rust
|
;; rust
|
||||||
(use-package rust-mode
|
(use-package rust-mode
|
||||||
@@ -536,6 +526,7 @@
|
|||||||
;; Java
|
;; Java
|
||||||
(use-package lsp-java
|
(use-package lsp-java
|
||||||
:straight t
|
:straight t
|
||||||
|
:after lsp
|
||||||
:config
|
:config
|
||||||
(setq lsp-java-format-on-type-enabled nil))
|
(setq lsp-java-format-on-type-enabled nil))
|
||||||
|
|
||||||
@@ -553,6 +544,7 @@
|
|||||||
|
|
||||||
(use-package lsp-haskell
|
(use-package lsp-haskell
|
||||||
:straight t
|
:straight t
|
||||||
|
:after lsp
|
||||||
:hook
|
:hook
|
||||||
(haskell-mode . lsp)
|
(haskell-mode . lsp)
|
||||||
(haskell-literate-mode . lsp))
|
(haskell-literate-mode . lsp))
|
||||||
@@ -579,6 +571,4 @@
|
|||||||
(message "Loading ~/.emacs.d/local.el")
|
(message "Loading ~/.emacs.d/local.el")
|
||||||
(load-file "~/.emacs.d/local.el"))
|
(load-file "~/.emacs.d/local.el"))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
) ;; close performance let
|
) ;; close performance let
|
||||||
|
|||||||
Reference in New Issue
Block a user