Update config
This commit is contained in:
parent
67a807846c
commit
b37385e632
@ -61,8 +61,8 @@
|
||||
(push '(vertical-scroll-bars) default-frame-alist)
|
||||
;; -DisableUnnecessaryInterface
|
||||
|
||||
(add-to-list 'default-frame-alist
|
||||
'(font . "DroidSansM Nerd Font Mono"))
|
||||
;;(add-to-list 'default-frame-alist
|
||||
;; '(font . "DroidSansM Nerd Font Mono"))
|
||||
|
||||
(provide 'early-init)
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
@ -35,9 +35,11 @@
|
||||
;; then pass url 'https://github.com/jdtsmith/eglot-booster'
|
||||
;; cargo build --release
|
||||
;; Copy binary to /usr/local/bin
|
||||
(use-package eglot-booster
|
||||
:after eglot
|
||||
:config (eglot-booster-mode))
|
||||
;; (use-package eglot-booster
|
||||
;; :ensure t
|
||||
;; :after eglot
|
||||
;; :config
|
||||
;; (eglot-booster-mode))
|
||||
|
||||
(provide 'init-eglot)
|
||||
;;; init-eglot.el ends here
|
||||
|
||||
@ -206,101 +206,6 @@
|
||||
)
|
||||
;; -OrgPac
|
||||
|
||||
;; OrgRoamPac
|
||||
(use-package org-roam
|
||||
:ensure t
|
||||
:demand t ;; Ensure org-roam is loaded by default
|
||||
:custom
|
||||
(org-roam-directory "~/Documents/Org-mode/brain")
|
||||
(org-roam-completion-everywhere t)
|
||||
: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)
|
||||
("C-c n I" . org-roam-node-insert-immediate)
|
||||
("C-c n t" . my/org-roam-capture-task)
|
||||
:map org-mode-map
|
||||
("C-M-i" . completion-at-point)
|
||||
:map org-roam-dailies-map
|
||||
("Y" . org-roam-dailies-capture-yesterday)
|
||||
("T" . org-roam-dailies-capture-tomorrow))
|
||||
:bind-keymap
|
||||
("C-c n d" . org-roam-dailies-map)
|
||||
:config
|
||||
(require 'org-roam-dailies) ;; Ensure the keymap is available
|
||||
(org-roam-db-autosync-mode))
|
||||
|
||||
|
||||
(defun my/org-roam-filter-by-tag (tag-name)
|
||||
(lambda (node)
|
||||
(member tag-name (org-roam-node-tags node))))
|
||||
|
||||
(defun my/org-roam-list-notes-by-tag (tag-name)
|
||||
(mapcar #'org-roam-node-file
|
||||
(seq-filter
|
||||
(my/org-roam-filter-by-tag tag-name)
|
||||
(org-roam-node-list))))
|
||||
|
||||
(defun my/org-roam-refresh-agenda-list ()
|
||||
(interactive)
|
||||
(setq org-agenda-files (my/org-roam-list-notes-by-tag "Project")))
|
||||
|
||||
;; Build the agenda list the first time for the session
|
||||
(my/org-roam-refresh-agenda-list)
|
||||
|
||||
(defun my/org-roam-project-finalize-hook ()
|
||||
"Adds the captured project file to `org-agenda-files' if the
|
||||
capture was not aborted."
|
||||
;; Remove the hook since it was added temporarily
|
||||
(remove-hook 'org-capture-after-finalize-hook #'my/org-roam-project-finalize-hook)
|
||||
|
||||
;; Add project file to the agenda list if the capture was confirmed
|
||||
(unless org-note-abort
|
||||
(with-current-buffer (org-capture-get :buffer)
|
||||
(add-to-list 'org-agenda-files (buffer-file-name)))))
|
||||
|
||||
;;; This does not work, something wrong with template..
|
||||
;; (defun my/org-roam-find-project ()
|
||||
;; (interactive)
|
||||
;; ;; Add the project file to the agenda after capture is finished
|
||||
;; (add-hook 'org-capture-after-finalize-hook #'my/org-roam-project-finalize-hook)
|
||||
|
||||
;; ;; Select a project file to open, creating it if necessary
|
||||
;; (org-roam-node-find
|
||||
;; nil
|
||||
;; nil
|
||||
;; (my/org-roam-filter-by-tag "Project")
|
||||
;; :templates '(("p" "project" plain "* Goals\n\n%?\n\n* Tasks\n\n* TODO Add initial tasks\n\n* Dates\n\n"
|
||||
;; :if-new (file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+title: ${title}\n#+category: ${title}\n#+filetags: Project")
|
||||
;; :unnarrowed t))))
|
||||
|
||||
(defun my/org-roam-capture-task ()
|
||||
(interactive)
|
||||
;; Add the project file to the agenda after capture is finished
|
||||
(add-hook 'org-capture-after-finalize-hook #'my/org-roam-project-finalize-hook)
|
||||
|
||||
;; Capture the new task, creating the project file if necessary
|
||||
(org-roam-capture- :node (org-roam-node-read
|
||||
nil
|
||||
(my/org-roam-filter-by-tag "Project"))
|
||||
:templates '(("p" "project" plain "** TODO %?"
|
||||
:if-new (file+head+olp "%<%Y%m%d%H%M%S>-${slug}.org"
|
||||
"#+title: ${title}\n#+category: ${title}\n#+filetags: Project"
|
||||
("Tasks"))))))
|
||||
;; ~OrgRoamPac
|
||||
|
||||
(use-package org-roam-ql
|
||||
:after (org-roam)
|
||||
:bind ((:map org-roam-mode-map
|
||||
;; Have org-roam-ql's transient available in org-roam-mode buffers
|
||||
("v" . org-roam-ql-buffer-dispatch)
|
||||
:map minibuffer-mode-map
|
||||
;; Be able to add titles in queries while in minibuffer.
|
||||
;; This is similar to `org-roam-node-insert', but adds
|
||||
;; only title as a string.
|
||||
("C-c n i" . org-roam-ql-insert-node-title))))
|
||||
;; -OrgRoamPac
|
||||
|
||||
;; TocOrgPac
|
||||
(use-package toc-org
|
||||
:hook (org-mode . toc-org-mode))
|
||||
;; -TocOrgPac
|
||||
|
||||
@ -5,9 +5,10 @@
|
||||
;;;; Code:
|
||||
|
||||
(use-package rust-mode
|
||||
:ensure t
|
||||
:init
|
||||
(setq rust-mode-treesitter-derive t))
|
||||
(setq rust-format-on-save t)
|
||||
(setq rust-mode-treesitter-derive t)
|
||||
(setq rust-format-on-save t))
|
||||
|
||||
(provide 'init-rust)
|
||||
;;; init-rust.el ends here
|
||||
|
||||
4
init.el
4
init.el
@ -101,6 +101,9 @@ If you experience freezing, decrease this. If you experience stuttering, increa
|
||||
;; ;; Package Management
|
||||
(require 'init-package)
|
||||
|
||||
(require 'init-org)
|
||||
(require 'init-org-roam)
|
||||
|
||||
;; ;; Global Functionalities
|
||||
(require 'init-global-config)
|
||||
(require 'init-func)
|
||||
@ -154,7 +157,6 @@ If you experience freezing, decrease this. If you experience stuttering, increa
|
||||
;;; (require 'init-webdev)
|
||||
|
||||
;; Office
|
||||
(require 'init-org)
|
||||
(require 'init-adoc)
|
||||
|
||||
;; InitPrivate
|
||||
|
||||
Loading…
Reference in New Issue
Block a user