mirror of
https://codeberg.org/andyscott/dotfiles.git
synced 2024-11-09 22:10:48 -05:00
Compare commits
No commits in common. "37261c156cdbf1808deb6492d78f3141bd922a3e" and "94e0ee773edce4d7d067ff5df2bcc91e561b4181" have entirely different histories.
37261c156c
...
94e0ee773e
3 changed files with 39 additions and 125 deletions
|
@ -46,7 +46,7 @@
|
||||||
(setq file-name-handler-alist nil)
|
(setq file-name-handler-alist nil)
|
||||||
|
|
||||||
;; Restore `garbage-collect' and `file-name-handler-alist' settings
|
;; Restore `garbage-collect' and `file-name-handler-alist' settings
|
||||||
(add-hook 'elpaca-after-init-hook
|
(add-hook 'emacs-startup-hook
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(setq file-name-handler-alist default-file-name-handler-alist
|
(setq file-name-handler-alist default-file-name-handler-alist
|
||||||
gc-cons-percentage 0.1
|
gc-cons-percentage 0.1
|
||||||
|
@ -113,7 +113,7 @@
|
||||||
(push '(tool-bar-lines . 0) default-frame-alist)
|
(push '(tool-bar-lines . 0) default-frame-alist)
|
||||||
(push '(vertical-scroll-bars) default-frame-alist)
|
(push '(vertical-scroll-bars) default-frame-alist)
|
||||||
(push '(background-color . "#282828") default-frame-alist)
|
(push '(background-color . "#282828") default-frame-alist)
|
||||||
(push '(foreground-color . "#c6c6c6") default-frame-alist)
|
(push '(foreground-color . "#C6C6C6") default-frame-alist)
|
||||||
|
|
||||||
;; Make lsp-mode use plists
|
;; Make lsp-mode use plists
|
||||||
(setenv "LSP_USE_PLISTS" "true")
|
(setenv "LSP_USE_PLISTS" "true")
|
||||||
|
|
|
@ -128,9 +128,6 @@
|
||||||
|
|
||||||
;; Customize compilation & related buffers
|
;; Customize compilation & related buffers
|
||||||
(use-feature compile
|
(use-feature compile
|
||||||
:bind
|
|
||||||
(:map prog-mode-map
|
|
||||||
("C-c r" . recompile))
|
|
||||||
:commands (compile recompile)
|
:commands (compile recompile)
|
||||||
:config (setopt compilation-ask-about-save nil
|
:config (setopt compilation-ask-about-save nil
|
||||||
compilation-scroll-output 'first-error))
|
compilation-scroll-output 'first-error))
|
||||||
|
@ -291,20 +288,20 @@
|
||||||
:config
|
:config
|
||||||
(setopt recentf-max-menu-items 100
|
(setopt recentf-max-menu-items 100
|
||||||
recentf-max-saved-items 1000
|
recentf-max-saved-items 1000
|
||||||
recentf-save-file (expand-file-name "recentf" xdg_cache_home))
|
recentf-save-file (concat xdg_cache_home "recentf"))
|
||||||
(recentf-mode))
|
(recentf-mode))
|
||||||
|
|
||||||
;; Customize saving mini-buffer history
|
;; Customize saving mini-buffer history
|
||||||
(use-feature savehist
|
(use-feature savehist
|
||||||
:config
|
:config
|
||||||
(setopt savehist-autosave-interval 120
|
(setopt savehist-autosave-interval 120
|
||||||
savehist-file (expand-file-name "history" xdg_cache_home))
|
savehist-file (concat xdg_cache_home "history"))
|
||||||
(savehist-mode))
|
(savehist-mode))
|
||||||
|
|
||||||
;; Customize saving place in files
|
;; Customize saving place in files
|
||||||
(use-feature saveplace
|
(use-feature saveplace
|
||||||
:config
|
:config
|
||||||
(setopt save-place-file (expand-file-name "places" xdg_cache_home))
|
(setopt save-place-file (concat xdg_cache_home "places"))
|
||||||
(save-place-mode))
|
(save-place-mode))
|
||||||
|
|
||||||
;; Unload `seq' before `Elpaca' starts building
|
;; Unload `seq' before `Elpaca' starts building
|
||||||
|
@ -381,13 +378,6 @@
|
||||||
(catppuccin-reload)
|
(catppuccin-reload)
|
||||||
(load-theme 'catppuccin t))
|
(load-theme 'catppuccin t))
|
||||||
|
|
||||||
;; C/C++ formatting
|
|
||||||
;; Ad hoc format file: clang-format -style=webkit -dump-config > .clang-format
|
|
||||||
(use-package clang-format
|
|
||||||
:commands (clang-format clang-format-buffer clang-format-region)
|
|
||||||
:config (setopt clang-format-fallback-style "webkit"
|
|
||||||
clang-format-style "file"))
|
|
||||||
|
|
||||||
;; Search and navigation
|
;; Search and navigation
|
||||||
(use-package consult
|
(use-package consult
|
||||||
:bind (;; C-c bindings in `mode-specific-map'
|
:bind (;; C-c bindings in `mode-specific-map'
|
||||||
|
@ -441,12 +431,7 @@
|
||||||
;; Minibuffer history
|
;; Minibuffer history
|
||||||
:map minibuffer-local-map
|
:map minibuffer-local-map
|
||||||
("M-s" . consult-history) ; orig. next-matching-history-element
|
("M-s" . consult-history) ; orig. next-matching-history-element
|
||||||
("M-r" . consult-history)
|
("M-r" . consult-history)) ; orig. previous-matching-history-element
|
||||||
:map as/org-prefix-map ; orig. previous-matching-history-element
|
|
||||||
("h" . consult-org-heading)
|
|
||||||
("a" . consult-org-agenda))
|
|
||||||
:config
|
|
||||||
(setopt consult-narrow-key "<")
|
|
||||||
:init
|
:init
|
||||||
;; Register formatting
|
;; Register formatting
|
||||||
(setopt register-preview-delay 0.6
|
(setopt register-preview-delay 0.6
|
||||||
|
@ -457,13 +442,6 @@
|
||||||
(setopt xref-show-xrefs-function #'consult-xref
|
(setopt xref-show-xrefs-function #'consult-xref
|
||||||
xref-show-definitions-function #'consult-xref))
|
xref-show-definitions-function #'consult-xref))
|
||||||
|
|
||||||
(use-package consult-dir
|
|
||||||
:after (consult)
|
|
||||||
:bind (("C-x C-d" . consult-dir)
|
|
||||||
:map vertico-map
|
|
||||||
("C-x C-d" . consult-dir)
|
|
||||||
("C-x C-j" . consult-dir-jump-file)))
|
|
||||||
|
|
||||||
;; UI for the workspace/symbols procedure calls
|
;; UI for the workspace/symbols procedure calls
|
||||||
(use-package consult-eglot
|
(use-package consult-eglot
|
||||||
:after (eglot)
|
:after (eglot)
|
||||||
|
@ -508,7 +486,7 @@
|
||||||
:ensure (eglot-booster :host github :repo "jdtsmith/eglot-booster"))
|
:ensure (eglot-booster :host github :repo "jdtsmith/eglot-booster"))
|
||||||
|
|
||||||
;; Command menu for items around point
|
;; Command menu for items around point
|
||||||
(use-package embark
|
(use-package embark
|
||||||
:bind
|
:bind
|
||||||
(("C-." . embark-act)
|
(("C-." . embark-act)
|
||||||
("C-;" . embark-dwim)
|
("C-;" . embark-dwim)
|
||||||
|
@ -524,46 +502,6 @@
|
||||||
(use-package embark-consult
|
(use-package embark-consult
|
||||||
:hook (embark-collect-mode . consult-preview-at-point-mode))
|
:hook (embark-collect-mode . consult-preview-at-point-mode))
|
||||||
|
|
||||||
;; Startup screen
|
|
||||||
(use-package enlight
|
|
||||||
:after (grid)
|
|
||||||
:config
|
|
||||||
(setopt
|
|
||||||
enlight-content
|
|
||||||
(grid-get-row
|
|
||||||
`(,(enlight-menu
|
|
||||||
'(("Files"
|
|
||||||
("Find File" find-file "f")
|
|
||||||
("Recent Files" consult-recent-file "r")
|
|
||||||
("Projects" project-switch-project "p")
|
|
||||||
("Open Project Buffer" consult-project-buffer "o"))))
|
|
||||||
" "
|
|
||||||
,(enlight-menu
|
|
||||||
'(("Org"
|
|
||||||
("Agenda" (org-agenda nil "a") "a")
|
|
||||||
("Time blocking" org-timeblock "b")
|
|
||||||
("List all TODOs" (org-agenda nil "t") "t")
|
|
||||||
("Match Tags" (org-agenda nil "m") "m"))))
|
|
||||||
" "
|
|
||||||
,(enlight-menu
|
|
||||||
`(("Settings"
|
|
||||||
("Elpaca" elpaca-manager "L")
|
|
||||||
("Emacs"
|
|
||||||
(progn
|
|
||||||
(find-file ,user-init-file))
|
|
||||||
"I")
|
|
||||||
("Enlight"
|
|
||||||
(progn
|
|
||||||
(find-file ,user-init-file)
|
|
||||||
(goto-char (point-min))
|
|
||||||
(search-forward "use-package enlight"))
|
|
||||||
"E")
|
|
||||||
("Org"
|
|
||||||
(progn
|
|
||||||
(find-file ,(replace-regexp-in-string "init.el" "lisp/init-org.el" user-init-file)))
|
|
||||||
"O")))))))
|
|
||||||
(enlight-open))
|
|
||||||
|
|
||||||
;; Correction functions for `flyspell'
|
;; Correction functions for `flyspell'
|
||||||
(use-package flyspell-correct
|
(use-package flyspell-correct
|
||||||
:after (flyspell)
|
:after (flyspell)
|
||||||
|
@ -571,10 +509,6 @@
|
||||||
(:map flyspell-mode-map
|
(:map flyspell-mode-map
|
||||||
("C-M-." . flyspell-correct-wrapper)))
|
("C-M-." . flyspell-correct-wrapper)))
|
||||||
|
|
||||||
;; Grid for `enlight'
|
|
||||||
(use-package grid
|
|
||||||
:ensure (:host github :repo "ichernyshovvv/grid.el"))
|
|
||||||
|
|
||||||
;; Highlight keywords
|
;; Highlight keywords
|
||||||
(use-package hl-todo
|
(use-package hl-todo
|
||||||
:bind
|
:bind
|
||||||
|
@ -610,7 +544,7 @@
|
||||||
:bind ("C-M-;" . magit-status)
|
:bind ("C-M-;" . magit-status)
|
||||||
:config
|
:config
|
||||||
(setopt magit-display-buffer-function #'magit-display-buffer-same-window-except-diff-v1
|
(setopt magit-display-buffer-function #'magit-display-buffer-same-window-except-diff-v1
|
||||||
transient-history-file (expand-file-name "transient-history" xdg_cache_home)))
|
transient-history-file (concat xdg_cache_home "transient-history")))
|
||||||
|
|
||||||
(use-package magit-todos
|
(use-package magit-todos
|
||||||
:hook (magit-mode . magit-todos-mode))
|
:hook (magit-mode . magit-todos-mode))
|
||||||
|
@ -668,8 +602,8 @@
|
||||||
(setopt completion-styles '(orderless basic)
|
(setopt completion-styles '(orderless basic)
|
||||||
completion-category-overrides '((file (styles basic partial-completion)))
|
completion-category-overrides '((file (styles basic partial-completion)))
|
||||||
orderless-matching-styles '(orderless-regexp
|
orderless-matching-styles '(orderless-regexp
|
||||||
orderless-literal
|
orderless-literal
|
||||||
orderless-initialism))
|
orderless-initialism))
|
||||||
:defer 1)
|
:defer 1)
|
||||||
|
|
||||||
;; Project Management
|
;; Project Management
|
||||||
|
@ -677,7 +611,7 @@
|
||||||
:disabled
|
:disabled
|
||||||
:bind ("C-c p" . projectile-command-map)
|
:bind ("C-c p" . projectile-command-map)
|
||||||
:config
|
:config
|
||||||
(setopt projectile-known-projects-file (expand-file-name "projectile-bookmarks" xdg_cache_home)
|
(setopt projectile-known-projects-file (concat xdg_cache_home "projectile-bookmarks")
|
||||||
projectile-project-search-path '(("~/Nextcloud/Projects/src/" . 2)))
|
projectile-project-search-path '(("~/Nextcloud/Projects/src/" . 2)))
|
||||||
(push "*node_modules" projectile-globally-ignored-directories)
|
(push "*node_modules" projectile-globally-ignored-directories)
|
||||||
(projectile-mode))
|
(projectile-mode))
|
||||||
|
|
|
@ -36,87 +36,67 @@
|
||||||
("C-c c" . org-capture)
|
("C-c c" . org-capture)
|
||||||
("C-c l" . org-store-link))
|
("C-c l" . org-store-link))
|
||||||
:config
|
:config
|
||||||
(setopt org-agenda-files (directory-files-recursively org-directory "org$")
|
(setopt org-agenda-files (list (concat org-directory "/personal")
|
||||||
org-agenda-skip-deadline-if-done t
|
(concat org-directory "/projects")
|
||||||
org-agenda-skip-scheduled-if-done t
|
(concat org-directory "/work"))
|
||||||
org-agenda-start-on-weekday nil
|
|
||||||
org-archive-location (concat org-directory "/archive.org::* From %s")
|
|
||||||
org-blank-before-new-entry '((heading . auto)
|
|
||||||
(plain-list-item . auto))
|
|
||||||
org-enforce-todo-dependencies t
|
|
||||||
org-fontify-quote-and-verse-blocks t
|
|
||||||
org-hide-emphasis-markers t
|
org-hide-emphasis-markers t
|
||||||
org-log-done 'time
|
org-log-done 'time
|
||||||
org-refile-targets '((nil :maxlevel . 2)
|
|
||||||
(org-agenda-files :maxlevel . 2))
|
|
||||||
org-refile-use-outline-path 'file
|
|
||||||
org-return-follows-link t
|
org-return-follows-link t
|
||||||
org-src-preserve-indentation t
|
org-todo-keywords '((sequence "TODO(t)" "IN-PROGRESS(i@/!)" "|"
|
||||||
org-startup-folded 'content
|
"DONE(d!)" "BLOCKED(b@)" "WONT-DO(w@/!)" ))
|
||||||
org-todo-keywords '((sequence "BLOCKED(b@/!)" "IN-PROGRESS(i@/!)"
|
|
||||||
"TODO(t)" "WAITING(i@/!)" "|" "DONE(d!)"
|
|
||||||
"WONT-DO(w@/!)"))
|
|
||||||
org-todo-keyword-faces '(("TODO" . (icon-button))
|
org-todo-keyword-faces '(("TODO" . (icon-button))
|
||||||
("IN-PROGRESS" . (tool-bar))
|
("IN-PROGRESS" . (tool-bar))
|
||||||
("BLOCKED" . (match))
|
("BLOCKED" . (match))
|
||||||
("WONT-DO" . (org-done))))
|
("WONT-DO" . (org-done))))
|
||||||
(setq org-capture-templates
|
(setopt org-capture-templates
|
||||||
`(
|
`(
|
||||||
("m" "Personal")
|
("m" "Personal")
|
||||||
("mj" "Log Entry"
|
("mj" "Log Entry"
|
||||||
entry (file+datetree ,(concat org-directory "/personal_log.org"))
|
entry (file+datetree ,(concat org-directory "/personal/log.org"))
|
||||||
"** %?"
|
"* %?"
|
||||||
:empty-lines 1)
|
:empty-lines 1)
|
||||||
|
|
||||||
("mn" "Note"
|
("mn" "Note"
|
||||||
entry (file+headline ,(concat org-directory "/notes.org") "Note to self...")
|
entry (file+headline ,(concat org-directory "/personal/notes.org") "Note to self...")
|
||||||
"** %?"
|
"* %?"
|
||||||
:empty-lines 1)
|
:empty-lines 1)
|
||||||
|
|
||||||
("mt" "Todo"
|
("mt" "Todo"
|
||||||
entry (file+headline ,(concat org-directory "/inbox.org") "You can do it!")
|
entry (file+headline ,(concat org-directory "/personal/todo.org") "Personal Tasks")
|
||||||
"** TODO [#B] %?\n:Created: %U\nSCHEDULED: %^{SCHEDULED: }T\n "
|
"* TODO [#B] %?\n:Created: %T\n "
|
||||||
:empty-lines 1)
|
:empty-lines 1)
|
||||||
|
|
||||||
("p" "Projects")
|
("p" "Projects")
|
||||||
("pn" "Note"
|
("pn" "Note"
|
||||||
entry (file+headline ,(concat org-directory "/notes.org") "Project Notes")
|
entry (file+headline ,(concat org-directory "/projects/notes.org") "Project Notes")
|
||||||
"** %?"
|
"** %?"
|
||||||
:empty-lines 1)
|
:empty-lines 1)
|
||||||
|
|
||||||
("pt" "Todo"
|
("pt" "Todo"
|
||||||
entry (file+headline ,(concat org-directory "/inbox.org") "Project Tasks")
|
entry (file+headline ,(concat org-directory "/projects/todo.org") "Project Tasks")
|
||||||
"** TODO [#B] %?\n:Created: %U\nSCHEDULED: %^{SCHEDULED: }T\n%i\n%a\nNotes: "
|
"* TODO [#B] %?\n:Created: %T\n%i\n%a\nNotes: "
|
||||||
:empty-lines 1)
|
:empty-lines 0)
|
||||||
|
|
||||||
("w" "Work")
|
("w" "Work")
|
||||||
("wn" "Note"
|
("wn" "Note"
|
||||||
entry (file+headline ,(concat org-directory "/notes.org") "Work Notes")
|
entry (file+headline "~/Nextcloud/Documents/org/work/notes.org" "Work notes")
|
||||||
"** %?"
|
"** %?"
|
||||||
:empty-lines 1)
|
:empty-lines 0)
|
||||||
|
|
||||||
("wt" "Todo"
|
("wt" "Todo"
|
||||||
entry (file+headline ,(concat org-directory "/inbox.org") "Work Tasks")
|
entry (file+headline "~/Nextcloud/Documents/org/work/todo.org" "Work tasks")
|
||||||
"** TODO [#B] %?\n:Created: %U\nSCHEDULED: %^{SCHEDULED: }T\n%i\n%a\nNotes: "
|
"* TODO [#B] %?\n:Created: %T\n%i\n%a\nNotes: "
|
||||||
:empty-lines 1)))
|
:empty-lines 0)))
|
||||||
:hook (org-mode . org-indent-mode)
|
:hook (org-mode . org-indent-mode)
|
||||||
:init
|
:init
|
||||||
(setopt org-directory "~/Nextcloud/Documents/org")
|
(setopt org-directory "~/Nextcloud/Documents/org")
|
||||||
(bind-keys :prefix-map as/org-prefix-map
|
;; (bind-keys :prefix-map as/org-prefix-map
|
||||||
:prefix "C-c o"
|
;; :prefix "C-c o"
|
||||||
("n" . org-priority-down)
|
;; ("d" . org-priority-down)
|
||||||
("p" . org-priority-up)
|
;; ("u" . org-priority-up)
|
||||||
("f" . org-shiftmetaright)
|
;; ("r" . org-shiftmetaright)
|
||||||
("b" . org-shiftmetaleft)))
|
;; ("l" . org-shiftmetaleft))
|
||||||
|
)
|
||||||
(use-package org-timeblock
|
|
||||||
:bind
|
|
||||||
(:map as/org-prefix-map
|
|
||||||
("t" . org-timeblock))
|
|
||||||
:config
|
|
||||||
(setopt org-timeblock-new-task-time 'pick
|
|
||||||
org-timeblock-show-future-repeats 'next
|
|
||||||
org-timeblock-span 3))
|
|
||||||
|
|
||||||
(provide 'init-org)
|
(provide 'init-org)
|
||||||
;;; org-mode.el ends here
|
;;; org-mode.el ends here
|
||||||
|
|
Loading…
Reference in a new issue