feat(emacs): performance & ligatures

This commit is contained in:
Pavel Korytov 2021-01-22 21:00:24 +03:00
parent 29f9d3ee07
commit 63ebaff53c
2 changed files with 61 additions and 6 deletions

View file

@ -71,7 +71,7 @@
#+end_src
*** Performance
#+begin_src emacs-lisp
(setq gc-cons-threshold 8000000)
(setq gc-cons-threshold 80000000)
(setq read-process-output-max (* 1024 1024))
#+end_src
* Keybindings
@ -170,7 +170,7 @@ then it takes a second \\[keyboard-quit] to abort the minibuffer."
(use-package evil-collection
:straight t
:config
(evil-collection-init '(eww dired company vterm flycheck profiler cider)))
(evil-collection-init '(eww dired company vterm flycheck profiler cider explain-pause-mode)))
(use-package evil-quickscope
:straight t
@ -964,7 +964,7 @@ then it takes a second \\[keyboard-quit] to abort the minibuffer."
(add-to-list 'default-frame-alist '(alpha . (90 . 90)))
;; Prettify symbols
(global-prettify-symbols-mode)
;; (global-prettify-symbols-mode)
;; No start screen
(setq inhibit-startup-screen t)
@ -1100,6 +1100,28 @@ then it takes a second \\[keyboard-quit] to abort the minibuffer."
(add-hook 'org-mode-hook #'rainbow-delimiters-mode)
(add-hook 'prog-mode-hook #'rainbow-delimiters-mode))
#+end_src
** Ligatures
#+begin_src emacs-lisp
(use-package ligature
:straight (:host github :repo "mickeynp/ligature.el")
:config
(ligature-set-ligatures 'prog-mode
'("--" "---" "==" "===" "!=" "!==" "=!=" "=:=" "=/=" "<="
">=" "&&" "&&&" "&=" "++" "+++" "***" ";;" "!!" "??"
"?:" "?." "?=" "<:" ":<" ":>" ">:" "<>" "<<<" ">>>"
"<<" ">>" "||" "-|" "_|_" "|-" "||-" "|=" "||=" "##"
"###" "####" "#{" "#[" "]#" "#(" "#?" "#_" "#_(" "#:"
"#!" "#=" "^=" "<$>" "<$" "$>" "<+>" "<+" "+>" "<*>"
"<*" "*>" "</" "</>" "/>" "<!--" "<#--" "-->" "->" "->>"
"<<-" "<-" "<=<" "=<<" "<<=" "<==" "<=>" "<==>" "==>" "=>"
"=>>" ">=>" ">>=" ">>-" ">-" ">--" "-<" "-<<" ">->" "<-<"
"<-|" "<=|" "|=>" "|->" "<->" "<~~" "<~" "<~>" "~~" "~~>"
"~>" "~-" "-~" "~@" "[||]" "|]" "[|" "|}" "{|" "[<"
">]" "|>" "<|" "||>" "<||" "|||>" "<|||" "<|>" "..." ".."
".=" ".-" "..<" ".?" "::" ":::" ":=" "::=" ":?" ":?>"
"//" "///" "/*" "*/" "/=" "//=" "/==" "@_" "__"))
(global-ligature-mode t))
#+end_src
** Zoom
#+begin_src emacs-lisp
(defun zoom-in ()
@ -1458,6 +1480,7 @@ then it takes a second \\[keyboard-quit] to abort the minibuffer."
(add-hook 'LaTeX-mode-hook #'rainbow-delimiters-mode)
(add-hook 'LaTeX-mode-hook #'smartparens-mode)
(add-hook 'LaTeX-mode-hook #'prettify-symbols-mode)
(my/set-smartparens-indent 'LaTeX-mode)
@ -1623,6 +1646,11 @@ then it takes a second \\[keyboard-quit] to abort the minibuffer."
(use-package snow
:straight (:repo "alphapapa/snow.el" :host github))
#+end_src
** Explain Pause
#+begin_src emacs-lisp
(use-package explain-pause-mode
:straight (explain-pause-mode :type git :host github :repo "lastquestion/explain-pause-mode"))
#+end_src
** OFF Buku
#+begin_src emacs-lisp :tangle no
(use-package ebuku

View file

@ -43,7 +43,7 @@
(conda-env-activate "base")
(setq gc-cons-threshold 8000000)
(setq gc-cons-threshold 80000000)
(setq read-process-output-max (* 1024 1024))
(use-package general
@ -126,7 +126,7 @@ then it takes a second \\[keyboard-quit] to abort the minibuffer."
(use-package evil-collection
:straight t
:config
(evil-collection-init '(eww dired company vterm flycheck profiler cider)))
(evil-collection-init '(eww dired company vterm flycheck profiler cider explain-pause-mode)))
(use-package evil-quickscope
:straight t
@ -764,7 +764,7 @@ then it takes a second \\[keyboard-quit] to abort the minibuffer."
(add-to-list 'default-frame-alist '(alpha . (90 . 90)))
;; Prettify symbols
(global-prettify-symbols-mode)
;; (global-prettify-symbols-mode)
;; No start screen
(setq inhibit-startup-screen t)
@ -884,6 +884,26 @@ then it takes a second \\[keyboard-quit] to abort the minibuffer."
(add-hook 'org-mode-hook #'rainbow-delimiters-mode)
(add-hook 'prog-mode-hook #'rainbow-delimiters-mode))
(use-package ligature
:straight (:host github :repo "mickeynp/ligature.el")
:config
(ligature-set-ligatures 'prog-mode
'("--" "---" "==" "===" "!=" "!==" "=!=" "=:=" "=/=" "<="
">=" "&&" "&&&" "&=" "++" "+++" "***" ";;" "!!" "??"
"?:" "?." "?=" "<:" ":<" ":>" ">:" "<>" "<<<" ">>>"
"<<" ">>" "||" "-|" "_|_" "|-" "||-" "|=" "||=" "##"
"###" "####" "#{" "#[" "]#" "#(" "#?" "#_" "#_(" "#:"
"#!" "#=" "^=" "<$>" "<$" "$>" "<+>" "<+" "+>" "<*>"
"<*" "*>" "</" "</>" "/>" "<!--" "<#--" "-->" "->" "->>"
"<<-" "<-" "<=<" "=<<" "<<=" "<==" "<=>" "<==>" "==>" "=>"
"=>>" ">=>" ">>=" ">>-" ">-" ">--" "-<" "-<<" ">->" "<-<"
"<-|" "<=|" "|=>" "|->" "<->" "<~~" "<~" "<~>" "~~" "~~>"
"~>" "~-" "-~" "~@" "[||]" "|]" "[|" "|}" "{|" "[<"
">]" "|>" "<|" "||>" "<||" "|||>" "<|||" "<|>" "..." ".."
".=" ".-" "..<" ".?" "::" ":::" ":=" "::=" ":?" ":?>"
"//" "///" "/*" "*/" "/=" "//=" "/==" "@_" "__"))
(global-ligature-mode t))
(defun zoom-in ()
"Increase font size by 10 points"
(interactive)
@ -1106,6 +1126,9 @@ then it takes a second \\[keyboard-quit] to abort the minibuffer."
(add-hook 'svelte-mode-hook
'set-flycheck-eslint)
(add-hook 'svelte-mode-hook #'smartparens-mode)
(my/set-smartparens-indent 'svelte-mode)
(add-hook 'scss-mode-hook #'smartparens-mode)
(my/set-smartparens-indent 'scss-mode)
@ -1164,6 +1187,7 @@ then it takes a second \\[keyboard-quit] to abort the minibuffer."
(add-hook 'LaTeX-mode-hook #'rainbow-delimiters-mode)
(add-hook 'LaTeX-mode-hook #'smartparens-mode)
(add-hook 'LaTeX-mode-hook #'prettify-symbols-mode)
(my/set-smartparens-indent 'LaTeX-mode)
@ -1300,3 +1324,6 @@ then it takes a second \\[keyboard-quit] to abort the minibuffer."
(use-package snow
:straight (:repo "alphapapa/snow.el" :host github))
(use-package explain-pause-mode
:straight (explain-pause-mode :type git :host github :repo "lastquestion/explain-pause-mode"))