diff --git a/dotfiles/doom/config.el b/dotfiles/doom/config.el index 59d9ad0..7c50d33 100644 --- a/dotfiles/doom/config.el +++ b/dotfiles/doom/config.el @@ -37,9 +37,9 @@ :desc "Open dired" "d" #'dired :desc "Dired jump to current" "j" #'dired-jump) (:after dired - (:map dired-mode-map - :desc "Peep-dired image previews" "d p" #'peep-dired - :desc "Dired view file" "d v" #'dired-view-file))) + (:map dired-mode-map + :desc "Peep-dired image previews" "d p" #'peep-dired + :desc "Dired view file" "d v" #'dired-view-file))) (evil-define-key 'normal dired-mode-map (kbd "M-RET") 'dired-display-file @@ -80,8 +80,8 @@ ("mp4" . "celluloid"))) (evil-define-key 'normal peep-dired-mode-map - (kbd "j") 'peep-dired-next-file - (kbd "k") 'peep-dired-prev-file) + (kbd "j") 'peep-dired-next-file + (kbd "k") 'peep-dired-prev-file) (add-hook 'peep-dired-hook 'evil-normalize-keymaps) (setq delete-by-moving-to-trash t @@ -157,8 +157,8 @@ (map! :leader (:prefix ("i d" . "Insert date") - :desc "Insert any date" "a" #'func/insert-any-date - :desc "Insert todays date" "t" #'func/insert-todays-date)) + :desc "Insert any date" "a" #'func/insert-any-date + :desc "Insert todays date" "t" #'func/insert-todays-date)) (defun func/org-roam-capture-task () (interactive) @@ -268,7 +268,7 @@ ;; CONFIG (require 'config-general-mode) -(add-to-list 'auto-mode-alist '("\\.conf$" . config-general-mode)) + (add-to-list 'auto-mode-alist '("\\.conf$" . config-general-mode)) (setq all-the-icons-scale-factor .8) ;; fixes the issue of rightmost characters not fitting. (set-face-attribute 'mode-line nil :font "Iosevka Nerd Font-15") @@ -297,7 +297,7 @@ (setq lsp-log-io nil) ; if set to true can cause a performance hit ;; c# LSP (after! lsp-mode - (setq lsp-csharp-server-path "/usr/bin/omnisharp")) + (setq lsp-csharp-server-path "/usr/bin/omnisharp")) (after! org (setq org-directory "~/Documents/Notes/" @@ -338,15 +338,14 @@ ("CANCELED" . +org-todo-cancel))) (require 'org-habit)) - (custom-set-faces - '(org-level-1 ((t (:inherit outline-1 :height 1.4)))) - '(org-level-2 ((t (:inherit outline-2 :height 1.3)))) - '(org-level-3 ((t (:inherit outline-3 :height 1.2)))) - '(org-level-4 ((t (:inherit outline-4 :height 1.1)))) - '(org-level-5 ((t (:inherit outline-5 :height 1.0)))) - '(org-document-title ((t (:inherit outline-1 :height 2.0)))) - ) + '(org-level-1 ((t (:inherit outline-1 :height 1.4)))) + '(org-level-2 ((t (:inherit outline-2 :height 1.3)))) + '(org-level-3 ((t (:inherit outline-3 :height 1.2)))) + '(org-level-4 ((t (:inherit outline-4 :height 1.1)))) + '(org-level-5 ((t (:inherit outline-5 :height 1.0)))) + '(org-document-title ((t (:inherit outline-1 :height 2.0)))) +) ;; (use-package org-alert ;; :ensure t) @@ -377,8 +376,8 @@ (org-roam-directory "~/Documents/Notes/") (org-roam-completion-everywhere t) (org-roam-dailies-capture-templates - '(("d" "default" entry "* %<%I:%M %p>: %?" - :if-new (file+head "%<%Y-%m-%d>.org" "#+title: %<%Y-%m-%d>\n")))) + '(("d" "default" entry "* %<%I:%M %p>: %?" + :if-new (file+head "%<%Y-%m-%d>.org" "#+title: %<%Y-%m-%d>\n")))) (org-roam-capture-templates '(("d" "default" plain "%?" @@ -405,19 +404,19 @@ (set-file-template! "~/Documents/Notes/.+\\.org$" 'org-mode :ignore t) (use-package! websocket - :after org-roam) + :after org-roam) (use-package! org-roam-ui - :after org-roam ;; or :after org - ;; normally we'd recommend hooking orui after org-roam, but since org-roam does not have - ;; a hookable mode anymore, you're advised to pick something yourself - ;; if you don't care about startup time, use - ;; :hook (after-init . org-roam-ui-mode) - :config - (setq org-roam-ui-sync-theme t - org-roam-ui-follow t - org-roam-ui-update-on-save t - org-roam-ui-open-on-start nil)) + :after org-roam ;; or :after org +;; normally we'd recommend hooking orui after org-roam, but since org-roam does not have +;; a hookable mode anymore, you're advised to pick something yourself +;; if you don't care about startup time, use + ;; :hook (after-init . org-roam-ui-mode) + :config + (setq org-roam-ui-sync-theme t + org-roam-ui-follow t + org-roam-ui-update-on-save t + org-roam-ui-open-on-start nil)) (use-package! org-transclusion :after org diff --git a/dotfiles/doom/config.org b/dotfiles/doom/config.org index 42d2a21..f630fce 100755 --- a/dotfiles/doom/config.org +++ b/dotfiles/doom/config.org @@ -20,7 +20,7 @@ friends to use. Allows me to insert bible quotes into my org notes. =NOTE= I'm not religious just for worldbuilding purposes lol. -#+begin_src emacs-lisp +#+begin_src emacs-lisp :tangle ./config.el (use-package insert-esv :init @@ -48,7 +48,7 @@ bookmarks is to record where you were reading in bookmarked files. | bookmark-delete | /Delete bookmark/ | SPC b M | | bookmark-save | /Save current bookmark to bookmark file/ | SPC b w | -#+BEGIN_SRC emacs-lisp +#+BEGIN_src emacs-lisp :tangle ./config.el (setq bookmark-default-file "~/.config/doom/bookmarks") (map! :leader @@ -81,7 +81,7 @@ Revert mode by typing M-x auto-revert-mode, or you can set to turn on globally with ‘global-auto-revert-mode’. I have also turned on Global Auto Revert on non-file buffers, which is especially useful for ‘dired’ buffers. -#+begin_src emacs-lisp +#+begin_src emacs-lisp :tangle ./config.el (global-auto-revert-mode 1) (setq global-auto-revert-non-file-buffers t) #+end_src @@ -104,7 +104,7 @@ you can manipulate them using vim keybindings. | ibuffer-do-kill-lines | Hide marked buffers | g h | | ibuffer-update | Restore hidden buffers | g H | -#+begin_src emacs-lisp +#+begin_src emacs-lisp :tangle ./config.el (evil-define-key 'normal ibuffer-mode-map (kbd "f c") 'ibuffer-filter-by-content (kbd "f d") 'ibuffer-filter-by-directory @@ -124,7 +124,7 @@ items and an Emacs banner. This setting ensures that emacsclient always opens on *dashboard* rather than *scratch*. -#+begin_src emacs-lisp +#+begin_src emacs-lisp :tangle ./config.el (setq doom-fallback-buffer "*dashboard*") #+end_src @@ -177,7 +177,7 @@ I've chosen the format of 'SPC d' plus 'key'. | dired-do-chown | Change the owner of marked files | O | | dired-do-rename | Rename file or all marked files | R | -#+begin_src emacs-lisp +#+begin_src emacs-lisp :tangle ./config.el (map! :leader (:prefix ("d" . "dired") :desc "Open dired" "d" #'dired @@ -236,7 +236,7 @@ and 'k' | peep-dired-next-file | /Move to next file in peep-dired-mode/ | j | | peep-dired-prev-file | /Move to previous file in peep-dired-mode/ | k | -#+begin_src emacs-lisp +#+begin_src emacs-lisp :tangle ./config.el (evil-define-key 'normal peep-dired-mode-map (kbd "j") 'peep-dired-next-file (kbd "k") 'peep-dired-prev-file) @@ -245,14 +245,14 @@ and 'k' ** Making deleted files go to trash can -#+begin_src emacs-lisp +#+begin_src emacs-lisp :tangle ./config.el (setq delete-by-moving-to-trash t trash-directory "~/.local/share/Trash/files/") #+end_src ** Clean up dired buffers while navigating away -#+begin_src emacs-lisp +#+begin_src emacs-lisp :tangle ./config.el ;; (diredp-toggle-find-file-reuse-dir 1) (setq dired-kill-when-opening-new-dired-buffer 1) #+end_src @@ -261,7 +261,7 @@ and 'k' Setting the theme to doom-one. To try out new themes, I set a keybinding for counsel-load-theme with 'SPC h t'. -#+begin_src emacs-lisp +#+begin_src emacs-lisp :tangle ./config.el (use-package! base16-stylix-theme) (require 'base16-stylix-theme) (setq doom-theme 'base16-stylix) @@ -284,7 +284,7 @@ I use for these bindings is 'SPC a' plus 'key'. | emms-previous | /Play previous track in playlist/ | SPC a p | | emms-next | /Play next track in playlist/ | SPC a n | -#+begin_src emacs-lisp +#+begin_src emacs-lisp :tangle ./config.el ;; (emms-all) ;; (emms-default-players) ;; (emms-mode-line 1) @@ -317,7 +317,7 @@ for 'eww' keybindings). | eval-last-sexp | /Evaluate elisp expression before point/ | SPC e l | | eval-region | /Evaluate elisp in region/ | SPC e r | -#+begin_src emacs-lisp +#+begin_src emacs-lisp :tangle ./config.el (map! :leader (:prefix ("e". "evaluate/EWW") :desc "Evaluate elisp in buffer" "b" #'eval-buffer @@ -335,7 +335,7 @@ e' plus 'key' for these (I also use 'SPC e' for 'eval' keybindings). I chose to use 'SPC s w' for eww-search-words because Doom Emacs uses 'SPC s' for 'search' commands. -#+begin_src emacs-lisp +#+begin_src emacs-lisp :tangle ./config.el ;; (setq browse-url-browser-function 'eww-browse-url) (map! :leader :desc "Search web for text between BEG/END" @@ -355,7 +355,7 @@ Settings related to fonts within Doom Emacs: + 'font-lock-keyword-face' -- for keywords with special significance like 'setq' in elisp. -#+begin_src emacs-lisp +#+begin_src emacs-lisp :tangle ./config.el (setq doom-unicode-font "Symbola") (setq doom-font (font-spec :family "ComicShannsMono Nerd Font Mono" :size 18) doom-variable-pitch-font (font-spec :family "ComicShannsMono Nerd Font Mono" :size 18) @@ -394,7 +394,7 @@ same format as 'insert-todays-date' without a prefix. =NOTE= Made by DT -#+begin_src emacs-lisp +#+begin_src emacs-lisp :tangle ./config.el (defun func/insert-todays-date (prefix) (interactive "P") (let ((format (cond @@ -424,7 +424,7 @@ later. =NOTE= made by SystemCrafters -#+begin_src emacs-lisp +#+begin_src emacs-lisp :tangle ./config.el (defun func/org-roam-capture-task () (interactive) ;; Capture the new task, creating the project file if necessary @@ -441,7 +441,7 @@ later. * FLYCHECK Configurations to add linting support to specific languages by integrating linters with flycheck. -#+begin_src emacs-lisp +#+begin_src emacs-lisp :tangle ./config.el (use-package! flycheck :config (flycheck-define-checker nix-statix @@ -457,7 +457,7 @@ Configurations to add linting support to specific languages by integrating linte * HUGO Capture template for new hugo posts. -#+begin_src emacs-lisp +#+begin_src emacs-lisp :tangle ./config.el ;; Populates only the EXPORT_FILE_NAME property in the inserted headline. (with-eval-after-load 'org-capture (defun org-hugo-new-subtree-post-capture-template () @@ -493,7 +493,7 @@ experience. Customizing ligatures, which replace strings with pretty symbols. They configure by mode. -#+begin_src emacs-lisp +#+begin_src emacs-lisp :tangle ./config.el ;;;(after! org ;;;;; ⧗       ―        ﮸     λ ◁ ▷ ✧ ✦ ;;;(appendq! +ligatures-extra-symbols @@ -552,7 +552,7 @@ for those bindings. | doom/toggle-line-numbers | /Toggle line numbers/ | SPC t l | | toggle-truncate-lines | /Toggle truncate lines/ | SPC t t | -#+begin_src emacs-lisp +#+begin_src emacs-lisp :tangle ./config.el (setq display-line-numbers-type t) (map! :leader :desc "Comment or uncomment lines" "TAB TAB" #'comment-line @@ -565,7 +565,7 @@ for those bindings. These are my default line display preferences. -#+begin_src emacs-lisp +#+begin_src emacs-lisp :tangle ./config.el (setq display-line-numbers-type `relative) (global-visual-line-mode t) #+end_src @@ -573,7 +573,7 @@ These are my default line display preferences. * LOAD-MODES These settings make it so company modes load by default on specific file formats. -#+begin_src emacs-lisp +#+begin_src emacs-lisp :tangle ./config.el ;; CONFIG (require 'config-general-mode) (add-to-list 'auto-mode-alist '("\\.conf$" . config-general-mode)) @@ -584,7 +584,7 @@ The modeline is the bottom status bar that appears in Emacs windows. For more information on what is available to configure in the Doom modeline, check out: https://github.com/seagle0128/doom-modeline -#+begin_src emacs-lisp +#+begin_src emacs-lisp :tangle ./config.el (setq all-the-icons-scale-factor .8) ;; fixes the issue of rightmost characters not fitting. (set-face-attribute 'mode-line nil :font "Iosevka Nerd Font-15") (setq doom-modeline-height 30 ;; sets modeline height @@ -596,7 +596,7 @@ https://github.com/seagle0128/doom-modeline * MOUSE SUPPORT Adding mouse support in the terminal version of Emacs. -#+begin_src emacs-lisp +#+begin_src emacs-lisp :tangle ./config.el (xterm-mouse-mode 1) #+end_src @@ -614,7 +614,7 @@ for these bindings is 'SPC =' plus 'key' since Doom Emacs does not use 'SPC ='. | ~/.config/doom/init.el | /Edit doom init.el/ | SPC = i | | ~/.config/doom/packages.el | /Edit doom packages.el/ | SPC = p | -#+begin_src emacs-lisp +#+begin_src emacs-lisp :tangle ./config.el (map! :leader (:prefix ("=" . "open file") :desc "Edit agenda file" "a" #'(lambda () (interactive) @@ -633,7 +633,7 @@ for these bindings is 'SPC =' plus 'key' since Doom Emacs does not use 'SPC ='. When configured properly lsp-mode's performance is on par with mainstream LSP clients (e. g. VScode, Theia, etc). Here are steps to achieve optimal results. -#+begin_src emacs-lisp +#+begin_src emacs-lisp :tangle ./config.el (setq read-process-output-max (* 1024 1024)) ;; 1mb (setq lsp-idle-delay 0.500) (setq lsp-log-io nil) ; if set to true can cause a performance hit @@ -656,7 +656,7 @@ settings overwrite the original org settings, and this require to run after org, so they can build upon the variables defined by the default configuration of Doom Emacs. -#+begin_src emacs-lisp +#+begin_src emacs-lisp :tangle ./config.el (after! org (setq org-directory "~/Documents/Notes/" org-agenda-files (directory-files-recursively @@ -703,7 +703,7 @@ have level 1 headings to be 140% in height, level 2 to be 130%, etc. Other interesting things you could play with include adding :foreground color and/or :background color if you want to override the theme colors. -#+begin_src emacs-lisp +#+begin_src emacs-lisp :tangle ./config.el (custom-set-faces '(org-level-1 ((t (:inherit outline-1 :height 1.4)))) '(org-level-2 ((t (:inherit outline-2 :height 1.3)))) @@ -718,7 +718,7 @@ interesting things you could play with include adding :foreground color and/or This change makes it so org-alert uses libnotify for system notifications as well as update intervals. -#+begin_src emacs-lisp +#+begin_src emacs-lisp :tangle ./config.el ;; (use-package org-alert ;; :ensure t) ;; (setq alert-default-style 'libnotify @@ -731,7 +731,7 @@ well as update intervals. Allows you to add the option #+auto_tangle: t in your Org file so that it automatically tangles when you save the document. -#+begin_src emacs-lisp +#+begin_src emacs-lisp :tangle ./config.el (use-package org-auto-tangle :defer t :hook (org-mode . org-auto-tangle-mode)) @@ -740,7 +740,7 @@ automatically tangles when you save the document. ** Org-Babel Load language support on org-babel, also map out org-babel-tangle. -#+begin_src emacs-lisp +#+begin_src emacs-lisp :tangle ./config.el (map! :leader :desc "Org babel tangle" "m B" #'org-babel-tangle) ;; (org-babel-do-load-languages @@ -756,7 +756,7 @@ turns the header into a task, allowing for the insertion of TODO or PROJ without disrupting the indentation of the lines below it. https://github.com/amluto/org-mode/blob/master/lisp/org-inlinetask.el -#+begin_src emacs-lisp +#+begin_src emacs-lisp :tangle ./config.el (require 'org-inlinetask) (setq org-inlinetask-min-level 9) #+end_src @@ -774,7 +774,7 @@ templates for dailies, and nodes. | org-roam-dailies-find-tomorrow | org roam dailies find tomorrow | SPC n r d m | | org-roam-dailies-find-yesterday | org roam dailies find yesterday | SPC n r d y | -#+begin_src emacs-lisp +#+begin_src emacs-lisp :tangle ./config.el (setq deft-directory "~/Documents/Notes/") (use-package org-roam :ensure t @@ -814,7 +814,7 @@ templates for dailies, and nodes. This is a superior (and interactive) visualizer for org-roam graph. https://github.com/org-roam/org-roam-ui -#+begin_src emacs-lisp +#+begin_src emacs-lisp :tangle ./config.el (use-package! websocket :after org-roam) @@ -846,7 +846,7 @@ https://github.com/nobiot/org-transclusion | org-transclusion-mode | Toggle transclusion mode | SPC n r t | -#+begin_src emacs-lisp +#+begin_src emacs-lisp :tangle ./config.el (use-package! org-transclusion :after org :init @@ -866,19 +866,19 @@ Uses [[doom-package:][undo-tree]] instead of [[doom-package:][undo-fu]], which i branching undo history and a visualizer for navigating it. + If using +tree - #+begin_src emacs-lisp + #+begin_src emacs-lisp :tangle ./config.el (after! undo-tree (setq undo-tree-auto-save-history nil)) #+end_src + Else - #+begin_src emacs-lisp + #+begin_src emacs-lisp :tangle ./config.el ;; (remove-hook 'undo-fu-mode-hook #'global-undo-fu-session-mode) #+end_src ** User information -#+begin_src emacs-lisp +#+begin_src emacs-lisp :tangle ./config.el (setq user-full-name "Danilo Reyes" user-mail-address "CaptainJawZ@outlook.com") #+end_src @@ -888,7 +888,7 @@ Custom set variables, I should note that I don't know what git commit major mode does, but flycheck is for minimizing errors on python scripts for long line length. -#+begin_src emacs-lisp +#+begin_src emacs-lisp :tangle ./config.el (custom-set-variables '(flycheck-flake8-maximum-line-length 88) '(safe-local-variable-values '((git-commit-major-mode . git-commit-elisp-text-mode)))) @@ -918,7 +918,7 @@ choose to replace the 'C-x r' part of the key chords with 'SPC r'. | increment-register | /Increment register/ | SPC r + | | point-to-register | /Point to register/ | SPC r SPC | -#+begin_src emacs-lisp +#+begin_src emacs-lisp :tangle ./config.el (map! :leader (:prefix ("r" . "registers") :desc "Copy to register" "c" #'copy-to-register @@ -937,7 +937,7 @@ choose to replace the 'C-x r' part of the key chords with 'SPC r'. * SPELL This will disable Proselint from running inside code blocks. -#+begin_src emacs-lisp +#+begin_src emacs-lisp :tangle ./config.el (defadvice! fixed-flycheck-proselint-parse-errors-a (output checker buffer) :override #'flycheck-proselint-parse-errors (delq @@ -971,7 +971,7 @@ visible immediately in the other. But in all other respects, the indirect buffer and its base buffer are separate. For example, I can fold one split but the other remains unfolded. -#+begin_src emacs-lisp +#+begin_src emacs-lisp :tangle ./config.el (defun prefer-horizontal-split () (set-variable 'split-height-threshold nil t) (set-variable 'split-width-threshold 40 t)) ; make this as low as needed @@ -983,7 +983,7 @@ the other remains unfolded. * TWITTER Needed to login on twitter. -#+begin_src emacs-lisp +#+begin_src emacs-lisp :tangle ./config.el (setq twittering-allow-insecure-server-cert t) #+end_src @@ -992,7 +992,7 @@ Winner mode comes with GNU Emacs since version 20. This is a global minor mode and, when activated, it allows you to “undo” (and “redo”) changes in the window configuration with the key commands 'SCP w ' and 'SPC w '. -#+begin_src emacs-lisp +#+begin_src emacs-lisp :tangle ./config.el (map! :leader (:prefix ("w" . "window") :desc "Winner redo" "" #'winner-redo @@ -1030,7 +1030,7 @@ occurrence of 'e' including the 'e', then you would use 'dfe'. And you can modify 'dt' and 'df' by prefixing them with numbers, so '2dte' would delete to the second occurrence of 'e'. -#+begin_src emacs-lisp +#+begin_src emacs-lisp :tangle ./config.el (map! :leader :desc "Zap to char" "z" #'zap-to-char :desc "Zap up to char" "Z" #'zap-up-to-char)