config/doom: improve dired configuration, roam snippets and recentf

This commit is contained in:
xeruf 2021-10-31 19:32:04 +01:00
parent 58ef3cca99
commit ad081d7a43
6 changed files with 44 additions and 24 deletions

View File

@ -172,6 +172,7 @@ Version 2019-11-04 2021-02-16"
default-directory org-directory default-directory org-directory
org-roam-directory (expand-file-name "roam" org-directory) org-roam-directory (expand-file-name "roam" org-directory)
) )
(require 'org-roam-protocol)
(setq org-journal-file-type 'weekly (setq org-journal-file-type 'weekly
org-journal-file-format "%Y%m%d.org" org-journal-file-format "%Y%m%d.org"
@ -179,18 +180,21 @@ Version 2019-11-04 2021-02-16"
org-journal-carryover-delete-empty-journal 'always org-journal-carryover-delete-empty-journal 'always
) )
(after! recentf (use-package! recentf
(setq recentf-keep '(or file-remote-p recentf-keep-default-predicate)) :config
(add-to-list 'recentf-exclude "writing\\/tug") (add-to-list 'recentf-exclude "writing\\/tug")
(add-to-list 'recentf-exclude "\\.\\(sync\\|stversions\\|stfolder\\)") (add-to-list 'recentf-exclude "\\.\\(sync\\|stversions\\|stfolder\\)")
(setq recentf-list (append '("/home/janek/data/4-incubator/downloads/") recentf-list))
;(setq recentf-keep '(recentf-keep-default-predicate file-remote-p))
) )
(after! projectile (use-package! projectile
(push user-data-dir projectile-ignored-projects) :config
(let ((default-directory user-data-dir)) (add-to-list 'projectile-ignored-projects user-data-dir)
(add-to-list 'projectile-known-projects (expand-file-name "music/") t) (let ((default-directory user-data-dir))
(add-to-list 'projectile-known-projects (expand-file-name "2-standards/notes/") t) (add-to-list 'projectile-known-projects (expand-file-name "music/") t)
) (add-to-list 'projectile-known-projects (expand-file-name "2-standards/notes/") t)
)
) )
;;;; ORG ;;;; ORG
@ -278,6 +282,8 @@ Version 2019-11-04 2021-02-16"
"e" 'org-export-dispatch-custom-date "e" 'org-export-dispatch-custom-date
"E" 'org-export-repeat "E" 'org-export-repeat
"\\" 'org-ctrl-c-ctrl-c "\\" 'org-ctrl-c-ctrl-c
"nrt" 'org-roam-tag-add
"nrt" 'org-roam-tag-remove
:localleader :localleader
"j" 'org-insert-heading "j" 'org-insert-heading
"k" 'org-latex-export-to-pdf "k" 'org-latex-export-to-pdf
@ -393,6 +399,7 @@ Version 2019-11-04 2021-02-16"
(ivy-define-key ivy-minibuffer-map (kbd "<S-return>") 'ivy-immediate-done) (ivy-define-key ivy-minibuffer-map (kbd "<S-return>") 'ivy-immediate-done)
) )
(ranger-override-dired-mode 0)
(after! dired (after! dired
;; Make dired open certain file types externally when pressing RET on a file https://pastebin.com/8QWYpCA2 ;; Make dired open certain file types externally when pressing RET on a file https://pastebin.com/8QWYpCA2
;; Alternative: https://www.emacswiki.org/emacs/OpenWith ;; Alternative: https://www.emacswiki.org/emacs/OpenWith
@ -426,7 +433,9 @@ Version 2019-11-04 2021-02-16"
:localleader :localleader
:desc "Compress/Extract" "c" 'dired-do-compress :desc "Compress/Extract" "c" 'dired-do-compress
:desc "Size information" "s" :desc "Size information" "s"
(lambda () (interactive) (dired-smart-shell-command "s")) (lambda () (interactive) (dired-do-shell-command "s"))
:desc "Lowercase files" "L"
(lambda () (interactive) (dired-do-shell-command "lowercase"))
:desc "Symlink to this" "l" 'dired-do-symlink :desc "Symlink to this" "l" 'dired-do-symlink
:desc "Open image-dired" "i" :desc "Open image-dired" "i"
(lambda () (interactive) (image-dired buffer-file-name)) (lambda () (interactive) (image-dired buffer-file-name))
@ -439,7 +448,15 @@ Version 2019-11-04 2021-02-16"
:map ranger-mode-map :map ranger-mode-map
:n "r" 'ranger :n "r" 'ranger
) )
)
(after! dired-aux
(add-to-list 'dired-compress-file-suffixes '("\\.nupkg\\'" "" "unzip -o -d %o %i"))
)
(use-package! diredfl
:config (add-to-list 'diredfl-compressed-extensions ".nupkg")
)
(after! all-the-icons
(add-to-list 'all-the-icons-extension-icon-alist '("nupkg" all-the-icons-octicon "file-zip" :v-adjust 0.0 :face all-the-icons-lmaroon))
) )
(after! spell-fu (after! spell-fu
@ -447,7 +464,7 @@ Version 2019-11-04 2021-02-16"
) )
(after! json-mode (after! json-mode
(defconst json-mode-comments-re (rx (group "//" (zero-or-more nonl) line-end))) (defconst json-mode-comments-re (rx (group "//" (zero-or-more nonl) line-end)))
(push (list json-mode-comments-re 1 font-lock-comment-face) json-font-lock-keywords-1) (push '(json-mode-comments-re 1 font-lock-comment-face) json-font-lock-keywords-1)
) )
(global-activity-watch-mode) (global-activity-watch-mode)

View File

@ -87,7 +87,7 @@
;;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
@ -139,7 +139,7 @@
;;latex ; writing papers in Emacs has never been so fun ;;latex ; writing papers in Emacs has never been so fun
;;lean ;;lean
;;factor ;;factor
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
@ -147,7 +147,7 @@
;;ocaml ; an objective camel ;;ocaml ; an objective camel
(org +pretty +dragndrop +journal +roam2 +pomodoro +noter +present +pandoc) ; organize your plain life in plain text (org +pretty +dragndrop +journal +roam2 +pomodoro +noter +present +pandoc) ; organize your plain life in plain text
;;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 ; beautiful is better than ugly ;;python ; beautiful is better than ugly
;;qt ; the 'cutest' gui framework ever ;;qt ; the 'cutest' gui framework ever

View File

@ -59,16 +59,13 @@
(package! auto-correct) (package! auto-correct)
(package! evil-tutor) ; dark vim tutor (package! evil-tutor) ; dark vim tutor
(package! evil-args) ; motions in args
(package! evil-replace-with-register) ; grrrrr (package! evil-replace-with-register) ; grrrrr
;(package! evil-better-visual-line) ; not sure if this actually helps
(package! visual-fill-column) ; Soft line wrapping at character count (package! visual-fill-column) ; Soft line wrapping at character count
(package! activity-watch-mode) ; eagle eyes (package! activity-watch-mode) ; eagle eyes
(package! togetherly) ; Collaborative editing (package! togetherly) ; Collaborative editing
(package! direnv) ; directory-local environment for haskell-nix things (package! direnv) ; directory-local environment for haskell-nix things
(package! plantuml-mode) ; Diagrams
(package! adoc-mode) ; Asciidoc, a md alternative (package! adoc-mode) ; Asciidoc, a md alternative
(package! nov) ; epub reader (package! nov) ; epub reader
(package! pkgbuild-mode) ; AUR PKGBUILDs (package! pkgbuild-mode) ; AUR PKGBUILDs
@ -79,7 +76,3 @@
(package! osm-mode (package! osm-mode
:recipe (:host github :repo "ruediger/osm-mode")) :recipe (:host github :repo "ruediger/osm-mode"))
;(package! annotate) ; Annotations - replaced by org-noter
; :leader "aa" 'annotate-annotate
; :leader "as" 'annotate-mode

View File

@ -0,0 +1,5 @@
# -*- mode: snippet -*-
# name: Tag roam file as inspiration
# key: +i
# --
#+filetags: :inspiration:

View File

@ -2,4 +2,4 @@
# name: Tag roam file as person # name: Tag roam file as person
# key: +person # key: +person
# -- # --
#+filetags: :person: #+filetags: :person:

View File

@ -0,0 +1,5 @@
# -*- mode: snippet -*-
# name: Tag roam file as project
# key: +pr
# --
#+filetags: :project: