mirror of
https://github.com/foo-dogsquared/dotfiles.git
synced 2025-01-31 16:57:54 +00:00
0681d1fd7c
It's been a while but I've been using NixOS (or anything styled like it like GuixSD, for example) and distro-hopped from Arch Linux. I think it's high noon for making the structure of this setup to be truer to one of the big objectives which is how easy to transfer this between different setups. Which means I removed some things such as the package lists, systemd config files, and package manager-specific configs. While the solution is easy (which is to simply ignore the system-specific files) but I'm not going with the pragmatic solution not because I'm a dumbass but because I'm so smart that I want to create a challenge for myself to solve a puzzle on figuring out a way on how to structure my dotfiles. :) Such a productive use of my time, that's for sure.
82 lines
2.8 KiB
EmacsLisp
Executable File
82 lines
2.8 KiB
EmacsLisp
Executable File
;;; tools/neuron/config.el -*- lexical-binding: t; -*-
|
|
|
|
(defface neuron-stub-face
|
|
'((((class color) (min-colors 88) (background dark)) :foreground "#C16069" :underline "#C16069")
|
|
(((class color) (min-colors 88) (background light)) :foreground "#C16069" :underline "#C16069")
|
|
(((class color) :foreground "Red" :underline "Red"))
|
|
(t :inherit neuron-title-overlay-face))
|
|
"Face for stub links."
|
|
:group 'neuron-faces)
|
|
|
|
(customize-set-variable 'neuron-default-zettelkasten-directory (expand-file-name "~/zettelkasten"))
|
|
|
|
(customize-set-variable 'neuron-default-tags (list "stub"))
|
|
|
|
(customize-set-variable 'neuron-tag-specific-title-faces '(("stub" neuron-stub-face)))
|
|
|
|
(defun search-zettelkasten ()
|
|
"Search zettels by content."
|
|
(interactive)
|
|
(progn
|
|
(+ivy-file-search :in (neuron-zettelkasten) :recursive nil :prompt "Search Zettelkasten: ")
|
|
(neuron-mode)))
|
|
|
|
(defun find-file-in-zettelkasten ()
|
|
"Find a file in the currently active zettelkasten."
|
|
(interactive)
|
|
(let ((default-directory (neuron-zettelkasten)))
|
|
(counsel-find-file)))
|
|
|
|
(use-package! neuron-mode
|
|
; Enable link autocompletion globally
|
|
:hook (neuron-mode . company-neuron-setup)
|
|
:config
|
|
(map! :leader
|
|
(:prefix ("z" . "zettel")
|
|
"z" #'neuron-new-zettel
|
|
"e" #'neuron-edit-zettel
|
|
"w" #'neuron-rib-watch
|
|
"g" #'neuron-rib-generate
|
|
"o" #'neuron-open-zettel
|
|
"O" #'neuron-open-index
|
|
"j" #'neuron-open-daily-notes
|
|
"t" #'neuron-query-tags
|
|
"r" #'neuron-refresh
|
|
"c" #'neuron-edit-zettelkasten-configuration
|
|
|
|
;;; Alternatively, bind all rib commands in a separate prefix
|
|
;; (:prefix ("r" . "rib")
|
|
;; "w" #'neuron-rib-watch
|
|
;; "g" #'neuron-rib-generate
|
|
;; "s" #'neuron-rib-serve
|
|
;; "o" #'neuron-rib-open-zettel
|
|
;; "z" #'neuron-rib-open-z-index
|
|
;; "k" #'neuron-rib-kill
|
|
;; )
|
|
)
|
|
)
|
|
|
|
(map! :map neuron-mode-map
|
|
:localleader
|
|
;; Override markdown-mode's default behavior to handle neuron links
|
|
:ni "o" #'neuron-follow-thing-at-point
|
|
|
|
;; You can also remove the "z" prefix but
|
|
;; be careful not to override default
|
|
;; markdown-mode bindings.
|
|
(:prefix ("z" . "zettel")
|
|
:ni "u" #'neuron-edit-uplink
|
|
:ni "t" #'neuron-add-tag
|
|
:ni "T" #'neuron-add-tags
|
|
:ni "o" #'neuron-open-current-zettel
|
|
:ni "l" #'neuron-create-and-insert-zettel-link
|
|
:v "L" #'neuron-create-zettel-from-selection
|
|
:ni "s" #'neuron-insert-static-link
|
|
:ni "c" #'neuron-toggle-connection-type
|
|
)
|
|
)
|
|
|
|
(map! :leader "sz" #'search-zettelkasten)
|
|
(map! :leader "fz" #'find-file-in-zettelkasten)
|
|
|