Compare commits
4 Commits
67a807846c
...
93bc4b44b2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
93bc4b44b2 | ||
|
|
43cc8528f6 | ||
|
|
8ffee04342 | ||
|
|
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
|
||||
|
||||
75
elisp/init-org-node.el
Normal file
75
elisp/init-org-node.el
Normal file
@ -0,0 +1,75 @@
|
||||
;;; init-org-node.el --- summary -*- lexical-binding: t -*-
|
||||
|
||||
;; Author: Mark van der Putten
|
||||
;; Maintainer: Mark van der Putten
|
||||
;; Version: version
|
||||
;; Package-Requires: (dependencies)
|
||||
;; Homepage: homepage
|
||||
;; Keywords: keywords
|
||||
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Initialize org-node
|
||||
|
||||
;;; Code:
|
||||
|
||||
|
||||
(use-package org-node
|
||||
:ensure t
|
||||
:after org
|
||||
:bind (("M-s M-f" . org-node-find)
|
||||
("M-s M-i" . org-node-insert-link)
|
||||
("M-s M-t" . my/org-node-todo-search)
|
||||
("M-s M-s" . org-node-seq-dispatch)
|
||||
)
|
||||
:init
|
||||
(setq org-node-extra-id-dirs
|
||||
'("~/Documents/Org-mode/brain"))
|
||||
:config
|
||||
(org-node-cache-mode)
|
||||
|
||||
(setq org-capture-templates
|
||||
'(("i" "Capture into ID node"
|
||||
plain (function org-node-capture-target) nil
|
||||
:empty-lines-after 1)
|
||||
|
||||
("j" "Jump to ID node"
|
||||
plain (function org-node-capture-target) nil
|
||||
:jump-to-captured t
|
||||
:immediate-finish t)
|
||||
|
||||
;; Sometimes handy after `org-node-insert-link', to
|
||||
;; make a stub you plan to fill in later, without
|
||||
;; leaving the current buffer for now
|
||||
("s" "Make quick stub ID node"
|
||||
plain (function org-node-capture-target) nil
|
||||
:immediate-finish t)))
|
||||
|
||||
(defun my/org-node-todo-search ()
|
||||
"Toon alle TODOs uit org-roam-bestanden."
|
||||
(interactive)
|
||||
(org-ql-search (org-node-list-files)
|
||||
'(todo)
|
||||
:title "TODOs"
|
||||
:sort '(date)
|
||||
:super-groups '((:name "Taken" :todo))
|
||||
))
|
||||
|
||||
(setq my-todo-nodes
|
||||
(lambda (node)
|
||||
(string= (org-node-get-todo node) "TODO")))
|
||||
|
||||
(setq org-agenda-custom-commands
|
||||
'(("b" "TODO's uit Org-Node (gefilterd)"
|
||||
((agenda "" ((org-agenda-files (org-node-list-files))
|
||||
(org-agenda-filter-function
|
||||
(lambda (entry)
|
||||
(let ((node (org-entry-get-node entry)))
|
||||
(funcall my-todo-nodes node))))))))))
|
||||
)
|
||||
|
||||
|
||||
(provide 'init-org-node)
|
||||
|
||||
;;; init-org-node.el ends here
|
||||
@ -134,173 +134,78 @@
|
||||
(apply orig-fun extension subtreep pub-dir nil))
|
||||
(advice-add 'org-export-output-file-name :around #'org-export-output-file-name-modified)
|
||||
|
||||
(setq org-capture-templates
|
||||
'(("t" "Personal todo" entry
|
||||
(file+headline +org-capture-todo-file "Inbox")
|
||||
"* TODO %? :@general:" :prepend t)
|
||||
;; (setq org-capture-templates
|
||||
;; '(("t" "Personal todo" entry
|
||||
;; (file+headline +org-capture-todo-file "Inbox")
|
||||
;; "* TODO %? :@general:" :prepend t)
|
||||
|
||||
("f" "Empty" entry
|
||||
(file+headline +org-capture-todo-file "Inbox")
|
||||
"* TODO %?" :prepend t)
|
||||
;; ("f" "Empty" entry
|
||||
;; (file+headline +org-capture-todo-file "Inbox")
|
||||
;; "* TODO %?" :prepend t)
|
||||
|
||||
("w" "WATCH" entry
|
||||
(file+headline +org-capture-todo-file "Inbox")
|
||||
"* TODO %? :@watch:" :prepend t)
|
||||
;; ("w" "WATCH" entry
|
||||
;; (file+headline +org-capture-todo-file "Inbox")
|
||||
;; "* TODO %? :@watch:" :prepend t)
|
||||
|
||||
("r" "READ" entry
|
||||
(file+headline +org-capture-todo-file "Inbox")
|
||||
"* TODO %? :@read:" :prepend t)
|
||||
;; ("r" "READ" entry
|
||||
;; (file+headline +org-capture-todo-file "Inbox")
|
||||
;; "* TODO %? :@read:" :prepend t)
|
||||
|
||||
("c" "CHECK" entry
|
||||
(file+headline +org-capture-todo-file "Inbox")
|
||||
"* TODO %? :@check:" :prepend t)
|
||||
;; ("c" "CHECK" entry
|
||||
;; (file+headline +org-capture-todo-file "Inbox")
|
||||
;; "* TODO %? :@check:" :prepend t)
|
||||
|
||||
("i" "Got a new idea?" entry
|
||||
(file+headline +org-capture-todo-file "Inbox")
|
||||
"* TODO %? :@idea:" :prepend t)
|
||||
;; ("i" "Got a new idea?" entry
|
||||
;; (file+headline +org-capture-todo-file "Inbox")
|
||||
;; "* TODO %? :@idea:" :prepend t)
|
||||
|
||||
("j" "Journal" entry
|
||||
(file+headline +org-capture-journal-file "Posts")
|
||||
"*** %?\n:DATE:\n%<[%Y-%m-%d %a %H:%M]>\n:END:" :prepend t)))
|
||||
;; ("j" "Journal" entry
|
||||
;; (file+headline +org-capture-journal-file "Posts")
|
||||
;; "*** %?\n:DATE:\n%<[%Y-%m-%d %a %H:%M]>\n:END:" :prepend t)))
|
||||
|
||||
(setq org-agenda-custom-commands
|
||||
'(
|
||||
("f" "Today Tasks"
|
||||
(
|
||||
(agenda "" ((org-agenda-span 4)))
|
||||
(org-ql-block '(and
|
||||
(todo "TODO")
|
||||
(or (scheduled)
|
||||
(deadline)))
|
||||
((org-ql-block-header "Soon")))
|
||||
))
|
||||
;; (setq org-agenda-custom-commands
|
||||
;; '(
|
||||
;; ("f" "Today Tasks"
|
||||
;; (
|
||||
;; (agenda "" ((org-agenda-span 4)))
|
||||
;; (org-ql-block '(and
|
||||
;; (todo "TODO")
|
||||
;; (or (scheduled)
|
||||
;; (deadline)))
|
||||
;; ((org-ql-block-header "Soon")))
|
||||
;; ))
|
||||
|
||||
("v" "General Tasks"
|
||||
(
|
||||
(agenda "" ((org-agenda-span 4)))
|
||||
(org-ql-block '(and
|
||||
(priority "A")
|
||||
(not (deadline))
|
||||
(not (scheduled)))
|
||||
((org-ql-block-header "High-priority tasks")))
|
||||
;; ("v" "General Tasks"
|
||||
;; (
|
||||
;; (agenda "" ((org-agenda-span 4)))
|
||||
;; (org-ql-block '(and
|
||||
;; (priority "A")
|
||||
;; (not (deadline))
|
||||
;; (not (scheduled)))
|
||||
;; ((org-ql-block-header "High-priority tasks")))
|
||||
|
||||
(org-ql-block '(and
|
||||
(todo "TODO")
|
||||
(tags "@idea")
|
||||
(not (tags "@later"))
|
||||
(not (deadline))
|
||||
(not (scheduled)))
|
||||
((org-ql-block-header "Looking for an idea?")))
|
||||
;; (org-ql-block '(and
|
||||
;; (todo "TODO")
|
||||
;; (tags "@idea")
|
||||
;; (not (tags "@later"))
|
||||
;; (not (deadline))
|
||||
;; (not (scheduled)))
|
||||
;; ((org-ql-block-header "Looking for an idea?")))
|
||||
|
||||
(org-ql-block '(and
|
||||
(todo "TODO")
|
||||
(tags "@write")
|
||||
(not (tags "@later"))
|
||||
(not (tags "project"))
|
||||
(not (deadline))
|
||||
(not (scheduled)))
|
||||
((org-ql-block-header "Write something:")))
|
||||
;; (org-ql-block '(and
|
||||
;; (todo "TODO")
|
||||
;; (tags "@write")
|
||||
;; (not (tags "@later"))
|
||||
;; (not (tags "project"))
|
||||
;; (not (deadline))
|
||||
;; (not (scheduled)))
|
||||
;; ((org-ql-block-header "Write something:")))
|
||||
|
||||
(org-roam-ql-agenda-block '(and (todo "TODO")))
|
||||
))))
|
||||
;; (org-roam-ql-agenda-block '(and (todo "TODO")))
|
||||
;; ))))
|
||||
)
|
||||
;; -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
|
||||
|
||||
56
elisp/init-treesitter.el
Normal file
56
elisp/init-treesitter.el
Normal file
@ -0,0 +1,56 @@
|
||||
;;; init-treesitter.el --- summary -*- lexical-binding: t -*-
|
||||
|
||||
;; Author: Mark van der Putten
|
||||
;; Maintainer: Mark van der Putten
|
||||
;; Version: 0.1
|
||||
;; Package-Requires: (dependencies)
|
||||
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Configure tree-sitter languages
|
||||
|
||||
;;; Code:
|
||||
|
||||
;; tree-sitter-grammars.tree-sitter-rust
|
||||
;; tree-sitter-grammars.tree-sitter-python
|
||||
;; tree-sitter-grammars.tree-sitter-nix
|
||||
;; tree-sitter-grammars.tree-sitter-markdown
|
||||
;; tree-sitter-grammars.tree-sitter-make
|
||||
;; tree-sitter-grammars.tree-sitter-lua
|
||||
;; tree-sitter-grammars.tree-sitter-yaml
|
||||
;; tree-sitter-grammars.tree-sitter-c
|
||||
;; tree-sitter-grammars.tree-sitter-sql
|
||||
;; tree-sitter-grammars.tree-sitter-cpp
|
||||
;; tree-sitter-grammars.tree-sitter-fish
|
||||
;; tree-sitter-grammars.tree-sitter-bash
|
||||
;; tree-sitter-grammars.tree-sitter-regex
|
||||
;; tree-sitter-grammars.tree-sitter-latex
|
||||
;; tree-sitter-grammars.tree-sitter-json5
|
||||
;; tree-sitter-grammars.tree-sitter-elisp
|
||||
;; tree-sitter-grammars.tree-sitter-cmake
|
||||
;; tree-sitter-grammars.tree-sitter-javascript
|
||||
;; tree-sitter-grammars.tree-sitter-dockerfile
|
||||
;; tree-sitter-grammars.tree-sitter-devicetree
|
||||
;; tree-sitter-grammars.tree-sitter-commonlisp
|
||||
;; tree-sitter-grammars.tree-sitter-vue
|
||||
|
||||
(use-package tree-sitter
|
||||
:ensure t
|
||||
;; :init (global-tree-sitter-mode)
|
||||
:config
|
||||
(setq treesit-language-source-alist
|
||||
'((python . ("https://github.com/tree-sitter/tree-sitter-python"))
|
||||
(nix . ("https://github.com/nix-communit/tree-sitter-nix"))
|
||||
(rust . ("https://github.com/tree-sitter/tree-sitter-rust"))
|
||||
;; voeg hier meer talen toe
|
||||
))
|
||||
|
||||
(mapc #'treesit-install-language-grammar (mapcar #'car treesit-language-source-alist))
|
||||
|
||||
)
|
||||
|
||||
|
||||
(provide 'init-treesitter)
|
||||
|
||||
;;; init-treesitter.el ends here
|
||||
6
init.el
6
init.el
@ -40,7 +40,7 @@
|
||||
;; (add-to-list 'warning-suppress-log-types '(unlock-file))
|
||||
;; (add-to-list 'warning-suppress-types '(unlock-file))
|
||||
;; or
|
||||
(setq warning-minimum-level :error)
|
||||
;; (setq warning-minimum-level :error)
|
||||
|
||||
(defun remove-electric-indent-mode ()
|
||||
(setq electric-indent-inhibit t))
|
||||
@ -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-node)
|
||||
|
||||
;; ;; 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
|
||||
|
||||
6
snippets/org-mode/clock
Normal file
6
snippets/org-mode/clock
Normal file
@ -0,0 +1,6 @@
|
||||
# -*- mode: org-mode -*-
|
||||
# name: clock
|
||||
# key: clock
|
||||
# --
|
||||
#+BEGIN: clocktable :maxlevel 2 :emphasize nil :scope file
|
||||
#+END:
|
||||
Loading…
Reference in New Issue
Block a user