Update org with capture and org-roam

This commit is contained in:
Lucas Barbieri 2024-04-24 23:21:08 -03:00
parent 0eb8525371
commit 46c798a58c
2 changed files with 205 additions and 120 deletions

View File

@ -5,10 +5,18 @@
;; If there is more than one, they won't work right.
'(helm-minibuffer-history-key "M-p")
'(package-selected-packages
'(org-modern-mode org-agenda-category-icons org-roam yasnippet-snippets which-key vue-mode projectile powerline-evil paredit magit lsp-ui lsp-pyright helm-xref golint flycheck flx evil-collection doom-themes dap-mode corfu company-go company-fuzzy beacon all-the-icons)))
'(helm-rg helm-projectile yasnippet-snippets which-key vue-mode projectile powerline-evil paredit org-super-agenda org-roam org-modern magit lsp-ui lsp-pyright kaolin-themes helm-xref golint flycheck flx evil-collection doom-themes dap-mode corfu company-go company-fuzzy comment-tags beacon all-the-icons)))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
)
'(org-document-title ((t (:inherit default :weight bold :foreground "black" :font "CartographCF Nerd Font" :height 1.7 :underline nil))))
'(org-level-1 ((t (:inherit default :weight bold :foreground "black" :font "CartographCF Nerd Font" :height 1.6))))
'(org-level-2 ((t (:inherit default :weight bold :foreground "black" :font "CartographCF Nerd Font" :height 1.4))))
'(org-level-3 ((t (:inherit default :weight bold :foreground "black" :font "CartographCF Nerd Font" :height 1.3))))
'(org-level-4 ((t (:inherit default :weight bold :foreground "black" :font "CartographCF Nerd Font" :height 1.2))))
'(org-level-5 ((t (:inherit default :weight bold :foreground "black" :font "CartographCF Nerd Font"))))
'(org-level-6 ((t (:inherit default :weight bold :foreground "black" :font "CartographCF Nerd Font"))))
'(org-level-7 ((t (:inherit default :weight bold :foreground "black" :font "CartographCF Nerd Font"))))
'(org-level-8 ((t (:inherit default :weight bold :foreground "black" :font "CartographCF Nerd Font")))))

View File

@ -96,7 +96,16 @@
:ensure t)
(use-package org-roam
:ensure t)
:ensure t
:init
(setq org-roam-v2-ack t)
:custom
(org-roam-directory "~/org-roam")
:bind (("C-c n l" . org-roam-buffer-toggle)
("C-c n f" . org-roam-node-find)
("C-c n i" . org-roam-node-insert))
:config
(org-roam-setup))
(use-package org-modern
:config
@ -104,41 +113,89 @@
(add-hook 'org-agenda-finalize-hook #'org-modern-agenda)
:ensure t)
(modify-all-frames-parameters
'((right-divider-width . 40)
(internal-border-width . 40)))
(dolist (face '(window-divider
window-divider-first-pixel
window-divider-last-pixel))
(face-spec-reset-face face)
(set-face-foreground face (face-attribute 'default :background)))
(set-face-background 'fringe (face-attribute 'default :background))
;; Must do this so the agenda knows where to look for my files
(setq org-agenda-files '("~/org"))
(setq
;; Edit settings
org-auto-align-tags nil
org-tags-column 0
org-catch-invisible-edits 'show-and-error
org-special-ctrl-a/e t
org-insert-heading-respect-content t
;; When a TODO is set to a done state, record a timestamp
(setq org-log-done 'time)
;; Org styling, hide markup etc.
org-hide-emphasis-markers t
org-pretty-entities t
org-ellipsis ""
;; Follow the links
(setq org-return-follows-link t)
;; Agenda styling
org-agenda-tags-column 0
org-agenda-block-separator ?─
org-agenda-time-grid
'((daily today require-timed)
(800 1000 1200 1400 1600 1800 2000)
" ┄┄┄┄┄ " "┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄")
org-agenda-current-time-string
"◀── now ─────────────────────────────────────────────────")
;; Associate all org files with org mode
(add-to-list 'auto-mode-alist '("\\.org\\'" . org-mode))
(global-org-modern-mode)
;; Make the indentation look nicer
(add-hook 'org-mode-hook 'org-indent-mode)
;; Remap the change priority keys to use the UP or DOWN key
(define-key org-mode-map (kbd "C-c <up>") 'org-priority-up)
(define-key org-mode-map (kbd "C-c <down>") 'org-priority-down)
;; Shortcuts for storing links, viewing the agenda, and starting a capture
(define-key global-map "\C-cl" 'org-store-link)
(define-key global-map "\C-ca" 'org-agenda)
(define-key global-map "\C-cc" 'org-capture)
;; When you want to change the level of an org item, use SMR
(define-key org-mode-map (kbd "C-c C-g C-r") 'org-shiftmetaright)
;; Hide the markers so you just see bold text as BOLD-TEXT and not *BOLD-TEXT*
(setq org-hide-emphasis-markers t)
;; Wrap the lines in org mode so that things are easier to read
(add-hook 'org-mode-hook 'visual-line-mode)
(let* ((variable-tuple
(cond ((x-list-fonts "CartographCF Nerd Font") '(:font "CartographCF Nerd Font"))
((x-list-fonts "Source Sans Pro") '(:font "Source Sans Pro"))
((x-list-fonts "Lucida Grande") '(:font "Lucida Grande"))
((x-list-fonts "Verdana") '(:font "Verdana"))
((x-family-fonts "Sans Serif") '(:family "Sans Serif"))
(nil (warn "Cannot find a Sans Serif Font. Install Source Sans Pro."))))
(base-font-color (face-foreground 'default nil 'default))
(headline `(:inherit default :weight bold :foreground ,base-font-color)))
(custom-theme-set-faces
'user
`(org-level-8 ((t (,@headline ,@variable-tuple))))
`(org-level-7 ((t (,@headline ,@variable-tuple))))
`(org-level-6 ((t (,@headline ,@variable-tuple))))
`(org-level-5 ((t (,@headline ,@variable-tuple))))
`(org-level-4 ((t (,@headline ,@variable-tuple :height 1.2))))
`(org-level-3 ((t (,@headline ,@variable-tuple :height 1.3))))
`(org-level-2 ((t (,@headline ,@variable-tuple :height 1.4))))
`(org-level-1 ((t (,@headline ,@variable-tuple :height 1.6))))
`(org-document-title ((t (,@headline ,@variable-tuple :height 1.7 :underline nil))))))
(use-package org-super-agenda
:ensure t)
(use-package comment-tags
:ensure t)
(setq org-capture-templates
'(
("j" "Work Log Entry"
entry (file+datetree "~/org/work-log.org")
"* %?"
:empty-lines 0)
("n" "Note"
entry (file+headline "~/org/notes.org" "Random Notes")
"** %?"
:empty-lines 0)
("g" "General To-Do"
entry (file+headline "~/org/todos.org" "General Tasks")
"* TODO [#B] %?\n:Created: %T\n "
:empty-lines 0)
))
;; TODO states
(setq org-todo-keywords
'((sequence "TODO(t)" "PLANNING(p)" "IN-PROGRESS(i@/!)" "VERIFYING(v!)" "BLOCKED(b@)" "|" "DONE(d!)" "OBE(o@!)" "WONT-DO(w@/!)" )
))
(use-package powerline-evil
:ensure t)
@ -214,23 +271,29 @@
:config
(beacon-mode 1))
(use-package doom-themes
;; (use-package doom-themes
;; :ensure t
;; :config
;; ;; Global settings (defaults)
;; (setq doom-themes-enable-bold t ; if nil, bold is universally disabled
;; doom-themes-enable-italic t) ; if nil, italics is universally disabled
;; (load-theme 'doom-sourcerer t)
;; ;; Enable flashing mode-line on errors
;; (doom-themes-visual-bell-config)
;; ;; Enable custom neotree theme (all-the-icons must be installed!)
;; (doom-themes-neotree-config)
;; ;; or for treemacs users
;; (setq doom-themes-treemacs-theme "doom-atom") ; use "doom-colors" for less minimal icon theme
;; (doom-themes-treemacs-config)
;; ;; Corrects (and improves) org-mode's native fontification.
;; (doom-themes-org-config))
(use-package kaolin-themes
:ensure t
:config
;; Global settings (defaults)
(setq doom-themes-enable-bold t ; if nil, bold is universally disabled
doom-themes-enable-italic t) ; if nil, italics is universally disabled
(load-theme 'doom-sourcerer t)
;; Enable flashing mode-line on errors
(doom-themes-visual-bell-config)
;; Enable custom neotree theme (all-the-icons must be installed!)
(doom-themes-neotree-config)
;; or for treemacs users
(setq doom-themes-treemacs-theme "doom-atom") ; use "doom-colors" for less minimal icon theme
(doom-themes-treemacs-config)
;; Corrects (and improves) org-mode's native fontification.
(doom-themes-org-config))
(load-theme 'kaolin-dark t)
(kaolin-treemacs-theme))
(global-display-line-numbers-mode)
(setq display-line-numbers-type 'relative)
@ -273,3 +336,17 @@
(global-set-key (kbd "C-h a") 'helm-apropos)
(setq helm-split-window-in-side-p t
helm-move-to-line-cycle-in-source t))
(defun my-switch-to-fzf (arg)
(interactive "p")
(let ((helm-current-dir (file-name-directory (helm-get-selection))))
(run-at-time nil nil
(lambda (dir)
(fzf/start dir)) helm-current-dir)
(helm-keyboard-quit)))
(use-package helm-projectile
:ensure t)
(evil-define-key 'normal 'global (kbd "<leader>sf")
(lambda () (interactive) (helm-projectile)))