Browse Source

General enhancements

master
Juan Placencia 4 years ago
parent
commit
8f1d756a21
9 changed files with 176 additions and 72 deletions
  1. +1
    -0
      .gitignore
  2. +45
    -41
      straight.lock.el
  3. +22
    -1
      uno/bootstrap.org
  4. +9
    -3
      uno/modules/config.org
  5. +56
    -9
      uno/modules/doc/org.org
  6. +0
    -1
      uno/modules/key/emacs.org
  7. +15
    -1
      uno/modules/key/vim.org
  8. +24
    -12
      uno/modules/ui/+index.org
  9. +4
    -4
      uno/modules/ui/theme.org

+ 1
- 0
.gitignore View File

@ -4,3 +4,4 @@
!/.gitignore
!/init.el
!/early-init.el
!/straight.lock.el

straight/versions/default.el → straight.lock.el View File

@ -1,50 +1,52 @@
(("ace-link" . "e1b1c91b280d85fce2194fea861a9ae29e8b03dd")
("ace-window" . "c7cb315c14e36fded5ac4096e158497ae974bec9")
("all-the-icons.el" . "facbde4a7be292bf9490932cbe403b443273f45d")
("all-the-icons.el" . "e01eeb40858f971e45c014726a14c75556d8cc8f")
("annalist.el" . "134fa3f0fb91a636a1c005c483516d4b64905a6d")
("anzu" . "bdb3da5028935a4aea55c40769bc191a81afb54e")
("avy" . "e92cb37457b43336b765630dbfbea8ba4be601fa")
("centered-cursor-mode.el" . "4093821cc9759ca5a3c6e527d4cc915fc3a5ad74")
("cfrs" . "2cb7f1cbf9292b0efe167ef372cfb5a7600564eb")
("closql" . "38af2f15d7090e71ad2afde5e82a3c7cd009928c")
("company-box" . "aa5f09a5492344e3cc831f0f169a6a8345dec358")
("company-mode" . "36839ec2eb06bf970c7ff4a10a13fc0f1b989b5e")
("closql" . "e2687e7ff958a19e6e5d6552c4e0b7b33c424bab")
("company-box" . "156f65cfbf690ed84e0e84f90277d665d873ff24")
("company-mode" . "87825c7891ccf4aefb88b9d49c7ff074cc74c53a")
("company-quickhelp" . "530b29380f0f95ae338cbe089693d786e6f53d86")
("company-restclient" . "e5a3ec54edb44776738c13e13e34c85b3085277b")
("company-statistics" . "e62157d43b2c874d2edbd547c3bdfb05d0a7ae5c")
("consult" . "f1ae2244da20702525fe2991076322b9c6b34202")
("dash.el" . "88d799595e8f1b4154637ce8a3f81b97b0520c1a")
("consult" . "56e1a69d39608a476e6533c2c3a0bf83d5c0e760")
("dash.el" . "2675596b9ac1c4b9d47b93e227f06f8ec6755ec6")
("disable-mouse" . "cae3be9dd012727b40ad3b511731191f79cebe42")
("doom-modeline" . "d514f43679513819b37333a64a44523f239150b6")
("editorconfig-emacs" . "e10fa22b1304c5801b026c10cc5d65a97ccc0a48")
("el-get" . "ec135b5353867ce3564a675e99024944b834395d")
("doom-modeline" . "ffb9e38828760938d7e56bc296a290de27f8ceef")
("editorconfig-emacs" . "375418d1d63f6ec780876593181b6d39054919da")
("el-get" . "463f5e985fc53300f87ab7eb054d1738fc6ac93b")
("elfeed" . "243add9e74003cd5718f33482b7bb8b4fe140fb5")
("elfeed-org" . "268efdd0121fa61f63b722c30e0951c5d31224a4")
("elisp-refs" . "fdde21e34b1272783d566d8230b5ed2dc4749048")
("emacs-dashboard" . "9983aa0838ce5a2219ef4b674e6b37de41b5b585")
("emacs-doom-themes" . "b2c0ea0f0778a6ea85b87e1b87916572e98e1fe7")
("emacs-dashboard" . "3926b1b756fb0be5f84776f578a05d31a244d5d4")
("emacs-doom-themes" . "65fb964f36939cf412d03b3fe410618caf99c494")
("emacs-hide-mode-line" . "88888825b5b27b300683e662fa3be88d954b1cea")
("emacs-undo-fu" . "e0ad06b5ef2ac2733dad2ad48e3957b5c36edfa5")
("emacs-which-key" . "12f743c6955c89352f8d49d292895bd45e82d26f")
("emacs-undo-fu" . "34b27c01da4c3eb8aa595f3613b7e2e1ed4e54be")
("emacs-which-key" . "cc84b2d0da629ecb62a92e3fd23cbee4ea20ce56")
("emacs-winum" . "c5455e866e8a5f7eab6a7263e2057aff5f1118b9")
("emacsmirror-mirror" . "6b40ad4759fcfdb113e05fb4aaf8c0ef577f7e1e")
("emacsmirror-mirror" . "cf4385804420024f63f41b1bc39c6e2c51e51a20")
("emacsql" . "9dca5996168c4963eb67e61c7f17fdcb8228e314")
("epl" . "78ab7a85c08222cd15582a298a364774e3282ce6")
("evil" . "ee6f4bd09a68c3cc5e2e446c9fb4a16de8503ed5")
("evil" . "dceb73603d397f7e42a541976d8ec0711248d38c")
("evil-anzu" . "d3f6ed4773b48767bd5f4708c7f083336a8a8a86")
("evil-collection" . "eaded9d762fd49f962eeb6b8e15d6a33f79f4f26")
("evil-nerd-commenter" . "c0f49e4e87300720b8e8a8296d92b8386956c7a2")
("evil-collection" . "3d990ce63e07c05a074b52125ac504b671f9f93a")
("evil-nerd-commenter" . "6bc41317ba4b8710d713a62e1b78047c3cc2d2d5")
("evil-org-mode" . "80ef38fb378541937f6ddfe836809e76eda1e355")
("f.el" . "c4dbf8c8e83df834f5d6f72cd5649b9d8a8812ec")
("flycheck" . "f8c679fff349850c80541a31de50009c3c15d4c9")
("forge" . "7368fdc8f5a9fe63d9ff8649ba4dfac6cf0cc7c4")
("exec-path-from-shell" . "bf4bdc8b8911e7a2c04e624b9a343164c3878282")
("f.el" . "50af874cd19042f17c8686813d52569b1025c76a")
("flycheck" . "21d52264aa80bfa4ede94c59e37a20fb6d033b0c")
("forge" . "93c8005ce72a765b8be189c43962cee084f51880")
("frame-local" . "7ee1106c3bcd4022f48421f8cb1ef4f995da816e")
("gcmh" . "0089f9c3a6d4e9a310d0791cf6fa8f35642ecfd9")
("general.el" . "a0b17d207badf462311b2eef7c065b884462cb7c")
("ghub" . "f2901f027ecf85614631e6b4b1e9c045e8cf3db5")
("ghub" . "00a77b79c28e22db1b151c3f7857073ccbeff726")
("git-modes" . "433e1c57a63c88855fc41a942e29d7bc8c9c16c7")
("gnu-elpa-mirror" . "97425c5a7472e0c669d34c719ea194520afddc8d")
("gnu-elpa-mirror" . "8ce05c546573f36c39b1e4a921de4fbf8613a98a")
("goto-chg" . "3ce1389fea12edde4e343bc7d54c8da97a1a6136")
("graphviz-dot-mode" . "3642a0a5f41a80c8ecef7c6143d514200b80e194")
("helpful" . "7e4b1f0d5572a4e2b8ee7a9b084ef863d0315a73")
("ht.el" . "c4c1be487d6ecb353d07881526db05d7fc90ea87")
("hydra" . "2d553787aca1aceb3e6927e426200e9bb9f056f1")
@ -55,41 +57,43 @@
("know-your-http-well" . "3cc5ab6d2764ab7aacb1b6e026abaccbeb6c37f2")
("let-alist" . "6708ec0b2e6dff80ff5b64698aa009d9070a2ed2")
("ligature.el" . "3923baf1fb9bf509cc95b4b14d7d0e2f7c88e53c")
("lsp-mode" . "52048d47014b03a5de32b19f9a307af92e465192")
("lsp-ui" . "c4ffa7abf6706d591300c608c51d2b72178848ad")
("magit" . "a3626277ccd7436391302009e69c4fbf5711a89b")
("markdown-mode" . "1c7d29d52986b2cb153b5f643167ea49417de469")
("melpa" . "452c6f2768921d73609bb3dd4c70df538c501f54")
("lsp-mode" . "d904e8a4472b537f0bff1315a61fe3cf3b5ebcf5")
("lsp-ui" . "177c31e982345ba35dc7c5d90cb1f8e68585323a")
("magit" . "de1dc8e74bbfabf00ed20fceec2cb03c4493c510")
("markdown-mode" . "b3166c52551eb5d6d4598ab7b63721efe51b9dbe")
("melpa" . "949eb5d82e26e37685c3155b22b329e387f0fd59")
("mixed-pitch" . "519e05f74825abf04b7d2e0e38ec040d013a125a")
("ob-restclient.el" . "0ebfc7c5ebf96d2fe1a476439831363a5a43b9b6")
("olivetti" . "4a0719021625ece4def8f18d28f86a681bee7d28")
("orderless" . "2646dad28c0819fbe9ee521d39efb9ae40e03982")
("org" . "9aa304f957578be87c5c6d3eba84d2dd37f7f81e")
("ob-restclient.el" . "bfbc4d8e8a348c140f9328542daf5d979f0993e2")
("olivetti" . "032b3d779f7b374bd12f62b7fc717a310ea16bee")
("orderless" . "1a7011ac9c476dbb083c5ead88462a5f520ef8aa")
("org" . "3664447eb2417b38f0053674f248d2b0f1592ff0")
("org-contrib" . "fc81309cf6756607a836f93049a9393c2967c4e0")
("org-present" . "9709ca2d04a59959354222ac4d3f8b750785739a")
("org-present" . "7414e406326622dbfb5aaf2905c4ac9f6696d6ed")
("org-roam" . "95afbc676a2317ae75d358ef6c71b97548505777")
("org-superstar-mode" . "9d64c42e5029910153ec74cb9b5747b074281140")
("page-break-lines" . "3b8549cd414d4d7ee0168ab9917124133566d3db")
("pdf-tools" . "5f77dae43eb8f71e52e10ba8cf994883f74c3fb7")
("pfuture" . "d7926de3ba0105a36cfd00811fd6278aea903eef")
("pkg-info" . "76ba7415480687d05a4353b27fea2ae02b8d9d61")
("pos-tip" . "179cc126b363f72ca12fab1e0dc462ce0ee79742")
("posframe" . "74f06b77deeb770cd0a96977b1e6bdedb682487a")
("projectile" . "155fdb44176347c9599357c7935993033260a930")
("posframe" . "f97c4aff2c2c376ca62276d5597aa108546633a9")
("projectile" . "87f6078e3ef4ea47d839006bfe1ed9c96b56aa6f")
("restart-emacs" . "1607da2bc657fe05ae01f7fdf26f716eafead02c")
("restclient.el" . "2cc1fd3496f57288de3f97c27a5f018284db2d23")
("restclient.el" . "176d9cb6552f04d98c33e29fc673862bdf3bca03")
("ripgrep.el" . "40e871dcc4519a70981e9f28acea304692a60978")
("s.el" . "08661efb075d1c6b4fa812184c1e5e90c08795a9")
("shrink-path.el" . "c14882c8599aec79a6e8ef2d06454254bb3e1e41")
("smartparens" . "911cc896a0f2eb8b5fbdd6fc8331523ad9889a3a")
("spinner" . "e19f3cfc0646c0e23c10c22df219fcf427054621")
("smartparens" . "1d7f8fbf5389f83f4c0ae72cd7fbb6fa3341beda")
("spinner" . "34905eae12a236753fa88abc831eff1e41e8576e")
("straight.el" . "1e27b0590df77a5d478970ca58fd6606971692f5")
("tablist" . "faab7a035ef2258cc4ea2182f67e3aedab7e2af9")
("transient" . "b711543401dafc159943d8a703cf30fabdc78e1f")
("treemacs" . "c2b0beaeb0383c3e6cbc453d6c42cdbc87c6da5e")
("transient" . "e17e2b2f6d7cdf2e27729fd28e3d7600b76ad24a")
("treemacs" . "d9fc2995577b71d213f0201a66c8e2d90e7cd0ff")
("treepy.el" . "3ac940e97f3d03e48ca9d7fcd74916a9b01c72f3")
("typescript.el" . "b369d7d2518fa11760ac3908a383405350cd51d2")
("use-package" . "a7422fb8ab1baee19adb2717b5b47b9c3812a84c")
("vertico" . "e8ccf04a021b274868412e1d35ae54ab769fec6e")
("vertico" . "afa61c4ec056f611a61ee37ed47a42e7ae47e6e3")
("web-mode" . "8ef47935d638902ba35a557cae5edd6ab6ab1346")
("with-editor" . "5519b6a67ecd66865b4fdd5447425eee900c54f4"))
("with-editor" . "5519b6a67ecd66865b4fdd5447425eee900c54f4")
("yaml-mode" . "63b637f846411806ae47e63adc06fe9427be1131"))
:beta

+ 22
- 1
uno/bootstrap.org View File

@ -26,6 +26,18 @@
(uno-path (concat "private/" name)))
#+END_SRC
* Local Customizations (Pre-Bootstrap)
#+BEGIN_SRC emacs-lisp
(defvar uno-local (uno-private-path "local.el")
"Localized customization file.")
(defvar uno-local-after-hook nil
"Hook to run after customizations are done.")
(load uno-local 'noerror)
#+END_SRC
* Backup Files
Isolate or remove backup files for a clean structure.
@ -35,6 +47,7 @@ Isolate or remove backup files for a clean structure.
auto-save-file-name-transforms `((".*" ,temporary-file-directory t))
auto-save-list-file-prefix (uno-cache-path "auto-save-list/.saves-")
backup-directory-alist `((".*" . ,temporary-file-directory))
bookmark-default-file (uno-cache-path "bookmarks")
create-lockfiles nil
recentf-save-file (uno-cache-path "recentf/list")
tramp-persistency-file-name (uno-cache-path "tramp/history"))
@ -45,7 +58,9 @@ Isolate or remove backup files for a clean structure.
Run bootstrap code for =straight= and have =use-package= ready.
#+BEGIN_SRC emacs-lisp
(setq straight-use-package-by-default t)
(setq
straight-profiles `((nil . ,(uno-emacs-path "straight.lock.el")))
straight-use-package-by-default t)
(let ((bootstrap-file
(uno-emacs-path "straight/repos/straight.el/bootstrap.el"))
@ -123,3 +138,9 @@ Set up general and leader key binds that are used throughout.
(setq custom-file (uno-cache-path "custom.el"))
(load custom-file 'noerror))
#+END_SRC
* Local Customizations (Post-Bootstrap)
#+BEGIN_SRC emacs-lisp
(run-hooks 'uno-local-after-hook)
#+END_SRC

+ 9
- 3
uno/modules/config.org View File

@ -19,15 +19,21 @@ Define core config package.
:after uno-config
:general
(uno-leader-define
"fed" '(uno/config/edit :which-key "Edit emacs configuration")
"feR" '(uno/config/reload :which-key "Reload Emacs configuration")
"fe" '(:ignore t :which-key "Emacs")
"fed" '(uno/config/edit :which-key "Edit configuration")
"feD" '(uno/config/edit-local :which-key "Edit local configuration")
"feR" '(uno/config/reload :which-key "Reload configuration")
"fs" '(save-buffer :which-key "Save file")
"fS" '(uno/file/save-all-files :which-key "Save all files"))
:init
(defun uno/config/edit ()
"Open configuration file."
(interactive)
(find-file (uno-path "bootstrap.org")))
(projectile-find-file-in-directory user-emacs-directory))
(defun uno/config/edit-local ()
"Open local configuration file."
(interactive)
(find-file uno-local))
(defun uno/config/reload ()
"Reload configuration."
(interactive)

+ 56
- 9
uno/modules/doc/org.org View File

@ -23,6 +23,7 @@ Define Org document package.
(org-ellipsis " ▼")
(org-hide-emphasis-markers t)
(org-src-window-setup 'current-window)
(org-todo-keywords '((sequence "TODO" "LIVE" "DONE")))
:hook
(org-babel-after-execute . uno/doc/org/after-execute-inline-images)
(org-mode . toggle-truncate-lines)
@ -31,6 +32,7 @@ Define Org document package.
(uno-mode-leader-define
:keymaps 'org-mode-map
uno-mode-leader-key '(org-ctrl-c-ctrl-c :which-key "C-c C-c")
"e" '(org-export-dispatch :which-key "Export")
"i" '(:ignore t :which-key "Insert")
"il" '(org-insert-link :which-key "Set link")
"it" '(org-set-tags-command :which-key "Set tags")
@ -39,8 +41,14 @@ Define Org document package.
(uno-mode-leader-define
:definer 'minor-mode
:keymaps 'org-src-mode
uno-mode-leader-key '(org-edit-src-exit :which-key "Save")
uno-mode-leader-key '(org-edit-src-exit :which-key "Finish")
"k" '(org-edit-src-abort :which-key "Cancel"))
(uno-mode-leader-define
:definer 'minor-mode
:keymaps 'org-capture-mode
uno-mode-leader-key '(org-capture-finalize :which-key "Finish")
"k" '(org-capture-kill :which-key "Cancel")
"w" '(org-capture-refile :which-key "Refile"))
:init
(defun uno/doc/org/after-execute-inline-images ()
"Ensure inline images remain visible after org babel execute."
@ -51,15 +59,19 @@ Define Org document package.
(when (display-graphic-p)
(custom-theme-set-faces
'user
'(org-document-title ((t (:height 1.8))))
'(org-level-1 ((t (:inherit outline-1 :height 1.6))))
'(org-level-2 ((t (:inherit outline-2 :height 1.5))))
'(org-level-3 ((t (:inherit outline-3 :height 1.4))))
'(org-level-4 ((t (:inherit outline-4 :height 1.3))))
'(org-level-5 ((t (:inherit outline-5 :height 1.2))))
'(org-level-6 ((t (:inherit outline-6 :height 1.1)))))))
'(org-drawer ((t (:inherit fixed-pitch))))
'(org-property-value ((t (:inherit fixed-pitch))))
'(org-special-keyword ((t (:inherit fixed-pitch))))
'(org-document-title ((t (:height 2.05))))
'(org-level-1 ((t (:inherit outline-1 :height 1.90))))
'(org-level-2 ((t (:inherit outline-2 :height 1.75))))
'(org-level-3 ((t (:inherit outline-3 :height 1.60))))
'(org-level-4 ((t (:inherit outline-4 :height 1.45))))
'(org-level-5 ((t (:inherit outline-5 :height 1.30))))
'(org-level-6 ((t (:inherit outline-6 :height 1.15)))))))
:config
(require 'ox-beamer))
(require 'ox-beamer)
(require 'ox-md))
(use-package org-contrib
:after (uno-doc-org org)
@ -73,6 +85,9 @@ Define Org document package.
(org-hide-leading-stars nil)
(org-superstar-leading-bullet "")
(org-superstar-special-todo-items t)
(org-superstar-todo-bullet-alist '(("TODO" . 9744)
("LIVE" . 9746)
("DONE" . 9745)))
:hook
(org-mode . org-superstar-mode))
#+END_SRC
@ -129,6 +144,38 @@ Define Org document package.
(org-present-mode-quit . turn-off-hide-mode-line-mode))
#+END_SRC
* Roam
#+BEGIN_SRC emacs-lisp
(use-package org-roam
:after (uno-doc-org org)
:custom
(org-roam-capture-templates
'(("d" "default" plain "%?"
:if-new (file+head "%<%Y%m%d%H%M%S>-${slug}.org"
"#+TITLE: ${title}\n#+STARTUP: showall\n\n")
:unnarrowed t)))
(org-roam-complete-everywhere t)
(org-roam-db-location (uno-cache-path "org-roam/org-roam.db"))
(org-roam-directory "~/Roam")
:general
(uno-leader-define
"r" '(:ignore t :which-key "Org Roam")
"rd" '(org-roam-dailies-capture-today :which-key "Capture today")
"rf" '(org-roam-node-find :which-key "Find node"))
(uno-mode-leader-define
:keymaps 'org-mode-map
"ir" '(org-roam-node-insert :which-key "Add Org Roam link")
"r" '(org-roam-buffer-list :which-key "Roam backlinks"))
:init
(setq org-roam-v2-ack t)
:config
(require 'org-roam-dailies)
(mkdir (expand-file-name org-roam-dailies-directory org-roam-directory) t)
(uno/handle-side-window "\\*org-roam\\*")
(org-roam-setup))
#+END_SRC
* Evil Integration
#+BEGIN_SRC emacs-lisp

+ 0
- 1
uno/modules/key/emacs.org View File

@ -26,7 +26,6 @@ Define core keybinds.
:placebo t ;; Dummy keyword required to use variable name below
uno-leader-key '(execute-extended-command :which-key "Execute command")
"f" '(:ignore t :which-key "File")
"fe" '(:ignore t :which-key "Emacs")
"fR" '(uno/key/emacs/rename-file :which-key "Rename file")
"fs" '(save-buffer :which-key "Save file")
"fS" '(uno/key/emacs/save-all-files :which-key "Save all files")

+ 15
- 1
uno/modules/key/vim.org View File

@ -28,11 +28,25 @@ Define Vim key package.
(evil-vsplit-window-right t)
(evil-want-integration t)
:general
(uno-define ";" 'evil-ex)
(uno-define
";" 'evil-ex
"j" 'evil-next-visual-line
"k" 'evil-previous-visual-line)
:init
(evil-mode 1))
#+END_SRC
** Drag Stuff
#+BEGIN_SRC emacs-lisp
(use-package drag-stuff
:after uno-key-vim
:general
(:states 'visual
"J" 'drag-stuff-down
"K" 'drag-stuff-up))
#+END_SRC
** Undo-Fu Integration
#+BEGIN_SRC emacs-lisp

+ 24
- 12
uno/modules/ui/+index.org View File

@ -31,6 +31,18 @@ Add support for icons via =all-the-icons=.
(global-ligature-mode 1))
#+END_SRC
* Olivetti
#+BEGIN_SRC emacs-lisp
(use-package olivetti
:after uno-ui
:custom
(olivetti-body-width 82)
:general
(uno-leader-define
"tw" '(olivetti-mode :which-key "Toggle writing mode")))
#+END_SRC
* Which Key
#+BEGIN_SRC emacs-lisp
@ -40,22 +52,22 @@ Add support for icons via =all-the-icons=.
(which-key-mode 1))
#+END_SRC
* Olivetti
* Zoom Frame
#+BEGIN_SRC emacs-lisp
(use-package olivetti
(use-package zoom-frm
:after uno-ui
:hook
(uno-prog-mode . uno/ui/olivetti-prog)
(uno-text-mode . uno/ui/olivetti-text)
:custom
(zoom-frame/buffer 'buffer)
:general
(uno-leader-define
"tw" '(olivetti-mode :which-key "Toggle writing mode"))
"z" '(:ignore t :which-key "Zoom")
"z0" '(uno/ui/zoom-reset :which-key "Zoom reset")
"zj" '(zoom-in :which-key "Zoom in")
"zk" '(zoom-out :which-key "Zoom out"))
:init
(defun uno/ui/olivetti-prog ()
"Configure Olivetti for prog mode."
(setq-local olivetti-body-width 85))
(defun uno/ui/olivetti-text ()
"Configure Olivetti for text mode."
(setq-local olivetti-body-width 0.6)))
(defun uno/ui/zoom-reset ()
"Reset zoom."
(interactive)
(zoom-in/out 0)))
#+END_SRC

+ 4
- 4
uno/modules/ui/theme.org View File

@ -35,15 +35,15 @@ Define UI theme package.
:if (display-graphic-p)
:config
(let ((-fixed-font "VictorMono Nerd Font Mono")
(-variable-font "PT Sans Narrow"))
(when (x-list-fonts -fixed-font)
(-variable-font "Fira Sans Condensed"))
(when (x-family-fonts -fixed-font)
(set-face-attribute 'default nil
:family -fixed-font
:height (cond
((eq system-type 'darwin) 140)
((eq system-type 'darwin) 160)
(t 100))
:weight 'medium)
(set-face-attribute 'fixed-pitch nil :family -fixed-font))
(when (x-list-fonts -variable-font)
(when (x-family-fonts -variable-font)
(set-face-attribute 'variable-pitch nil :family -variable-font))))
#+END_SRC

Loading…
Cancel
Save