diff --git a/emacs/.config/doom/config.el b/emacs/.config/doom/config.el index 927d591..aac9db1 100644 --- a/emacs/.config/doom/config.el +++ b/emacs/.config/doom/config.el @@ -30,7 +30,10 @@ ;; If you use `org' and don't want your org files in the default location below, ;; change `org-directory'. It must be set before org loads! -(setq org-directory "~/org") +(setq org-directory "~/Nextcloud/org" + org-roam-directory "~/Nextcloud/org-roam") + +;; (map! :nv "SPC r" "SPC n r") ;; This determines the style of line numbers in effect. If set to `nil', line ;; numbers are disabled. For relative line numbers, set this to `relative'. @@ -66,30 +69,31 @@ (map! :desc "Flycheck next error" :nv "g n" #'flycheck-next-error) (map! :desc "Flycheck previous error" :nv "g N" #'flycheck-previous-error) +(map! :desc "Format and save" :nvi "C-s" #'fd-format-and-save) ;; Org-mode custom keybindings -;; (map! :map org-mode-map :nvi "C-k" #'org-backward-element) -;; (map! :map org-mode-map :nvi "C-j" #'org-forward-element) -;; (map! :map org-mode-map :nvi "C-h" #'org-up-element) -;; (map! :map org-mode-map :nvi "C-l" #'org-down-element) +(map! :map org-mode-map :nvi "C-k" #'org-backward-element) +(map! :map org-mode-map :nvi "C-j" #'org-forward-element) +(map! :map org-mode-map :nvi "C-h" #'org-up-element) +(map! :map org-mode-map :nvi "C-l" #'org-down-element) ;; Spell checking settings ;; TODO make toggling of spell checking ('SPC t s') use flyspell-mode in text modesm and flyspell-prog-mode in programming modes (see hooks below) ;; Removing hooks for automatic spell checking set here: https://github.com/hlissner/doom-emacs/blob/develop/modules/checkers/spell/config.el (remove-hook! '(org-mode-hook - markdown-mode-hook - TeX-mode-hook - rst-mode-hook - mu4e-compose-mode-hook - message-mode-hook - git-commit-mode-hook) - #'flyspell-mode) + markdown-mode-hook + TeX-mode-hook + rst-mode-hook + mu4e-compose-mode-hook + message-mode-hook + git-commit-mode-hook) + #'flyspell-mode) (remove-hook! '(yaml-mode-hook - conf-mode-hook - prog-mode-hook) - #'flyspell-prog-mode) + conf-mode-hook + prog-mode-hook) + #'flyspell-prog-mode) (setq ispell-dictionary "english") (setq lsp-dart-flutter-sdk-dir "/home/julian/snap/flutter/common/flutter") @@ -104,6 +108,12 @@ (message "Dictionary switched from %s to %s" dic change) )) +(defun fd-format-and-save() + (interactive) + (evil-force-normal-state) + (+format/buffer) + (save-buffer)) + (add-hook 'tetris-mode-hook #'turn-off-evil-mode) ;; Make sniping simpler for german keyboard @@ -113,6 +123,7 @@ (map! :map evil-snipe-parent-transient-map "," #'evil-snipe-repeat) (map! :map evil-snipe-parent-transient-map ";" #'evil-snipe-repeat-reverse) + ;; (when evil-snipe-override-evil-repeat-keys ;; (evil-define-key 'motion map ;; "," 'evil-snipe-repeat @@ -120,7 +131,7 @@ ;; Python settings ;; (add-hook 'python-mode-hook (lambda () - ;; (setq flycheck-checker 'python-pylint))) +;; (setq flycheck-checker 'python-pylint))) ;; (add-hook 'pyhon-mode-local-vars-hook ;; (lambda () @@ -138,7 +149,7 @@ ;; (setq org-agenda-files (list "~/org")) ;; (custom-set-variables ;; '(org-directory "~/org") - ;; '(org-agenda-files (list org-directory))) +;; '(org-agenda-files (list org-directory))) ;; (add-to-list 'org-agenda-files "~/org/anothertest.org" 'append) diff --git a/emacs/.config/doom/init.el b/emacs/.config/doom/init.el index bea3217..f331dd1 100644 --- a/emacs/.config/doom/init.el +++ b/emacs/.config/doom/init.el @@ -112,7 +112,7 @@ :lang ;;agda ; types of types of types of types... ;;beancount ; mind the GAAP - ;;(cc +lsp) ; C > C++ == 1 + (cc) ; C > C++ == 1 ;;clojure ; java with a lisp ;;common-lisp ; if you've seen one lisp, you've seen them all ;;coq ; proofs-as-programs @@ -129,7 +129,7 @@ ;;faust ; dsp, but you get to keep your soul ;;fsharp ; ML stands for Microsoft's Language ;;fstar ; (dependent) types and (monadic) effects and Z3 - ;;gdscript ; the language you waited for + gdscript ; the language you waited for ;;(go +lsp) ; the hipster dialect ;;(haskell +dante) ; a language that's lazier than I am ;;hy ; readability of scheme w/ speed of python @@ -139,7 +139,7 @@ ;;javascript ; all(hope(abandon(ye(who(enter(here)))))) ;; julia ; a better, faster MATLAB ;;kotlin ; a better, slicker Java(Script) - ;;latex ; writing papers in Emacs has never been so fun + latex ; writing papers in Emacs has never been so fun ;;lean ; for folks with too much to prove ;;ledger ; be audit you can be ;;lua ; one-based indices? one-based indices @@ -147,7 +147,7 @@ ;;nim ; python + lisp at the speed of c ;;nix ; I hereby declare "nix geht mehr!" ;;ocaml ; an objective camel - org ; organize your plain life in plain text + (org +hugo +roam2) ; organize your plain life in plain text ;;php ; perl's insecure younger brother ;;plantuml ; diagrams for confusing people more ;;purescript ; javascript, but functional diff --git a/emacs/.config/doom/org-agenda-files b/emacs/.config/doom/org-agenda-files index e69de29..b9f086a 100644 --- a/emacs/.config/doom/org-agenda-files +++ b/emacs/.config/doom/org-agenda-files @@ -0,0 +1 @@ +/home/julian/Nextcloud/org diff --git a/emacs/.config/doom/packages.el b/emacs/.config/doom/packages.el index 66aeae5..5e64d41 100644 --- a/emacs/.config/doom/packages.el +++ b/emacs/.config/doom/packages.el @@ -11,6 +11,9 @@ (package! company-quickhelp) +(unpin! org-roam) +(package! org-roam-ui) + ;; To install a package directly from a remote git repo, you must specify a ;; `:recipe'. You'll find documentation on what `:recipe' accepts here: ;; https://github.com/raxod502/straight.el#the-recipe-format