Skip to content

Commit

Permalink
adds japanese and more roam templates
Browse files Browse the repository at this point in the history
  • Loading branch information
jvscholz committed Aug 3, 2024
1 parent ecbe731 commit fc916e7
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 6 deletions.
44 changes: 38 additions & 6 deletions doom/config.el
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,39 @@
;; :config
;; (global-pangu-spacing-mode 1))

;; (cl-defmethod org-roam-node-type ((node org-roam-node))
;; "Return the TYPE of NODE."
;; (condition-case nil
;; (file-name-nondirectory
;; (directory-file-name
;; (file-name-directory
;; (file-relative-name (org-roam-node-file node) org-roam-directory))))
;; (error "")))
;;
(setq org-roam-node-display-template
(concat "${type:15} ${title:*} " (propertize "${tags:10}" 'face 'org-tag)))

(setq org-roam-capture-templates
'(("d" "default" plain "%?"
'(("m" "main" plain "%?"
:if-new (file+head "main/${slug}.org"
"#+title: ${title}\n")
:immediate-finish t
:unnarrowed t)
("r" "reference" plain "%?"
:if-new (file+head "reference/${title}.org"
"#+title: ${title}\n")
:immediate-finish t
:unnarrowed t)
("a" "article" plain "%?"
:if-new (file+head "articles/${title}.org"
"#+title: ${title}\n#+filetags: :article:\n")
:immediate-finish t
:unnarrowed t)
("d" "default" plain "%?"
:if-new (file+head "%<%Y%m%d%H%M%S>-${slug}.org"
"#+title: ${title}\n")
:unnarrowed t)))

(setq org-roam-capture-templates
'(("g" "Genki Note" plain
"%?"
:unnarrowed t)
("g" "Genki Note" plain "%?"
:if-new (file+head "reference/Genki/${slug}.org"
"#+title: ${title}\n#+date: %U\n")
:unnarrowed t)))
Expand Down Expand Up @@ -94,6 +118,14 @@
:ensure t
:commands vterm)

(setq default-input-method "japanese")

(general-define-key
:states 'insert
"q" (general-key-dispatch 'self-insert-command
:timeout 0.25
"q" 'toggle-input-method))

;; Whenever you reconfigure a package, make sure to wrap your config in an
;; `after!' block, otherwise Doom's defaults may override your settings. E.g.
;;
Expand Down
1 change: 1 addition & 0 deletions doom/packages.el
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
;; ...Or *all* packages (NOT RECOMMENDED; will likely break things)
;(unpin! t)

(package! pangu-spacing)
;;(unpin! org-roam)
(package! org-roam-ui
:recipe (:host github :repo "org-roam/org-roam-ui"))
Expand Down

0 comments on commit fc916e7

Please sign in to comment.