Starting out with org-roam
This commit is contained in:
parent
741d9b5b6a
commit
b22971dbd5
9 changed files with 96 additions and 11 deletions
|
@ -22,6 +22,9 @@ emacsWithPackages (
|
||||||
fira-code-mode
|
fira-code-mode
|
||||||
org-superstar
|
org-superstar
|
||||||
org-roam
|
org-roam
|
||||||
|
org-download
|
||||||
|
visual-fill-column
|
||||||
|
writegood-mode
|
||||||
nix-mode
|
nix-mode
|
||||||
lsp-python-ms
|
lsp-python-ms
|
||||||
lispy
|
lispy
|
||||||
|
@ -40,10 +43,9 @@ emacsWithPackages (
|
||||||
) ++ (
|
) ++ (
|
||||||
with epkgs.elpaPackages; [
|
with epkgs.elpaPackages; [
|
||||||
modus-themes
|
modus-themes
|
||||||
|
minimap
|
||||||
]
|
]
|
||||||
) ++ (
|
) ++ (
|
||||||
with pkgs; [
|
with pkgs; []
|
||||||
pkgs.graphviz-nox
|
|
||||||
]
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
ack
|
ack
|
||||||
ranger
|
ranger
|
||||||
|
imv
|
||||||
calibre
|
calibre
|
||||||
element-desktop
|
element-desktop
|
||||||
gtk-engine-murrine
|
gtk-engine-murrine
|
||||||
|
|
|
@ -17,11 +17,14 @@
|
||||||
ag
|
ag
|
||||||
nixpkgs-fmt
|
nixpkgs-fmt
|
||||||
rnix-lsp
|
rnix-lsp
|
||||||
|
graphviz-nox
|
||||||
|
hunspell
|
||||||
|
hunspellDicts.en_US
|
||||||
|
hunspellDicts.it_IT
|
||||||
(
|
(
|
||||||
makeDesktopItem {
|
makeDesktopItem {
|
||||||
name = "org-protocol";
|
name = "org-protocol";
|
||||||
exec = "emacs %u";
|
exec = "emacsclient %u";
|
||||||
#exec = "emacsclient %u";
|
|
||||||
comment = "Org protocol";
|
comment = "Org protocol";
|
||||||
desktopName = "org-protocol";
|
desktopName = "org-protocol";
|
||||||
type = "Application";
|
type = "Application";
|
||||||
|
|
|
@ -14,6 +14,23 @@
|
||||||
(fira-code-mode-set-font)
|
(fira-code-mode-set-font)
|
||||||
(global-fira-code-mode))
|
(global-fira-code-mode))
|
||||||
|
|
||||||
|
(use-package visual-fill-column
|
||||||
|
:commands (visual-fill-column-mode)
|
||||||
|
:hook
|
||||||
|
(markdown-mode . activate-visual-fill-column)
|
||||||
|
(org-mode . activate-visual-fill-column)
|
||||||
|
:init
|
||||||
|
(defun activate-visual-fill-column ()
|
||||||
|
(interactive)
|
||||||
|
(setq-local fill-column 80)
|
||||||
|
(visual-line-mode t)
|
||||||
|
(visual-fill-column-mode t))
|
||||||
|
:config
|
||||||
|
(setq-default visual-fill-column-center-text t
|
||||||
|
visual-fill-column-fringes-outside-margins nil))
|
||||||
|
|
||||||
|
(use-package minimap)
|
||||||
|
|
||||||
|
|
||||||
(defalias 'yes-or-no-p 'y-or-n-p)
|
(defalias 'yes-or-no-p 'y-or-n-p)
|
||||||
(setq use-dialog-box nil
|
(setq use-dialog-box nil
|
||||||
|
|
|
@ -7,7 +7,6 @@
|
||||||
(python-mode . lsp)
|
(python-mode . lsp)
|
||||||
;; if you want which-key integration
|
;; if you want which-key integration
|
||||||
(lsp-mode . lsp-enable-which-key-integration))
|
(lsp-mode . lsp-enable-which-key-integration))
|
||||||
(before-save . lsp-format-buffer)
|
|
||||||
:commands lsp)
|
:commands lsp)
|
||||||
|
|
||||||
;; optionally
|
;; optionally
|
||||||
|
|
|
@ -2,17 +2,36 @@
|
||||||
:init
|
:init
|
||||||
(setq fill-column 80)
|
(setq fill-column 80)
|
||||||
(require 'org-protocol)
|
(require 'org-protocol)
|
||||||
|
:custom
|
||||||
|
(org-startup-folded 'fold)
|
||||||
:hook
|
:hook
|
||||||
((org-mode . refill-mode)
|
((org-mode . auto-fill-mode) ;refill-mode breaks org headings
|
||||||
(org-mode . (lambda () (org-superstar-mode 1)))
|
(org-mode . (lambda () (org-superstar-mode 1)))
|
||||||
(org-mode . prettify-symbols-mode)))
|
(org-mode . prettify-symbols-mode)))
|
||||||
|
|
||||||
|
(use-package org-download
|
||||||
|
:hook
|
||||||
|
((org-mode . (lambda () (setq-local org-download-image-dir "~/roam/images/")))))
|
||||||
|
|
||||||
(use-package org-roam
|
(use-package org-roam
|
||||||
:init
|
:init
|
||||||
(setq org-roam-v2-ack t)
|
(setq org-roam-v2-ack t)
|
||||||
:custom
|
:custom
|
||||||
(org-roam-directory (file-truename "~/roam/"))
|
(org-roam-directory (file-truename "~/roam/"))
|
||||||
(org-roam-graph-executable "dot")
|
(org-roam-graph-executable "dot")
|
||||||
|
(org-roam-db-location (file-truename "roam/org-roam.db"))
|
||||||
|
(org-roam-capture-templates
|
||||||
|
'(
|
||||||
|
("i" "incremental" plain
|
||||||
|
#'org-roam-capture--get-point
|
||||||
|
"${body}\n%?" ;; this reads from
|
||||||
|
; "%i%?"
|
||||||
|
:empty-lines-before 1
|
||||||
|
:file-name "web/${slug}"
|
||||||
|
:head "#+title: ${title}\n#+roam_key ${ref}\n#+CREATED: %U\n#+LAST_MODIFIED: %U\n\n"
|
||||||
|
:unnarrowed t)
|
||||||
|
("r" "roam-ref" plain #'org-roam-capture--get-point "%i%?" :target (file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+title: ${title}"))))
|
||||||
|
|
||||||
:bind (("C-c n l" . org-roam-buffer-toggle)
|
:bind (("C-c n l" . org-roam-buffer-toggle)
|
||||||
("C-c n f" . org-roam-node-find)
|
("C-c n f" . org-roam-node-find)
|
||||||
("C-c n g" . org-roam-graph)
|
("C-c n g" . org-roam-graph)
|
||||||
|
@ -22,7 +41,7 @@
|
||||||
("C-c n j" . org-roam-dailies-capture-today))
|
("C-c n j" . org-roam-dailies-capture-today))
|
||||||
:config
|
:config
|
||||||
(org-roam-db-autosync-mode)
|
(org-roam-db-autosync-mode)
|
||||||
;; If using org-roam-protocol
|
(require 'org-roam-protocol)
|
||||||
(require 'org-roam-protocol))
|
|
||||||
|
|
||||||
|
|
||||||
(provide 'config-org)
|
(provide 'config-org)
|
||||||
|
|
31
users/profiles/emacs/emacs.d/config/config-spelling.el
Normal file
31
users/profiles/emacs/emacs.d/config/config-spelling.el
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
(use-package ispell
|
||||||
|
:bind
|
||||||
|
(("C-c s c" . ispell-complete-word)
|
||||||
|
("C-c s d" . switch-dictionary-it-en))
|
||||||
|
:hook
|
||||||
|
((org-mode . flyspell-mode)
|
||||||
|
(prog-mode . flyspell-prog-mode)
|
||||||
|
)
|
||||||
|
:custom
|
||||||
|
((ispell-program-name "hunspell")
|
||||||
|
(ispell-dictionary "it_IT"))
|
||||||
|
:config
|
||||||
|
;(add-to-list 'ispell-hunspell-dictionary-alist '("italian-hunspell" "[[:alpha:]]" "[^[:alpha:]]" "[']" t ("-d" "it_IT") nil iso-8859-1))
|
||||||
|
;(add-to-list 'ispell-hunspell-dictionary-alist '("english-hunspell" "[[:alpha:]]" "[^[:alpha:]]" "[']" t ("-d" "en_US") nil iso-8859-1))
|
||||||
|
(defun switch-dictionary-it-en ()
|
||||||
|
(interactive)
|
||||||
|
(let* ((dict ispell-current-dictionary)
|
||||||
|
(new (if (string= dict "it_IT") "en_US"
|
||||||
|
"it_IT")))
|
||||||
|
(ispell-change-dictionary new)
|
||||||
|
(message "Switched dictionary from %s to %s" dict new))))
|
||||||
|
|
||||||
|
(use-package writegood-mode
|
||||||
|
:bind
|
||||||
|
(("C-c s g" . writegood-grade-level)
|
||||||
|
("C-c s r" . writegood-reading-ease)
|
||||||
|
("C-c s w" . writegood-mode)))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
(provide 'config-spelling)
|
|
@ -1,6 +1,8 @@
|
||||||
(use-package nix-mode
|
(use-package nix-mode
|
||||||
:mode "\\.nix\\'")
|
:mode "\\.nix\\'"
|
||||||
|
;:hook
|
||||||
|
;(before-save . lsp-format-buffer))
|
||||||
|
)
|
||||||
(require 'sudo-utils)
|
(require 'sudo-utils)
|
||||||
|
|
||||||
(defun nixos-rebuild-switch ()
|
(defun nixos-rebuild-switch ()
|
||||||
|
|
|
@ -3,6 +3,14 @@
|
||||||
(setq gc-cons-threshold 100000000
|
(setq gc-cons-threshold 100000000
|
||||||
read-process-output-max (* 1024 1024))
|
read-process-output-max (* 1024 1024))
|
||||||
|
|
||||||
|
(defun executable-find (command) ;; to move
|
||||||
|
"Search for COMMAND in `exec-path' and return the absolute file name.
|
||||||
|
Return nil if COMMAND is not found anywhere in `exec-path'."
|
||||||
|
;; Use 1 rather than file-executable-p to better match the behavior of
|
||||||
|
;; call-process.
|
||||||
|
(locate-file command exec-path exec-suffixes 1))
|
||||||
|
|
||||||
|
|
||||||
(require 'aesthetics)
|
(require 'aesthetics)
|
||||||
(require 'config-emacs)
|
(require 'config-emacs)
|
||||||
(require 'config-evil)
|
(require 'config-evil)
|
||||||
|
@ -14,4 +22,7 @@
|
||||||
(require 'config-treemacs)
|
(require 'config-treemacs)
|
||||||
(require 'config-lsp)
|
(require 'config-lsp)
|
||||||
(require 'config-python)
|
(require 'config-python)
|
||||||
|
(require 'config-spelling)
|
||||||
(require 'nix)
|
(require 'nix)
|
||||||
|
|
||||||
|
(server-start)
|
||||||
|
|
Loading…
Add table
Reference in a new issue