latest emacs visual ricing

This commit is contained in:
agryphus 2024-12-11 15:06:50 -05:00
parent 8b55484b02
commit ab0a71784e
2 changed files with 57 additions and 29 deletions

View file

@ -30,10 +30,10 @@
- [[#posframe][Posframe]] - [[#posframe][Posframe]]
- [[#vertico-posframe][Vertico Posframe]] - [[#vertico-posframe][Vertico Posframe]]
- [[#company-posframe][Company Posframe]] - [[#company-posframe][Company Posframe]]
- [[#style][Style]]
- [[#fonts][Fonts]] - [[#fonts][Fonts]]
- [[#default][Default]] - [[#default][Default]]
- [[#mixed-pitch-mode][Mixed Pitch Mode]] - [[#mixed-pitch-mode][Mixed Pitch Mode]]
- [[#coloring][Coloring]]
- [[#themes][Themes]] - [[#themes][Themes]]
- [[#transparency][Transparency]] - [[#transparency][Transparency]]
- [[#languages][Languages]] - [[#languages][Languages]]
@ -58,6 +58,7 @@
- [[#typst][Typst]] - [[#typst][Typst]]
- [[#preview][Preview]] - [[#preview][Preview]]
- [[#concealing][Concealing]] - [[#concealing][Concealing]]
- [[#install-tree-sitter-grammar][Install Tree-Sitter Grammar]]
- [[#shell][Shell]] - [[#shell][Shell]]
- [[#nix][Nix]] - [[#nix][Nix]]
- [[#miscellaneous][Miscellaneous]] - [[#miscellaneous][Miscellaneous]]
@ -277,23 +278,26 @@ Company mode, by default, has its suggestions snap to the grid. When using anyt
(company-posframe-mode 1) (company-posframe-mode 1)
#+end_src #+end_src
* Fonts * Style
** Default There are four ways to start emacs with the combinations of GUI/TUI and standalone/daemon.
Unfortunately, each of these four methods requires a slightly different way to set window transparency.
** Fonts
*** Default
#+begin_src emacs-lisp #+begin_src emacs-lisp
(defun ag/load-fonts ()
(set-face-font 'variable-pitch "Liberation Serif 15") ;; Serif
(add-to-list 'default-frame-alist '(font . "Symbols Nerd Font Mono 15")) (add-to-list 'default-frame-alist '(font . "Symbols Nerd Font Mono 15"))
(add-to-list 'default-frame-alist '(font . "FiraCode 15")) (add-to-list 'default-frame-alist '(font . "FiraCode 15"))
(set-face-font 'variable-pitch "Inter Display 15") ;; (set-face-font 'variable-pitch "Inter Display 15") ;; Sans serif
(set-fontset-font "fontset-default" 'han "Source Han Sans") (set-fontset-font "fontset-default" 'han "Source Han Sans"))
(ag/load-fonts)
#+end_src #+end_src
** Mixed Pitch Mode *** Mixed Pitch Mode
#+begin_src emacs-lisp :tangle packages.el #+begin_src emacs-lisp :tangle packages.el
(package! mixed-pitch) (package! mixed-pitch)
#+end_src #+end_src
* Coloring
There are four ways to start emacs with the combinations of GUI/TUI and standalone/daemon.
Unfortunately, each of these four methods requires a slightly different way to set window transparency.
** Themes ** Themes
#+begin_src emacs-lisp :tangle packages.el #+begin_src emacs-lisp :tangle packages.el
(package! gruber-darker-theme) (package! gruber-darker-theme)
@ -335,6 +339,8 @@ Unfortunately, each of these four methods requires a slightly different way to s
;; Called at the creation of each emacsclient frame ;; Called at the creation of each emacsclient frame
(if (display-graphic-p frame) (if (display-graphic-p frame)
(progn ;; $ emacsclient -c (progn ;; $ emacsclient -c
(set-face-font 'variable-pitch "Liberation Serif 15") ;; Serif
;; (ag/load-fonts)
;; Transparency for specific graphical frame ;; Transparency for specific graphical frame
) )
(progn ;; $ emacsclient -nw (progn ;; $ emacsclient -nw
@ -505,7 +511,7 @@ From: https://tecosaur.github.io/emacs-config/config.html
("NOPE" . "") ("NOPE" . "")
("DONE" . "") ("DONE" . "")
("[ ]" . "") ("[ ]" . "")
("[X]" . "") ("[X]" . "󰄵")
("[-]" . "") ("[-]" . "")
("#+begin_src" . "") ("#+begin_src" . "")
("#+BEGIN_SRC" . "") ("#+BEGIN_SRC" . "")
@ -590,6 +596,17 @@ Automatically generate a table of contents for markdown documents
*** Conceal Markup *** Conceal Markup
#+begin_src emacs-lisp #+begin_src emacs-lisp
(add-hook 'markdown-mode-hook '(lambda () (markdown-toggle-markup-hiding))) (add-hook 'markdown-mode-hook '(lambda () (markdown-toggle-markup-hiding)))
(defun ag/prettify-me ()
(setq prettify-symbols-alist
'(("[ ]" . "")
("```" . "")
("```\n" . "")
("[x]" . "󰄵"))))
(add-hook 'markdown-mode-hook '(lambda () (progn (ag/prettify-me)
(global-prettify-symbols-mode))))
(setq markdown-max-image-size '(700 . 700))
#+end_src #+end_src
*** Variable Sized Headers *** Variable Sized Headers
@ -655,13 +672,26 @@ Making the editor more WYSIWYG-like
(add-hook! typst-ts-mode (add-hook! typst-ts-mode
(progn (progn
(setq prettify-symbols-alist (setq prettify-symbols-alist
'(("= " . "") '(("^= " . "")
("== " . "") ("^== " . "")
("=== " . "") ("^=== " . "")
("==== " . ""))) ("^==== " . "")))
(prettify-symbols-mode))) (prettify-symbols-mode)))
#+end_src #+end_src
#+begin_src emacs-lisp
(add-hook 'typst-ts-mode-hook '(lambda () (mixed-pitch-mode)))
(add-hook 'typst-ts-mode-hook '(lambda () (electric-indent-mode -1)))
#+end_src
*** Install Tree-Sitter Grammar
Uncomment and run the below code once to install the tree sitter grammar for typst-ts-mode
#+begin_src emacs-lisp
;; (add-to-list 'treesit-language-source-alist
;; '(typst "https://github.com/uben0/tree-sitter-typst"))
;; (treesit-install-language-grammar 'typst)
#+end_src
** Shell ** Shell
#+begin_src emacs-lisp #+begin_src emacs-lisp
(set-company-backend! (set-company-backend!

View file

@ -369,30 +369,28 @@
(org-document-info (:foreground white :weight 'bold)) (org-document-info (:foreground white :weight 'bold))
;; Markdown ;; Markdown
(markdown-header-face-1 (:weight 'bold (markdown-header-face-1 (:weight 'bold))
:underline (:style 'line)
:foreground medium-gray-blue :weight 'bold))
(markdown-header-face-2 (:weight 'bold (markdown-header-face-2 (:weight 'bold
:underline (:style 'line) :underline (:style 'line)
:foreground gray-blue :weight 'bold)) :foreground medium-gray-blue :weight 'bold))
(markdown-header-face-3 (:weight 'bold (markdown-header-face-3 (:weight 'bold
:underline (:style 'line) :underline (:style 'line)
:foreground cyan :weight 'bold)) :foreground gray-blue :weight 'bold))
(markdown-header-face-4 (:weight 'bold (markdown-header-face-4 (:weight 'bold
:underline (:style 'line) :underline (:style 'line)
:foreground green :weight 'bold)) :foreground cyan :weight 'bold))
(markdown-header-face-5 (:weight 'bold (markdown-header-face-5 (:weight 'bold
:underline (:style 'line) :underline (:style 'line)
:foreground medium-gray-blue :weight 'bold)) :foreground green :weight 'bold))
(markdown-header-face-6 (:weight 'bold (markdown-header-face-6 (:weight 'bold
:underline (:style 'line) :underline (:style 'line)
:foreground gray-blue :weight 'bold)) :foreground medium-gray-blue :weight 'bold))
(markdown-header-face-7 (:weight 'bold (markdown-header-face-7 (:weight 'bold
:underline (:style 'line) :underline (:style 'line)
:foreground cyan :weight 'bold)) :foreground gray-blue :weight 'bold))
(markdown-header-face-8 (:weight 'bold (markdown-header-face-8 (:weight 'bold
:underline (:style 'line) :underline (:style 'line)
:foreground green :weight 'bold)) :foreground cyan :weight 'bold))
(markdown-list-face (:foreground medium-gray-blue)) (markdown-list-face (:foreground medium-gray-blue))
(markdown-hr-face (:foreground medium-gray :weight 'bold)) (markdown-hr-face (:foreground medium-gray :weight 'bold))
(markdown-code-face (:background "#111111" :extend t)) (markdown-code-face (:background "#111111" :extend t))