Compare commits
1 Commits
Author | SHA1 | Date |
---|---|---|
coolneng | be91582932 |
|
@ -1,43 +1,6 @@
|
||||||
;;; +keybindings.el -*- lexical-binding: t; -*-
|
;;; +keybindings.el -*- lexical-binding: t; -*-
|
||||||
;; Custom keybindings
|
;; Custom keybindings
|
||||||
;;
|
;;
|
||||||
;; Select target in Makefile compilation as default
|
|
||||||
(map! :leader :n "c c" #'makefile-executor-execute-project-target)
|
|
||||||
;; Keybindings for R markdown polymode
|
|
||||||
(map! :map poly-markdown+R-mode-map
|
|
||||||
:n "RET" #'polymode-eval-chunk
|
|
||||||
:desc "Evaluate code block")
|
|
||||||
;; Map elfeed to global keybinding
|
|
||||||
(map! :leader :n "o e" #'=rss
|
|
||||||
:desc "RSS reader")
|
|
||||||
;; Map wallabag to global keybinding
|
|
||||||
(map! :leader :n "o w" #'=wallabag
|
|
||||||
:desc "Read saved articles")
|
|
||||||
;; Keybindings for org-noter
|
|
||||||
(map! :mode pdf-view-mode
|
|
||||||
:n "i" #'org-noter-insert-note
|
|
||||||
:desc "Insert note with a subheading")
|
|
||||||
(map! :mode pdf-view-mode
|
|
||||||
:n "x" #'org-noter-kill-session
|
|
||||||
:desc "Kill the current org-noter session")
|
|
||||||
;; Keybindings for pdf-view
|
|
||||||
(map! :mode pdf-view-mode
|
|
||||||
:n ":" #'pdf-view-goto-page
|
|
||||||
:desc "Move to the selected page")
|
|
||||||
;; Keybindings for mu4e
|
|
||||||
(map! :mode mu4e-view-mode
|
|
||||||
:n "S" #'mu4e-view-save-attachments
|
|
||||||
:desc "Save the chosen mail attachments")
|
|
||||||
;; Keybindings for next/previous buffer
|
;; Keybindings for next/previous buffer
|
||||||
(map! :n "C-c j" #'previous-buffer)
|
(map! :n "C-c j" #'previous-buffer)
|
||||||
(map! :n "C-c k" #'next-buffer)
|
(map! :n "C-c k" #'next-buffer)
|
||||||
;; Keybindings for citar
|
|
||||||
(map! :leader :n "n B" #'citar-open-files
|
|
||||||
:desc "Open associated PDF with bibliography entry")
|
|
||||||
;; Keybindings for PlatformIO
|
|
||||||
(map! :after platformio-mode
|
|
||||||
:map platformio-mode-map
|
|
||||||
(:localleader
|
|
||||||
:desc "Compile the project" "c c" #'platformio-build
|
|
||||||
:desc "Upload the project" "c u" #'platformio-upload
|
|
||||||
:desc "Monitor the serial console" "c m" #'platformio-device-monitor))
|
|
||||||
|
|
57
+mail.el
57
+mail.el
|
@ -1,57 +0,0 @@
|
||||||
;;; +mail.el -*- lexical-binding: t; -*-
|
|
||||||
;; Mu4e configuration
|
|
||||||
;;
|
|
||||||
;; Set up the default email identity
|
|
||||||
(setq user-full-name "Amin Kasrou Aouam")
|
|
||||||
;; Use msmtp to send email
|
|
||||||
(setq sendmail-program (executable-find "msmtp")
|
|
||||||
send-mail-function #'smtpmail-send-it
|
|
||||||
message-sendmail-f-is-evil t
|
|
||||||
message-sendmail-extra-arguments '("--read-envelope-from")
|
|
||||||
message-send-mail-function #'message-send-mail-with-sendmail)
|
|
||||||
;; Account configuration
|
|
||||||
(set-email-account! "gmail"
|
|
||||||
'((mu4e-sent-folder . "/gmail/sent")
|
|
||||||
(mu4e-drafts-folder . "/gmail/drafts")
|
|
||||||
(mu4e-trash-folder . "/gmail/trash")
|
|
||||||
(mu4e-refile-folder . "/gmail/archive")
|
|
||||||
(smtpmail-smtp-user . "akasroua@gmail.com")
|
|
||||||
(user-mail-address . "akasroua@gmail.com"))
|
|
||||||
t)
|
|
||||||
(set-email-account! "ugent"
|
|
||||||
'((mu4e-sent-folder . "/ugent/sent")
|
|
||||||
(mu4e-drafts-folder . "/ugent/drafts")
|
|
||||||
(mu4e-trash-folder . "/ugent/trash")
|
|
||||||
(mu4e-refile-folder . "/ugent/archive")
|
|
||||||
(smtpmail-smtp-user . "amin.kasrouaouam@ugent.be")
|
|
||||||
(user-mail-address . "amin.kasrouaouam@ugent.be"))
|
|
||||||
t)
|
|
||||||
(set-email-account! "disroot"
|
|
||||||
'((mu4e-sent-folder . "/disroot/sent")
|
|
||||||
(mu4e-drafts-folder . "/disroot/drafts")
|
|
||||||
(mu4e-trash-folder . "/disroot/trash")
|
|
||||||
(mu4e-refile-folder . "/disroot/archive")
|
|
||||||
(smtpmail-smtp-user . "akasroua@disroot.org")
|
|
||||||
(user-mail-address . "akasroua@disroot.org"))
|
|
||||||
t)
|
|
||||||
;; Configure mu4e contexts
|
|
||||||
(setq mu4e-context-policy 'ask-if-none
|
|
||||||
mu4e-compose-context-policy 'ask-if-none)
|
|
||||||
;; Run lazy check when syncing
|
|
||||||
(setq mu4e-index-lazy-check t)
|
|
||||||
;; Use ISO dates
|
|
||||||
(setq mu4e-headers-date-format "%Y-%m-%d %H:%M")
|
|
||||||
;; Disable colors for HTML emails
|
|
||||||
(setq shr-use-colors nil)
|
|
||||||
;; Use shortcuts to access inboxes easily
|
|
||||||
(setq mu4e-maildir-shortcuts
|
|
||||||
'(("/disroot/inbox" . ?d)
|
|
||||||
("/gmail/inbox" . ?g)
|
|
||||||
("/ugent/inbox" . ?u)))
|
|
||||||
;; Change mu4e bookmarks
|
|
||||||
(setq mu4e-bookmarks '((:name "Unread messages" :query "flag:unread AND NOT flag:trashed" :key 117)
|
|
||||||
(:name "Today's messages" :query "date:today..now" :key 116)
|
|
||||||
(:name "Last 7 days" :query "date:7d..now" :hide-unread t :key 119)))
|
|
||||||
;; HACK Fix mu 1.10 layout
|
|
||||||
(set-popup-rule! "^\\*mu4e-\\(main\\|headers\\)\\*" :ignore t)
|
|
||||||
(set-popup-rule! "^\\*mu4e-draft\\*" :size 0.7 :vslot -4 :select t :quit nil :ttl 0)
|
|
91
+org.el
91
+org.el
|
@ -9,47 +9,6 @@
|
||||||
(set-company-backend! 'org-mode nil)
|
(set-company-backend! 'org-mode nil)
|
||||||
;; Turn off line numbers
|
;; Turn off line numbers
|
||||||
(add-hook! 'org-mode-hook (display-line-numbers-mode -1))
|
(add-hook! 'org-mode-hook (display-line-numbers-mode -1))
|
||||||
;; Add Notes to agenda
|
|
||||||
(setq org-agenda-files '("~/Notes"))
|
|
||||||
;; Tailor Org super agenda
|
|
||||||
(use-package! org-super-agenda
|
|
||||||
:after org-agenda
|
|
||||||
:init
|
|
||||||
(setq org-agenda-skip-scheduled-if-done t
|
|
||||||
org-agenda-skip-deadline-if-done t
|
|
||||||
org-agenda-include-deadlines t
|
|
||||||
org-agenda-tags-column 100
|
|
||||||
org-agenda-block-separator nil
|
|
||||||
org-agenda-compact-blocks t
|
|
||||||
org-agenda-start-day nil
|
|
||||||
org-agenda-span 1
|
|
||||||
org-agenda-start-on-weekday nil)
|
|
||||||
(setq org-super-agenda-groups '((:name "Overdue"
|
|
||||||
:deadline past
|
|
||||||
:order 0)
|
|
||||||
(:name "Important"
|
|
||||||
:and (:priority "A" :deadline future)
|
|
||||||
:order 1)
|
|
||||||
(:name "Today"
|
|
||||||
:time-grid t
|
|
||||||
:scheduled today
|
|
||||||
:deadline today
|
|
||||||
:order 2)
|
|
||||||
(:name "Assignments"
|
|
||||||
:tag "labs"
|
|
||||||
:order 3)
|
|
||||||
(:name "Mails"
|
|
||||||
:tag "mail"
|
|
||||||
:order 4)
|
|
||||||
(:name "Errands"
|
|
||||||
:tag ("errand" "call")
|
|
||||||
:order 10)
|
|
||||||
(:name "Thesis"
|
|
||||||
:tag "thesis"
|
|
||||||
:order 6)
|
|
||||||
(:discard (:tag ("periodic" "birthday")))))
|
|
||||||
:config
|
|
||||||
(org-super-agenda-mode))
|
|
||||||
;; Add timestamp to DONE task
|
;; Add timestamp to DONE task
|
||||||
(setq org-log-done 'time)
|
(setq org-log-done 'time)
|
||||||
;; Print babel results to the buffer and export them
|
;; Print babel results to the buffer and export them
|
||||||
|
@ -92,10 +51,6 @@
|
||||||
(use-package! engrave-faces-latex
|
(use-package! engrave-faces-latex
|
||||||
:after ox-latex)
|
:after ox-latex)
|
||||||
(setq org-latex-src-block-backend 'engraved)
|
(setq org-latex-src-block-backend 'engraved)
|
||||||
;; Set up bibliography management
|
|
||||||
(setq org-cite-global-bibliography '("~/Documents/Uni/Thesis/docs/bibliography.bib")
|
|
||||||
citar-bibliography org-cite-global-bibliography
|
|
||||||
citar-library-paths '("~/Documents/Uni/Thesis/bibliography"))
|
|
||||||
;; Add citeproc and metadata-file options to ox-pandoc
|
;; Add citeproc and metadata-file options to ox-pandoc
|
||||||
(after! ox-pandoc
|
(after! ox-pandoc
|
||||||
(add-to-list 'org-pandoc-valid-options 'citeproc)
|
(add-to-list 'org-pandoc-valid-options 'citeproc)
|
||||||
|
@ -106,46 +61,8 @@
|
||||||
(setq org-pomodoro-length '45
|
(setq org-pomodoro-length '45
|
||||||
org-pomodoro-short-break-length '15
|
org-pomodoro-short-break-length '15
|
||||||
org-pomodoro-long-break-length '30
|
org-pomodoro-long-break-length '30
|
||||||
org-pomodoro-audio-player "pw-play"
|
|
||||||
org-pomodoro-time-format "%.2m min"
|
org-pomodoro-time-format "%.2m min"
|
||||||
org-pomodoro-keep-killed-pomodoro-time t)
|
org-pomodoro-keep-killed-pomodoro-time t)
|
||||||
;; Define declarative org capture remplates
|
|
||||||
(use-package! doct
|
|
||||||
:commands doct)
|
|
||||||
(setq org-capture-templates
|
|
||||||
(doct `(("Cookbook" :keys "c"
|
|
||||||
:file "~/Notes/Recipes.org"
|
|
||||||
:type entry
|
|
||||||
:template ("%(org-chef-get-recipe-from-url)"))
|
|
||||||
("Reference" :keys "r"
|
|
||||||
:type entry
|
|
||||||
:file "~/Documents/Uni/Thesis/docs/Bibliography.org"
|
|
||||||
:function org-goto
|
|
||||||
:fetch-bibtex (lambda () (org-capture-ref-process-capture))
|
|
||||||
:org-entry (lambda () (org-capture-ref-get-org-entry))
|
|
||||||
:template
|
|
||||||
("%{fetch-bibtex}* %?%{space}%(org-capture-ref-get-bibtex-field :title)"
|
|
||||||
"#+begin_src bibtex"
|
|
||||||
"%(org-capture-ref-get-bibtex-field :bibtex-string)"
|
|
||||||
"#+end_src")))))
|
|
||||||
;; Fix org-chef scraping
|
|
||||||
(setq org-chef-prefer-json-ld t)
|
|
||||||
;; Get the current state of org-pomodoro
|
|
||||||
(defun bergheim/org-clock-status ()
|
|
||||||
"Return the org time status - including any pomodoro activity"
|
|
||||||
(if (and (featurep 'org-pomodoro) (org-pomodoro-active-p))
|
|
||||||
(cl-case org-pomodoro-state
|
|
||||||
(:pomodoro
|
|
||||||
(format "%d min" (/ (org-pomodoro-remaining-seconds) 60)))
|
|
||||||
(:short-break
|
|
||||||
(format "Short break: %d min" (/ (org-pomodoro-remaining-seconds) 60)))
|
|
||||||
(:long-break
|
|
||||||
(format "Long break: %d min" (/ (org-pomodoro-remaining-seconds) 60)))
|
|
||||||
(:overtime
|
|
||||||
(format "Overtime! %d min" (/ (org-pomodoro-remaining-seconds) 60))))
|
|
||||||
(if (org-clocking-p)
|
|
||||||
(format "%s" (org-duration-from-minutes (org-clock-get-clocked-time)))
|
|
||||||
"")))
|
|
||||||
;; Save org-download images to an assets directory
|
;; Save org-download images to an assets directory
|
||||||
(after! org-download
|
(after! org-download
|
||||||
(setq org-download-image-dir "assets/"
|
(setq org-download-image-dir "assets/"
|
||||||
|
@ -176,16 +93,8 @@
|
||||||
(sp-local-pair "/" "/")
|
(sp-local-pair "/" "/")
|
||||||
(sp-local-pair "~" "~")
|
(sp-local-pair "~" "~")
|
||||||
(sp-local-pair "$" "$")))
|
(sp-local-pair "$" "$")))
|
||||||
;; Only show a task once if it has a schedule and deadline
|
|
||||||
(setq org-agenda-skip-deadline-prewarning-if-scheduled t)
|
|
||||||
;; Show raw latex when the cursor on the expression
|
;; Show raw latex when the cursor on the expression
|
||||||
(add-hook! 'org-mode-hook 'org-fragtog-mode)
|
(add-hook! 'org-mode-hook 'org-fragtog-mode)
|
||||||
;; Auto tangle on save
|
|
||||||
(add-hook! 'org-mode-hook 'org-auto-tangle-mode)
|
|
||||||
;; Save bibtex to annotated bibliography with category selection
|
|
||||||
(setq org-goto-interface 'outline-path-completion
|
|
||||||
org-goto-max-level 1)
|
|
||||||
(use-package! org-capture-ref)
|
|
||||||
;; HACK Fix search folded sections
|
;; HACK Fix search folded sections
|
||||||
(setq org-fold-core-style 'overlays)
|
(setq org-fold-core-style 'overlays)
|
||||||
(evil-select-search-module 'evil-search-module 'evil-search)
|
(evil-select-search-module 'evil-search-module 'evil-search)
|
||||||
|
|
49
+ui.el
49
+ui.el
|
@ -3,37 +3,16 @@
|
||||||
;; Set Font and theme
|
;; Set Font and theme
|
||||||
(setq doom-font (font-spec :family "Iosevka Medium" :size 26)
|
(setq doom-font (font-spec :family "Iosevka Medium" :size 26)
|
||||||
doom-theme 'doom-one)
|
doom-theme 'doom-one)
|
||||||
;; Display Magit status in fullscreen
|
|
||||||
(after! magit
|
|
||||||
(setq magit-display-buffer-function #'magit-display-buffer-fullframe-status-v1))
|
|
||||||
;; Match pdf-tools colors to the theme and fit to page by default
|
|
||||||
(after! pdf-tools
|
|
||||||
(setq pdf-view-midnight-colors '("#BBC2CF" . "#282C34"))
|
|
||||||
(add-hook 'pdf-tools-enabled-hook 'pdf-view-midnight-minor-mode))
|
|
||||||
;; Customize modeline
|
;; Customize modeline
|
||||||
(setq doom-modeline-major-mode-icon t
|
(setq doom-modeline-buffer-encoding nil)
|
||||||
doom-modeline-buffer-encoding nil)
|
|
||||||
;; Hide direnv environment variables popup
|
|
||||||
(setq direnv-always-show-summary nil)
|
|
||||||
;; Change splash-screen banner
|
;; Change splash-screen banner
|
||||||
(setq fancy-splash-image "~/.doom.d/assets/emacs.svg")
|
(setq fancy-splash-image "~/.doom.d/assets/emacs.svg")
|
||||||
;; Disable LSP documentation popup
|
|
||||||
(after! lsp-ui
|
|
||||||
(setq lsp-ui-doc-enable nil
|
|
||||||
lsp-signature-auto-activate nil
|
|
||||||
lsp-enable-symbol-highlighting nil
|
|
||||||
lsp-ui-sideline-enable nil
|
|
||||||
lsp-modeline-code-actions-enable nil
|
|
||||||
lsp-headerline-breadcrumb-enable nil
|
|
||||||
lsp-len-enable nil))
|
|
||||||
;; Shrink minibuffer
|
;; Shrink minibuffer
|
||||||
(after! vertico
|
(after! vertico
|
||||||
(setq vertico-count 8))
|
(setq vertico-count 8))
|
||||||
;; Eliminate gaps between windows
|
;; Eliminate gaps between windows
|
||||||
(after! frame
|
(after! frame
|
||||||
(remove-hook 'doom-init-ui-hook #'window-divider-mode))
|
(remove-hook 'doom-init-ui-hook #'window-divider-mode))
|
||||||
;; Reduce size of the popup terminal
|
|
||||||
(set-popup-rule! "*doom:vterm-popup:*" :size 0.25 :vslot -4 :select t :quit nil :ttl 0)
|
|
||||||
;; Show matching parenthesis on the minibuffer
|
;; Show matching parenthesis on the minibuffer
|
||||||
(after! smartparens (show-smartparens-global-mode t))
|
(after! smartparens (show-smartparens-global-mode t))
|
||||||
;; Modify the splash screen actions
|
;; Modify the splash screen actions
|
||||||
|
@ -52,28 +31,12 @@
|
||||||
:action org-agenda)
|
:action org-agenda)
|
||||||
("Recently opened files"
|
("Recently opened files"
|
||||||
:icon (nerd-icons-faicon "nf-fa-file_text" :face 'doom-dashboard-menu-title)
|
:icon (nerd-icons-faicon "nf-fa-file_text" :face 'doom-dashboard-menu-title)
|
||||||
:action recentf-open-files)
|
:action recentf-open-files)))
|
||||||
("Open email client"
|
|
||||||
:icon (nerd-icons-octicon "nf-oct-mail" :face 'doom-dashboard-menu-title)
|
|
||||||
:when (featurep! :email mu4e)
|
|
||||||
:face (:inherit (doom-dashboard-menu-title bold))
|
|
||||||
:action =mu4e)
|
|
||||||
("RSS reader"
|
|
||||||
:icon (nerd-icons-octicon "nf-oct-rss" :face 'doom-dashboard-menu-title)
|
|
||||||
:when (featurep! :app rss)
|
|
||||||
:face (:inherit (doom-dashboard-menu-title bold))
|
|
||||||
:action =rss)
|
|
||||||
("Read saved articles"
|
|
||||||
:icon (nerd-icons-octicon "nf-oct-book" :face 'doom-dashboard-menu-title)
|
|
||||||
:face (:inherit (doom-dashboard-menu-title bold))
|
|
||||||
:action =wallabag)))
|
|
||||||
;; Restore previous session without confirmation
|
;; Restore previous session without confirmation
|
||||||
(defadvice! restore-no-confirm-session-quickload-a ()
|
(defadvice! restore-no-confirm-session-quickload-a ()
|
||||||
:override #'doom/quickload-session
|
:override #'doom/quickload-session
|
||||||
(message "Restoring session...")
|
(message "Restoring session...")
|
||||||
(doom-load-session)
|
(doom-load-session)
|
||||||
(message "Session restored. Welcome back."))
|
(message "Session restored. Welcome back."))
|
||||||
;; Decrease size of icons in the modeline
|
;; Decrease size of icons in the modeline
|
||||||
(setq nerd-icons-scale-factor 1.0)
|
(setq nerd-icons-scale-factor 1.0)
|
||||||
;; Increase size of the PlatformIO compilation buffer
|
|
||||||
(set-popup-rule! "*platformio*" :size 0.25 :vslot -4 :select t :quit t :ttl 0)
|
|
||||||
|
|
112
config.el
112
config.el
|
@ -6,24 +6,12 @@
|
||||||
(load! "+ui")
|
(load! "+ui")
|
||||||
;; Load custom keybindings
|
;; Load custom keybindings
|
||||||
(load! "+keybindings")
|
(load! "+keybindings")
|
||||||
;; Set projects directories
|
;; Auto cleanup recentf
|
||||||
(setq projectile-project-search-path '(("~/Projects" . 2)
|
|
||||||
("~/Documents/Work" . 1)
|
|
||||||
("~/Documents/Papers" . 0)
|
|
||||||
("~/Documents/Typesetting" . 1)
|
|
||||||
("~/Documents/Paperwork" . 1)
|
|
||||||
("~/Documents/Typesetting" . 1)
|
|
||||||
("~/Documents/Uni" . 3)
|
|
||||||
("~/Repos" . 1)
|
|
||||||
"~/.dotfiles"
|
|
||||||
"~/Notes"))
|
|
||||||
; Auto cleanup recentf
|
|
||||||
(setq recentf-auto-cleanup 300)
|
(setq recentf-auto-cleanup 300)
|
||||||
; Save backup files to ~/.cache and autosave files to ~/.cache/emacs
|
;; Save backup files to ~/.cache and autosave files to ~/.cache/emacs
|
||||||
(setq backup-directory-alist `(("." . "~/.cache"))
|
(setq backup-directory-alist `(("." . "~/.cache"))
|
||||||
auto-save-list-file-prefix (concat "~/.cache"))
|
auto-save-list-file-prefix (concat "~/.cache"))
|
||||||
;; Load org configuration
|
;; Load org configuration
|
||||||
(setq org-directory "~/Notes")
|
|
||||||
(after! org (load! "+org"))
|
(after! org (load! "+org"))
|
||||||
;; Disable completion and line numbers in Markdown
|
;; Disable completion and line numbers in Markdown
|
||||||
(add-hook! 'markdown-mode-hook (display-line-numbers-mode -1))
|
(add-hook! 'markdown-mode-hook (display-line-numbers-mode -1))
|
||||||
|
@ -59,111 +47,15 @@
|
||||||
;; Map leader key for major mode to ,
|
;; Map leader key for major mode to ,
|
||||||
(setq evil-snipe-override-evil-repeat-keys nil)
|
(setq evil-snipe-override-evil-repeat-keys nil)
|
||||||
(setq doom-localleader-key ",")
|
(setq doom-localleader-key ",")
|
||||||
;; Disable company mode in Nix
|
|
||||||
(setq-hook! 'nix-mode-hook company-idle-delay nil)
|
|
||||||
;; Trigger flycheck after save
|
;; Trigger flycheck after save
|
||||||
(setq flycheck-check-syntax-automatically '(save))
|
(setq flycheck-check-syntax-automatically '(save))
|
||||||
;; Ignore development databases folders
|
|
||||||
(after! lsp-mode
|
|
||||||
(add-to-list 'lsp-file-watch-ignored-directories "[/\\\\]\\.mysql\\'")
|
|
||||||
(add-to-list 'lsp-file-watch-ignored-directories "[/\\\\]\\.pgdata\\'"))
|
|
||||||
;; Ignore empty files
|
|
||||||
(after! projectile
|
|
||||||
(add-to-list 'projectile-globally-ignored-files ".gitkeep")
|
|
||||||
(add-to-list 'projectile-globally-ignored-files ".envrc")
|
|
||||||
(add-to-list 'projectile-globally-ignored-files ".project")
|
|
||||||
(add-to-list 'projectile-globally-ignored-directories ".direnv")
|
|
||||||
(add-to-list 'projectile-globally-ignored-directories ".ipynb_checkpoints"))
|
|
||||||
;; Associate polymode to R markdown files
|
|
||||||
(add-to-list 'auto-mode-alist '("\\.[rR]md\\'" . poly-markdown+R-mode))
|
|
||||||
;; Set clangd as C/C++ LSP
|
|
||||||
(setq lsp-clients-clangd-args '("-j=3"
|
|
||||||
"--background-index"
|
|
||||||
"--clang-tidy"
|
|
||||||
"--completion-style=detailed"
|
|
||||||
"--header-insertion=never"
|
|
||||||
"--header-insertion-decorators=0"))
|
|
||||||
(after! lsp-clangd (set-lsp-priority! 'clangd 2))
|
|
||||||
;; Use relative line numbers (Usage: number <j/k>)
|
;; Use relative line numbers (Usage: number <j/k>)
|
||||||
(setq display-line-numbers-type 'relative)
|
(setq display-line-numbers-type 'relative)
|
||||||
;; Use pass as auth-source
|
|
||||||
(add-to-list 'auth-sources 'password-store)
|
|
||||||
;; Set up wallabag
|
|
||||||
(after! wallabag
|
|
||||||
(setq wallabag-host "https://wallabag.coolneng.duckdns.org"
|
|
||||||
wallabag-username "coolneng"
|
|
||||||
wallabag-password (auth-source-pass-get 'secret "api/wallabag")
|
|
||||||
wallabag-clientid (auth-source-pass-get "clientid" "api/wallabag")
|
|
||||||
wallabag-secret (auth-source-pass-get "api-secret" "api/wallabag")
|
|
||||||
wallabag-show-sidebar 't
|
|
||||||
wallabag-show-entry-switch 'switch-to-buffer
|
|
||||||
url-automatic-caching t)
|
|
||||||
(add-hook! 'wallabag-after-render-hook 'wallabag-search-update-and-clear-filter))
|
|
||||||
(add-hook! 'doom-real-buffer-functions
|
|
||||||
(defun +rss-buffer-p (buf)
|
|
||||||
(string-match-p "^\\*wallabag" (buffer-name buf))))
|
|
||||||
(defvar +wallabag-workspace-name "*wallabag*")
|
|
||||||
(defun =wallabag ()
|
|
||||||
"Activate (or switch to) `wallabag' in its workspace."
|
|
||||||
(interactive)
|
|
||||||
(if (modulep! :ui workspaces)
|
|
||||||
(progn
|
|
||||||
(+workspace-switch +wallabag-workspace-name t)
|
|
||||||
(doom/switch-to-scratch-buffer)
|
|
||||||
(wallabag)
|
|
||||||
(+workspace/display))
|
|
||||||
(setq +wallabag--wconf (current-window-configuration))
|
|
||||||
(delete-other-windows)
|
|
||||||
(switch-to-buffer (doom-fallback-buffer))
|
|
||||||
(wallabag)))
|
|
||||||
;; Set up elfeed
|
|
||||||
(after! elfeed
|
|
||||||
(setq elfeed-use-curl t)
|
|
||||||
(setq elfeed-feeds (list
|
|
||||||
(list "fever+https://coolneng@rss.coolneng.duckdns.org"
|
|
||||||
:api-url "https://rss.coolneng.duckdns.org/fever/"
|
|
||||||
:password (auth-source-pass-get 'secret "api/miniflux"))))
|
|
||||||
(setq elfeed-sort-order 'ascending
|
|
||||||
elfeed-search-filter "@all +unread"
|
|
||||||
elfeed-goodies/tag-column-width 0)
|
|
||||||
(elfeed-protocol-enable)
|
|
||||||
(add-hook! 'elfeed-search-mode-hook 'elfeed-update)
|
|
||||||
;; Use different font and show article in fullscreen
|
|
||||||
(setq elfeed-show-entry-switch #'switch-to-buffer)
|
|
||||||
(defadvice! +rss-elfeed-wrap-h-nicer ()
|
|
||||||
"Enhances an elfeed entry's readability by wrapping it to a width of
|
|
||||||
`fill-column' and centering it with `visual-fill-column-mode'."
|
|
||||||
:override #'+rss-elfeed-wrap-h
|
|
||||||
(setq-local truncate-lines nil
|
|
||||||
shr-width 160
|
|
||||||
visual-fill-column-center-text t
|
|
||||||
default-text-properties '(line-height 1.1))
|
|
||||||
(let ((inhibit-read-only t)
|
|
||||||
(inhibit-modification-hooks t))
|
|
||||||
(visual-fill-column-mode)
|
|
||||||
(setq-local shr-current-font '(:family "Lato" :height 1.1))
|
|
||||||
(set-buffer-modified-p nil))))
|
|
||||||
;; Set up the mail stack
|
|
||||||
(after! mu4e (load! "+mail"))
|
|
||||||
;; HACK Enable AOT native compilation
|
|
||||||
(setq native-comp-jit-compilation nil)
|
|
||||||
(after! (doom-packages straight)
|
|
||||||
(setq straight--native-comp-available t))
|
|
||||||
;; Use PlatformIO for Arduino development
|
|
||||||
(use-package! platformio-mode
|
|
||||||
:after cc-mode
|
|
||||||
:config
|
|
||||||
(add-hook! 'c++-mode-hook (platformio-conditionally-enable)))
|
|
||||||
;; Disable Pyright's type checking
|
|
||||||
(after! lsp-pyright
|
|
||||||
(setq lsp-pyright-use-library-code-for-types nil))
|
|
||||||
;; Set indentation level to 2
|
;; Set indentation level to 2
|
||||||
(setq tab-width 2)
|
(setq tab-width 2)
|
||||||
;; Move buffer while maintaining cursor centered
|
;; Move buffer while maintaining cursor centered
|
||||||
(use-package! centered-cursor-mode
|
(use-package! centered-cursor-mode
|
||||||
:config
|
:config
|
||||||
(global-centered-cursor-mode))
|
(global-centered-cursor-mode))
|
||||||
;; Enable smooth scrolling
|
|
||||||
(pixel-scroll-precision-mode)
|
|
||||||
;; Restore previous session on startup
|
;; Restore previous session on startup
|
||||||
(add-hook 'window-setup-hook #'doom/quickload-session)
|
(add-hook 'window-setup-hook #'doom/quickload-session)
|
||||||
|
|
70
init.el
70
init.el
|
@ -11,7 +11,7 @@
|
||||||
(doom! :input
|
(doom! :input
|
||||||
;;chinese
|
;;chinese
|
||||||
;;japanese
|
;;japanese
|
||||||
;layout ; auie,ctsrnm is the superior home row
|
;layout ; auie,ctsrnm is the superior home row
|
||||||
|
|
||||||
:completion
|
:completion
|
||||||
(company +tng) ; the ultimate code completion backend
|
(company +tng) ; the ultimate code completion backend
|
||||||
|
@ -44,7 +44,7 @@
|
||||||
;;tabs ; an tab bar for Emacs
|
;;tabs ; an tab bar for Emacs
|
||||||
;;treemacs ; a project drawer, like neotree but cooler
|
;;treemacs ; a project drawer, like neotree but cooler
|
||||||
;;unicode ; extended unicode support for various languages
|
;;unicode ; extended unicode support for various languages
|
||||||
vc-gutter ; vcs diff in the fringe
|
;;vc-gutter ; vcs diff in the fringe
|
||||||
vi-tilde-fringe ; fringe tildes to mark beyond EOB
|
vi-tilde-fringe ; fringe tildes to mark beyond EOB
|
||||||
window-select ; visually switch windows
|
window-select ; visually switch windows
|
||||||
workspaces ; tab emulation, persistence & separate workspaces
|
workspaces ; tab emulation, persistence & separate workspaces
|
||||||
|
@ -68,13 +68,13 @@
|
||||||
dired ; making dired pretty [functional]
|
dired ; making dired pretty [functional]
|
||||||
electric ; smarter, keyword-based electric-indent
|
electric ; smarter, keyword-based electric-indent
|
||||||
;;ibuffer ; interactive buffer management
|
;;ibuffer ; interactive buffer management
|
||||||
vc ; version-control and Emacs, sitting in a tree
|
;;vc ; version-control and Emacs, sitting in a tree
|
||||||
|
|
||||||
:term
|
:term
|
||||||
;;eshell ; the elisp shell that works everywhere
|
;;eshell ; the elisp shell that works everywhere
|
||||||
;;shell ; simple shell REPL for Emacs
|
;;shell ; simple shell REPL for Emacs
|
||||||
;;term ; basic terminal emulator for Emacs
|
;;term ; basic terminal emulator for Emacs
|
||||||
vterm ; the best terminal emulation in Emacs
|
;;vterm ; the best terminal emulation in Emacs
|
||||||
|
|
||||||
:checkers
|
:checkers
|
||||||
syntax ; tasing you for every semicolon you forget
|
syntax ; tasing you for every semicolon you forget
|
||||||
|
@ -83,35 +83,35 @@
|
||||||
|
|
||||||
:tools
|
:tools
|
||||||
;;ansible
|
;;ansible
|
||||||
biblio ; Writes a PhD for you (citation needed)
|
;; biblio ; Writes a PhD for you (citation needed)
|
||||||
debugger ; FIXME stepping through code, to help you add bugs
|
;; debugger ; FIXME stepping through code, to help you add bugs
|
||||||
direnv
|
;; direnv
|
||||||
;;docker
|
;;docker
|
||||||
;;editorconfig ; let someone else argue about tabs vs spaces
|
;;editorconfig ; let someone else argue about tabs vs spaces
|
||||||
;;ein ; tame Jupyter notebooks with emacs
|
;;ein ; tame Jupyter notebooks with emacs
|
||||||
(eval +overlay) ; run code, run (also, repls)
|
;;(eval +overlay) ; run code, run (also, repls)
|
||||||
;;gist ; interacting with github gists
|
;;gist ; interacting with github gists
|
||||||
lookup ; navigate your code and its documentation
|
lookup ; navigate your code and its documentation
|
||||||
;;+docsets) ; ...or in Dash docsets locally
|
;;+docsets) ; ...or in Dash docsets locally
|
||||||
lsp ; M-x vscode
|
;;lsp ; M-x vscode
|
||||||
;;macos ; MacOS-specific commands
|
;;macos ; MacOS-specific commands
|
||||||
magit ; a git porcelain for Emacs
|
;;magit ; a git porcelain for Emacs
|
||||||
make ; run make tasks from Emacs
|
;;make ; run make tasks from Emacs
|
||||||
;;pass ; password manager for nerds
|
;;pass ; password manager for nerds
|
||||||
pdf ; pdf enhancements
|
;;pdf ; pdf enhancements
|
||||||
;;prodigy ; FIXME managing external services & code builders
|
;;prodigy ; FIXME managing external services & code builders
|
||||||
;;rgb ; creating color strings
|
;;rgb ; creating color strings
|
||||||
;;terraform ; infrastructure as code
|
;;terraform ; infrastructure as code
|
||||||
;;tmux ; an API for interacting with tmux
|
;;tmux ; an API for interacting with tmux
|
||||||
tree-sitter ; syntax and parsing, sitting in a tree...
|
;;tree-sitter ; syntax and parsing, sitting in a tree...
|
||||||
upload ; map local to remote projects via ssh/ftp
|
;;upload ; map local to remote projects via ssh/ftp
|
||||||
|
|
||||||
:lang
|
:lang
|
||||||
;;agda ; types of types of types of types...
|
;;agda ; types of types of types of types...
|
||||||
;;assembly ; assembly for fun or debugging
|
;;assembly ; assembly for fun or debugging
|
||||||
;;beancount ; mind the GAAP
|
;;beancount ; mind the GAAP
|
||||||
(cc +lsp
|
;;(cc +lsp
|
||||||
+tree-sitter) ; C > C++ == 1
|
;; +tree-sitter) ; C > C++ == 1
|
||||||
;;clojure ; java with a lisp
|
;;clojure ; java with a lisp
|
||||||
;;common-lisp ; if you've seen one lisp, you've seen them all
|
;;common-lisp ; if you've seen one lisp, you've seen them all
|
||||||
;;coq ; proofs-as-programs
|
;;coq ; proofs-as-programs
|
||||||
|
@ -124,31 +124,31 @@
|
||||||
;;elm ; care for a cup of TEA?
|
;;elm ; care for a cup of TEA?
|
||||||
emacs-lisp ; drown in parentheses
|
emacs-lisp ; drown in parentheses
|
||||||
;;erlang ; an elegant language for a more civilized age
|
;;erlang ; an elegant language for a more civilized age
|
||||||
(ess +lsp) ; emacs speaks statistics
|
;;(ess +lsp) ; emacs speaks statistics
|
||||||
;;faust ; dsp, but you get to keep your soul
|
;;faust ; dsp, but you get to keep your soul
|
||||||
;;fortran ; in FORTRAN, GOD is REAL (unless declared INTEGER)
|
;;fortran ; in FORTRAN, GOD is REAL (unless declared INTEGER)
|
||||||
;;fsharp ; ML stands for Microsoft's Language
|
;;fsharp ; ML stands for Microsoft's Language
|
||||||
;;fstar ; (dependent) types and (monadic) effects and Z3
|
;;fstar ; (dependent) types and (monadic) effects and Z3
|
||||||
;;gdscript ; the language you waited for
|
;;gdscript ; the language you waited for
|
||||||
(go +lsp
|
;;(go +lsp
|
||||||
+tree-sitter) ; the hipster dialect
|
;; +tree-sitter) ; the hipster dialect
|
||||||
;;(graphql +lsp) ; Give queries a REST
|
;;(graphql +lsp) ; Give queries a REST
|
||||||
;;(haskell +lsp) ; a language that's lazier than I am
|
;;(haskell +lsp) ; a language that's lazier than I am
|
||||||
;;hy ; readability of scheme w/ speed of python
|
;;hy ; readability of scheme w/ speed of python
|
||||||
;;idris ; a language you can depend on
|
;;idris ; a language you can depend on
|
||||||
(json +tree-sitter) ; At least it ain't XML
|
;;(json +tree-sitter) ; At least it ain't XML
|
||||||
(java +lsp
|
;;(java +lsp
|
||||||
+tree-sitter) ; the poster child for carpal tunnel syndrome
|
;;+tree-sitter) ; the poster child for carpal tunnel syndrome
|
||||||
;;(javascript +lsp) ; all(hope(abandon(ye(who(enter(here))))))
|
;;(javascript +lsp) ; all(hope(abandon(ye(who(enter(here))))))
|
||||||
;;julia ; a better, faster MATLAB
|
;;julia ; a better, faster MATLAB
|
||||||
;;kotlin ; a better, slicker Java(Script)
|
;;kotlin ; a better, slicker Java(Script)
|
||||||
(latex +lsp) ; writing papers in Emacs has never been so fun
|
;;(latex +lsp) ; writing papers in Emacs has never been so fun
|
||||||
;;lean ; for folks with too much to prove
|
;;lean ; for folks with too much to prove
|
||||||
;;ledger ; an accounting system in Emacs
|
;;ledger ; an accounting system in Emacs
|
||||||
;;lua ; one-based indices? one-based indices
|
;;lua ; one-based indices? one-based indices
|
||||||
markdown ; writing docs for people to ignore
|
markdown ; writing docs for people to ignore
|
||||||
;;nim ; python + lisp at the speed of c
|
;;nim ; python + lisp at the speed of c
|
||||||
(nix +tree-sitter) ; I hereby declare "nix geht mehr!"
|
;;(nix +tree-sitter); I hereby declare "nix geht mehr!"
|
||||||
;;ocaml ; an objective camel
|
;;ocaml ; an objective camel
|
||||||
(org ; organize your plain life in plain text
|
(org ; organize your plain life in plain text
|
||||||
+dragndrop ; drag & drop files/images into org buffers
|
+dragndrop ; drag & drop files/images into org buffers
|
||||||
|
@ -158,35 +158,35 @@
|
||||||
+pandoc ; export-with-pandoc support
|
+pandoc ; export-with-pandoc support
|
||||||
+pomodoro ; be fruitful with the tomato technique
|
+pomodoro ; be fruitful with the tomato technique
|
||||||
+present) ; using org-mode for presentations
|
+present) ; using org-mode for presentations
|
||||||
;;+pretty)
|
;;+pretty)
|
||||||
;;php ; perl's insecure younger brother
|
;;php ; perl's insecure younger brother
|
||||||
;;plantuml ; diagrams for confusing people more
|
;;plantuml ; diagrams for confusing people more
|
||||||
;;purescript ; javascript, but functional
|
;;purescript ; javascript, but functional
|
||||||
(python +lsp ; beautiful is better than ugly
|
;;(python +lsp ; beautiful is better than ugly
|
||||||
+pyright
|
;;+pyright
|
||||||
+poetry
|
;;+poetry
|
||||||
+tree-sitter)
|
;;+tree-sitter)
|
||||||
;;qt ; the 'cutest' gui framework ever
|
;;qt ; the 'cutest' gui framework ever
|
||||||
;;racket ; a DSL for DSLs
|
;;racket ; a DSL for DSLs
|
||||||
;;raku ; the artist formerly known as perl6
|
;;raku ; the artist formerly known as perl6
|
||||||
rest ; Emacs as a REST client
|
;;rest ; Emacs as a REST client
|
||||||
;;rst ; ReST in peace
|
;;rst ; ReST in peace
|
||||||
;;(ruby +rails) ; 1.step {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"}
|
;;(ruby +rails) ; 1.step {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"}
|
||||||
;;rust ; Fe2O3.unwrap().unwrap().unwrap().unwrap()
|
;;rust ; Fe2O3.unwrap().unwrap().unwrap().unwrap()
|
||||||
;;scala ; java, but good
|
;;scala ; java, but good
|
||||||
;;scheme ; a fully conniving family of lisps
|
;;scheme ; a fully conniving family of lisps
|
||||||
(sh +tree-sitter) ; she sells {ba,z,fi}sh shells on the C xor
|
;;(sh +tree-sitter) ; she sells {ba,z,fi}sh shells on the C xor
|
||||||
;;sml
|
;;sml
|
||||||
;;solidity ; do you need a blockchain? No.
|
;;solidity ; do you need a blockchain? No.
|
||||||
;;swift ; who asked for emoji variables?
|
;;swift ; who asked for emoji variables?
|
||||||
;;terra ; Earth and Moon in alignment for performance.
|
;;terra ; Earth and Moon in alignment for performance.
|
||||||
(web +tree-sitter) ; the tubes
|
;;(web +tree-sitter); the tubes
|
||||||
yaml ; JSON, but readable
|
;;yaml ; JSON, but readable
|
||||||
;;zig ; C, but simpler
|
;;zig ; C, but simpler
|
||||||
|
|
||||||
|
|
||||||
:email
|
:email
|
||||||
(mu4e +org +gmail)
|
;;(mu4e +org +gmail)
|
||||||
;;notmuch
|
;;notmuch
|
||||||
;;(wanderlust +gmail)
|
;;(wanderlust +gmail)
|
||||||
|
|
||||||
|
@ -195,7 +195,7 @@
|
||||||
;;emms
|
;;emms
|
||||||
;;everywhere ; *leave* Emacs!? You must be joking
|
;;everywhere ; *leave* Emacs!? You must be joking
|
||||||
;;irc ; how neckbeards socialize
|
;;irc ; how neckbeards socialize
|
||||||
rss ; emacs as an RSS reader
|
;;rss ; emacs as an RSS reader
|
||||||
;;twitter ; twitter client https://twitter.com/vnought
|
;;twitter ; twitter client https://twitter.com/vnought
|
||||||
|
|
||||||
:config
|
:config
|
||||||
|
|
18
packages.el
18
packages.el
|
@ -5,31 +5,13 @@
|
||||||
;; (package! some-package)
|
;; (package! some-package)
|
||||||
;; (package! another-package :recipe (:host github :repo "username/repo"))
|
;; (package! another-package :recipe (:host github :repo "username/repo"))
|
||||||
;; (package! builtin-package :disable t)
|
;; (package! builtin-package :disable t)
|
||||||
;; Better org agenda
|
|
||||||
(package! org-super-agenda)
|
|
||||||
;; Save recipes to org file
|
|
||||||
(package! org-chef)
|
|
||||||
;; Wallabag client
|
|
||||||
(package! wallabag :recipe (:host github :repo "chenyanming/wallabag.el" :files ("*.el" "*.alist" "*.css")))
|
|
||||||
;; Miniflux integration for elfeed
|
|
||||||
(package! elfeed-protocol)
|
|
||||||
;; Prettier LaTeX source blocks
|
;; Prettier LaTeX source blocks
|
||||||
(package! engrave-faces)
|
(package! engrave-faces)
|
||||||
;; Prettier org mode
|
;; Prettier org mode
|
||||||
(package! org-modern)
|
(package! org-modern)
|
||||||
;; Tangle org files on save
|
|
||||||
(package! org-auto-tangle)
|
|
||||||
;; Enable LaTeX previews automatically
|
;; Enable LaTeX previews automatically
|
||||||
(package! org-fragtog)
|
(package! org-fragtog)
|
||||||
;; Fetch and save bibtex from Firefox
|
|
||||||
(package! asoc :recipe (:host github :repo "troyp/asoc.el"))
|
|
||||||
(package! doct :recipe (:host github :repo "progfolio/doct"))
|
|
||||||
(package! org-capture-ref :recipe (:host github :repo "yantar92/org-capture-ref"))
|
|
||||||
;; Arduino development
|
|
||||||
(package! platformio-mode)
|
|
||||||
;; Light theme
|
;; Light theme
|
||||||
(package! os1-theme :recipe (:host github :repo "sashimacs/os1-theme"))
|
(package! os1-theme :recipe (:host github :repo "sashimacs/os1-theme"))
|
||||||
;; Move buffer while maintaining cursor centered
|
;; Move buffer while maintaining cursor centered
|
||||||
(package! centered-cursor-mode)
|
(package! centered-cursor-mode)
|
||||||
;; HACK Fix mu 1.10 evil navigation
|
|
||||||
(unpin! evil-collection)
|
|
||||||
|
|
Loading…
Reference in New Issue