Compare commits
4 Commits
67a807846c
...
93bc4b44b2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
93bc4b44b2 | ||
|
|
43cc8528f6 | ||
|
|
8ffee04342 | ||
|
|
b37385e632 |
@ -61,8 +61,8 @@
|
|||||||
(push '(vertical-scroll-bars) default-frame-alist)
|
(push '(vertical-scroll-bars) default-frame-alist)
|
||||||
;; -DisableUnnecessaryInterface
|
;; -DisableUnnecessaryInterface
|
||||||
|
|
||||||
(add-to-list 'default-frame-alist
|
;;(add-to-list 'default-frame-alist
|
||||||
'(font . "DroidSansM Nerd Font Mono"))
|
;; '(font . "DroidSansM Nerd Font Mono"))
|
||||||
|
|
||||||
(provide 'early-init)
|
(provide 'early-init)
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
|||||||
@ -35,9 +35,11 @@
|
|||||||
;; then pass url 'https://github.com/jdtsmith/eglot-booster'
|
;; then pass url 'https://github.com/jdtsmith/eglot-booster'
|
||||||
;; cargo build --release
|
;; cargo build --release
|
||||||
;; Copy binary to /usr/local/bin
|
;; Copy binary to /usr/local/bin
|
||||||
(use-package eglot-booster
|
;; (use-package eglot-booster
|
||||||
:after eglot
|
;; :ensure t
|
||||||
:config (eglot-booster-mode))
|
;; :after eglot
|
||||||
|
;; :config
|
||||||
|
;; (eglot-booster-mode))
|
||||||
|
|
||||||
(provide 'init-eglot)
|
(provide 'init-eglot)
|
||||||
;;; init-eglot.el ends here
|
;;; 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))
|
(apply orig-fun extension subtreep pub-dir nil))
|
||||||
(advice-add 'org-export-output-file-name :around #'org-export-output-file-name-modified)
|
(advice-add 'org-export-output-file-name :around #'org-export-output-file-name-modified)
|
||||||
|
|
||||||
(setq org-capture-templates
|
;; (setq org-capture-templates
|
||||||
'(("t" "Personal todo" entry
|
;; '(("t" "Personal todo" entry
|
||||||
(file+headline +org-capture-todo-file "Inbox")
|
;; (file+headline +org-capture-todo-file "Inbox")
|
||||||
"* TODO %? :@general:" :prepend t)
|
;; "* TODO %? :@general:" :prepend t)
|
||||||
|
|
||||||
("f" "Empty" entry
|
;; ("f" "Empty" entry
|
||||||
(file+headline +org-capture-todo-file "Inbox")
|
;; (file+headline +org-capture-todo-file "Inbox")
|
||||||
"* TODO %?" :prepend t)
|
;; "* TODO %?" :prepend t)
|
||||||
|
|
||||||
("w" "WATCH" entry
|
;; ("w" "WATCH" entry
|
||||||
(file+headline +org-capture-todo-file "Inbox")
|
;; (file+headline +org-capture-todo-file "Inbox")
|
||||||
"* TODO %? :@watch:" :prepend t)
|
;; "* TODO %? :@watch:" :prepend t)
|
||||||
|
|
||||||
("r" "READ" entry
|
;; ("r" "READ" entry
|
||||||
(file+headline +org-capture-todo-file "Inbox")
|
;; (file+headline +org-capture-todo-file "Inbox")
|
||||||
"* TODO %? :@read:" :prepend t)
|
;; "* TODO %? :@read:" :prepend t)
|
||||||
|
|
||||||
("c" "CHECK" entry
|
;; ("c" "CHECK" entry
|
||||||
(file+headline +org-capture-todo-file "Inbox")
|
;; (file+headline +org-capture-todo-file "Inbox")
|
||||||
"* TODO %? :@check:" :prepend t)
|
;; "* TODO %? :@check:" :prepend t)
|
||||||
|
|
||||||
("i" "Got a new idea?" entry
|
;; ("i" "Got a new idea?" entry
|
||||||
(file+headline +org-capture-todo-file "Inbox")
|
;; (file+headline +org-capture-todo-file "Inbox")
|
||||||
"* TODO %? :@idea:" :prepend t)
|
;; "* TODO %? :@idea:" :prepend t)
|
||||||
|
|
||||||
("j" "Journal" entry
|
;; ("j" "Journal" entry
|
||||||
(file+headline +org-capture-journal-file "Posts")
|
;; (file+headline +org-capture-journal-file "Posts")
|
||||||
"*** %?\n:DATE:\n%<[%Y-%m-%d %a %H:%M]>\n:END:" :prepend t)))
|
;; "*** %?\n:DATE:\n%<[%Y-%m-%d %a %H:%M]>\n:END:" :prepend t)))
|
||||||
|
|
||||||
(setq org-agenda-custom-commands
|
;; (setq org-agenda-custom-commands
|
||||||
'(
|
;; '(
|
||||||
("f" "Today Tasks"
|
;; ("f" "Today Tasks"
|
||||||
(
|
;; (
|
||||||
(agenda "" ((org-agenda-span 4)))
|
;; (agenda "" ((org-agenda-span 4)))
|
||||||
(org-ql-block '(and
|
;; (org-ql-block '(and
|
||||||
(todo "TODO")
|
;; (todo "TODO")
|
||||||
(or (scheduled)
|
;; (or (scheduled)
|
||||||
(deadline)))
|
;; (deadline)))
|
||||||
((org-ql-block-header "Soon")))
|
;; ((org-ql-block-header "Soon")))
|
||||||
))
|
;; ))
|
||||||
|
|
||||||
("v" "General Tasks"
|
;; ("v" "General Tasks"
|
||||||
(
|
;; (
|
||||||
(agenda "" ((org-agenda-span 4)))
|
;; (agenda "" ((org-agenda-span 4)))
|
||||||
(org-ql-block '(and
|
;; (org-ql-block '(and
|
||||||
(priority "A")
|
;; (priority "A")
|
||||||
(not (deadline))
|
;; (not (deadline))
|
||||||
(not (scheduled)))
|
;; (not (scheduled)))
|
||||||
((org-ql-block-header "High-priority tasks")))
|
;; ((org-ql-block-header "High-priority tasks")))
|
||||||
|
|
||||||
(org-ql-block '(and
|
;; (org-ql-block '(and
|
||||||
(todo "TODO")
|
;; (todo "TODO")
|
||||||
(tags "@idea")
|
;; (tags "@idea")
|
||||||
(not (tags "@later"))
|
;; (not (tags "@later"))
|
||||||
(not (deadline))
|
;; (not (deadline))
|
||||||
(not (scheduled)))
|
;; (not (scheduled)))
|
||||||
((org-ql-block-header "Looking for an idea?")))
|
;; ((org-ql-block-header "Looking for an idea?")))
|
||||||
|
|
||||||
(org-ql-block '(and
|
;; (org-ql-block '(and
|
||||||
(todo "TODO")
|
;; (todo "TODO")
|
||||||
(tags "@write")
|
;; (tags "@write")
|
||||||
(not (tags "@later"))
|
;; (not (tags "@later"))
|
||||||
(not (tags "project"))
|
;; (not (tags "project"))
|
||||||
(not (deadline))
|
;; (not (deadline))
|
||||||
(not (scheduled)))
|
;; (not (scheduled)))
|
||||||
((org-ql-block-header "Write something:")))
|
;; ((org-ql-block-header "Write something:")))
|
||||||
|
|
||||||
(org-roam-ql-agenda-block '(and (todo "TODO")))
|
;; (org-roam-ql-agenda-block '(and (todo "TODO")))
|
||||||
))))
|
;; ))))
|
||||||
)
|
)
|
||||||
;; -OrgPac
|
;; -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
|
(use-package toc-org
|
||||||
:hook (org-mode . toc-org-mode))
|
:hook (org-mode . toc-org-mode))
|
||||||
;; -TocOrgPac
|
;; -TocOrgPac
|
||||||
|
|||||||
@ -5,9 +5,10 @@
|
|||||||
;;;; Code:
|
;;;; Code:
|
||||||
|
|
||||||
(use-package rust-mode
|
(use-package rust-mode
|
||||||
|
:ensure t
|
||||||
:init
|
:init
|
||||||
(setq rust-mode-treesitter-derive t))
|
(setq rust-mode-treesitter-derive t)
|
||||||
(setq rust-format-on-save t)
|
(setq rust-format-on-save t))
|
||||||
|
|
||||||
(provide 'init-rust)
|
(provide 'init-rust)
|
||||||
;;; init-rust.el ends here
|
;;; 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-log-types '(unlock-file))
|
||||||
;; (add-to-list 'warning-suppress-types '(unlock-file))
|
;; (add-to-list 'warning-suppress-types '(unlock-file))
|
||||||
;; or
|
;; or
|
||||||
(setq warning-minimum-level :error)
|
;; (setq warning-minimum-level :error)
|
||||||
|
|
||||||
(defun remove-electric-indent-mode ()
|
(defun remove-electric-indent-mode ()
|
||||||
(setq electric-indent-inhibit t))
|
(setq electric-indent-inhibit t))
|
||||||
@ -101,6 +101,9 @@ If you experience freezing, decrease this. If you experience stuttering, increa
|
|||||||
;; ;; Package Management
|
;; ;; Package Management
|
||||||
(require 'init-package)
|
(require 'init-package)
|
||||||
|
|
||||||
|
(require 'init-org)
|
||||||
|
(require 'init-org-node)
|
||||||
|
|
||||||
;; ;; Global Functionalities
|
;; ;; Global Functionalities
|
||||||
(require 'init-global-config)
|
(require 'init-global-config)
|
||||||
(require 'init-func)
|
(require 'init-func)
|
||||||
@ -154,7 +157,6 @@ If you experience freezing, decrease this. If you experience stuttering, increa
|
|||||||
;;; (require 'init-webdev)
|
;;; (require 'init-webdev)
|
||||||
|
|
||||||
;; Office
|
;; Office
|
||||||
(require 'init-org)
|
|
||||||
(require 'init-adoc)
|
(require 'init-adoc)
|
||||||
|
|
||||||
;; InitPrivate
|
;; 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