1
0
Fork 0
mirror of https://github.com/Horhik/dotfiles.git synced 2024-11-22 00:11:27 +00:00

update config

This commit is contained in:
horhik 2023-03-05 10:52:12 +03:00
parent 9d31d48b34
commit 1a54a180b7
2 changed files with 646 additions and 385 deletions

View file

@ -55,20 +55,13 @@
#+end_src #+end_src
** Basic Theiming ** Basic Theiming
#+begin_src emacs-lisp #+begin_src emacs-lisp
(straight-use-package 'doom-themes ; (add-to-list 'custom-theme-load-path "~/.emacs.d/everforest-theme")
:init ; (load "~/.emacs.d/everforest-theme/everforest-hard-dark-theme.el")
(require 'doom-themes) ; (load-theme 'everforest-hard-dark t)
)
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(custom-enabled-themes '(doom-gruvbox))
'(custom-safe-themes
'("e3daa8f18440301f3e54f2093fe15f4fe951986a8628e98dcd781efbec7a46f2" "969a67341a68becdccc9101dc87f5071b2767b75c0b199e0ded35bd8359ecd69" default)))
(custom-set-faces (custom-set-faces
;; custom-set-faces was added by Custom. ;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful. ;; If you edit it by hand, you could mess it up, so be careful.
@ -91,6 +84,13 @@
(use-package which-key (use-package which-key
:straight t) :straight t)
(use-package solarized-theme
:straight t
)
(load-theme 'solarized-dark t nil)
#+end_src #+end_src
** UI ** UI
@ -347,10 +347,13 @@
(setq org-agenda-files (setq org-agenda-files
'( '(
"~/GTD/habits.org"
"~/GTD/daily.org" "~/GTD/daily.org"
"~/GTD/tasks.org" "~/GTD/tasks.org"
"~/GTD/inbox.org" "~/GTD/inbox.org"
"~/GTD/done.org"
"~/GTD/projects.org"
"~/GTD/backlog.org"
"~/GTD/calendar.org"
"~/GTD/watchlist.org" "~/GTD/watchlist.org"
"~/GTD/readlist.org" "~/GTD/readlist.org"
)) ))
@ -378,6 +381,13 @@
(sequence "IDEA(I)" "DREAM(D)" "READ(R)" "|" "DONE(d!)" "CANC(k@)") (sequence "IDEA(I)" "DREAM(D)" "READ(R)" "|" "DONE(d!)" "CANC(k@)")
)) ))
(setq org-agenda-custom-commands org-agenda-settings) (setq org-agenda-custom-commands org-agenda-settings)
(setq org-refile-targets
'((("~/GTD/tasks.org") :maxlevel . 2)
(("~/GTD/projects.org") :maxlevel . 2)
(("~/GTD/backlog.org") :maxlevel . 1)
(("~/GTD/done.org") :maxlevel . 1)
))
) )
@ -476,7 +486,7 @@
("sh" "At home🏠" tags-todo "+@home/NEXT" ((org-agenda-overriding-header "At home🏠"))) ("sh" "At home🏠" tags-todo "+@home/NEXT" ((org-agenda-overriding-header "At home🏠")))
("sc" "By a computer 💻" tags-todo "+@computer/NEXT" ((org-agenda-overriding-header "By a computer 💻"))) ("sc" "By a computer 💻" tags-todo "+@computer/NEXT" ((org-agenda-overriding-header "By a computer 💻")))
("ss" "On studies 🏫" tags-todo "+@uni/NEXT" ((org-agenda-overriding-header "On studies 🏫"))) ("ss" "On studies 🏫" tags-todo "+@uni/NEXT" ((org-agenda-overriding-header "On studies 🏫")))
("ss" "In Kwork 🧑 🛋️ " tags-todo "+@kwork/NEXT" ((org-agenda-overriding-header "In Kwork 🧑‍💻 🛋️ "))) ("sK" "In Kwork 🧑 🛋️ " tags-todo "+@kwork/NEXT" ((org-agenda-overriding-header "In Kwork 🧑‍💻 🛋️ ")))
("so" "Online 🌐" tags-todo "+@online/NEXT" ((org-agenda-overriding-header "Online 🌐"))) ("so" "Online 🌐" tags-todo "+@online/NEXT" ((org-agenda-overriding-header "Online 🌐")))
("sO" "Outdoors🚶" tags-todo "+@outdoors/NEXT" ((org-agenda-overriding-header "Outdoors🚶"))) ("sO" "Outdoors🚶" tags-todo "+@outdoors/NEXT" ((org-agenda-overriding-header "Outdoors🚶")))
("sT" "To takeaway 👝 " tags-todo "+takeaway" ((org-agenda-overriding-header "To takeaway 👝 "))) ("sT" "To takeaway 👝 " tags-todo "+takeaway" ((org-agenda-overriding-header "To takeaway 👝 ")))
@ -568,12 +578,24 @@
;; ) ;; )
#+end_src #+end_src
** Org-ref
#+begin_src emacs-lisp
(use-package org-ref
:straight t
)
#+end_src
* Org Download * Org Download
#+begin_src #+begin_src emacs-lisp
(use-package org-download (use-package org-download
:straight t :straight t
:after org :after org
:bind :bind
(:map org-mode-map
(("s-Y" . org-download-screenshot)
("s-y" . org-download-yank)))
:config :config
(setq-default org-download-image-dir "~/Notes/assets") (setq-default org-download-image-dir "~/Notes/assets")
@ -726,10 +748,12 @@
* Org Roam * Org Roam
** Basic ** Basic
#+begin_src emacs-lisp #+begin_src emacs-lisp
(let ((default-directory "~/Notes/"))
(use-package org-roam (use-package org-roam
:straight t :straight (:host github :repo "org-roam/org-roam"
:files (:defaults "extensions/*"))
:custom :custom
(org-roam-directory (file-truename "/home/horhik/Notes/")) (org-roam-directory (file-truename default-folder))
:bind (("C-c n l" . org-roam-buffer-toggle) :bind (("C-c n l" . org-roam-buffer-toggle)
("C-c n f" . org-roam-node-find) ("C-c n f" . org-roam-node-find)
("C-c n g" . org-roam-graph) ("C-c n g" . org-roam-graph)
@ -754,9 +778,10 @@
(require 'org-roam-export) (require 'org-roam-export)
:custom :custom
(setq org-roam-db-location (concat org-roam-directory "/home/horhik/Notes/org-roam.db")) (setq org-roam-db-location "~/Notes/org-roam.db")
(org-roam-directory "~/Notes/") (org-roam-directory "~/Notes")
(org-roam-dailies-directory "~/Notes/journals/") (org-roam-dailies-directory "~/Notes/journals/")
(org-roam-capture-templates (org-roam-capture-templates
'(("d" "default" plain '(("d" "default" plain
"%?" :target "%?" :target
@ -764,19 +789,21 @@
:unnarrowed t))) :unnarrowed t)))
) )
)
#+end_src #+end_src
** Org-roam UI ** Org-roam UI
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package org-roam-ui (use-package org-roam-ui
:straight :straight
(:host github :repo "org-roam/org-roam-ui" :branch "main" :files ("*.el" "out")) (:host github :repo "org-roam/org-roam-ui" :branch "main" :files ("*.el" "out"))
:after org-roam :after org-roam
;; normally we'd recommend hooking orui after org-roam, but since org-roam does not have ;; normally we'd recommend hooking orui after org-roam, but since org-roam does not have
;; a hookable mode anymore, you're advised to pick something yourself ;; a hookable mode anymore, you're advised to pick something yourself
;; if you don't care about startup time, use ;; if you don't care about startup time, use
;; :hook (after-init . org-roam-ui-mode) ;; :hook (after-init . org-roam-ui-mode)
:config :config
(setq org-roam-ui-sync-theme t (setq org-roam-ui-sync-theme t
org-roam-ui-follow t org-roam-ui-follow t
org-roam-ui-update-on-save t org-roam-ui-update-on-save t
@ -800,10 +827,20 @@
"l b" '(list-bookmarks :which-key "List bookmarks") "l b" '(list-bookmarks :which-key "List bookmarks")
"n t a" '(org-roam-tag-add :which-key "Add tag") "n t a" '(org-roam-tag-add :which-key "Add tag")
"n t r" '(org-roam-tag-remove :which-key "Remove tag") "n t r" '(org-roam-tag-remove :which-key "Remove tag")
"n s Y" '(org-download-screenshot :which-key "Download screenshot")
"n s y" '(org-download-yank :which-key "Download yank")
"n s c" '(org-download-clipboard :which-key "Past from clipboard")
) )
#+end_src #+end_src
** Bibtex
#+begin_src emacs-lisp
(use-package org-roam-bibtex
:straight t
:after org-roam
:config
(require 'org-ref)) ; optional: if using Org-ref v2 or v3 citation links
#+end_src
* Projectile * Projectile
** Basic ** Basic
#+begin_src emacs-lisp #+begin_src emacs-lisp
@ -837,83 +874,6 @@
#+end_src #+end_src
* Programming
** LSP
#+begin_src emacs-lisp
(use-package lsp-mode
:straight t
:commands lsp
:custom
;; what to use when checking on-save. "check" is default, I prefer clippy
(lsp-rust-analyzer-cargo-watch-command "clippy")
(lsp-eldoc-render-all t)
(lsp-idle-delay 1.6)
;; enable / disable the hints as you prefer:
(lsp-rust-analyzer-server-display-inlay-hints t)
(lsp-rust-analyzer-display-lifetime-elision-hints-enable "skip_trivial")
(lsp-rust-analyzer-display-chaining-hints t)
(lsp-rust-analyzer-display-lifetime-elision-hints-use-parameter-names nil)
(lsp-rust-analyzer-display-closure-return-type-hints t)
(lsp-rust-analyzer-display-parameter-hints nil)
(lsp-rust-analyzer-display-reborrow-hints nil)
:config
(add-hook 'lsp-mode-hook 'lsp-ui-mode))
(use-package lsp-ui
:straight t
:commands lsp-ui-mode
:custom
;(lsp-ui-peek-always-show t)
;(lsp-ui-sideline-show-hover t)
(lsp-ui-doc-enable nil)
:config
(setq lsp-ui-sideline-enable nil)
(setq lsp-ui-doc-enable t)
)
#+end_src
** Rust
#+begin_src emacs-lisp
(defun rk/rustic-mode-hook ()
;; so that run C-c C-c C-r works without having to confirm, but don't try to/
;; save rust buffers that are not file visiting. Once
;; https://github.com/brotzeit/rustic/issues/253 has been resolved this should
;; no longer be necessary.
(when buffer-file-name
(setq-local buffer-save-without-query t)))
(use-package rustic
:straight t
:bind (:map rustic-mode-map
("M-j" . lsp-ui-imenu)
("M-?" . lsp-find-references)
("C-c C-c l" . flycheck-list-errors)
("C-c C-c a" . lsp-execute-code-action)
("C-c C-c r" . lsp-rename)
("C-c C-c q" . lsp-workspace-restart)
("C-c C-c Q" . lsp-workspace-shutdown)
("C-c C-c s" . lsp-rust-analyzer-status))
:config
;; uncomment for less flashiness
;; (setq lsp-eldoc-hook nil)
;; (setq lsp-enable-symbol-highlighting nil)
;; (setq lsp-signature-auto-activate nil)
;; comment to disable rustfmt on save
(setq rustic-format-on-save t)
;(setq lsp-rust-analyzer-server-display-inlay-hints t)
(add-hook 'rustic-mode-hook 'rk/rustic-mode-hook))
#+end_src
** Flycheck
#+begin_src emacs-lisp
(use-package flycheck :straight t)
#+end_src
* LaTeX Ninja 🥷 * LaTeX Ninja 🥷
** Basic ** Basic
#+begin_src emacs-lisp #+begin_src emacs-lisp
@ -1037,9 +997,179 @@
https://github.com/emacs-eaf/emacs-application-framework https://github.com/emacs-eaf/emacs-application-framework
#+begin_src emacs-lisp #+begin_src emacs-lisp
(add-to-list 'load-path "~/.emacs.d/site-lisp/emacs-application-framework/") ; (add-to-list 'load-path "~/.emacs.d/site-lisp/emacs-application-framework/")
(use-package eaf
:straight (eaf
:type git
:host github
:repo "emacs-eaf/emacs-application-framework"
:files ("*.el" "*.py" "core" "app" "*.json")
:includes (eaf-pdf-viewer eaf-browser eaf-music-player eaf-image-viewer eaf-org-previewer eaf-markdown-previewer) ; Straight won't try to search for these packages when we make further use-package invocations for them
:pre-build (("python" "install-eaf.py" "--install" "pdf-viewer" "browser" "music-player" "image-viewer" "org-previewer" "markdown-previewer" "evil" "--ignore-sys-deps"))
)
:init (evil-set-initial-state 'eaf-mode 'emacs)) ; Evil mode doesn't work well with eaf keybindings.
:config
;(eaf-wm-focus-fix-wms "i3")
;; unbind, see more in the Wiki
(use-package eaf-browser
:custom
(eaf-browser-continue-where-left-off t)
(eaf-browser-enable-adblocker t))
(use-package eaf-pdf-viewer)
(use-package eaf-music-player)
(use-package eaf-image-viewer)
(use-package eaf-org-previewer)
(use-package eaf-markdown-previewer)
;(setq spacemacs-cmds)
(require 'eaf) (require 'eaf)
(require 'eaf-browser) (eaf-bind-key insert_or_select_left_tab "nil" eaf-browser-keybinding)
(require 'eaf-pdf-viewer)
(require 'eaf-music-player)
#+end_src #+end_src
* Krita
#+begin_src emacs-lisp
(use-package org-krita
:straight (org-krita
:type git
:host github
:repo "lepisma/org-krita"
:files ("*.el" "*.py" "core" "app" "*.json"))
:config
(add-hook 'org-mode-hook 'org-krita-mode))
#+end_src
* Habitica
#+begin_src emacs-lisp
(use-package habitica
:straight t
:config
(setq habitica-uid "0027ca78-392a-43ba-8450-d51f6be57b09")
(setq habitica-token "b3b28a7e-3ee8-4c21-8222-c8f8060c6d66")
)
#+end_src
* Programming
** LSP
#+begin_src emacs-lisp
(use-package lsp-mode
:straight t
:commands lsp
:custom
;; what to use when checking on-save. "check" is default, I prefer clippy
(lsp-rust-analyzer-cargo-watch-command "clippy")
(lsp-eldoc-render-all t)
(lsp-idle-delay 1.6)
;; enable / disable the hints as you prefer:
(lsp-rust-analyzer-server-display-inlay-hints t)
(lsp-rust-analyzer-display-lifetime-elision-hints-enable "skip_trivial")
(lsp-rust-analyzer-display-chaining-hints t)
(lsp-rust-analyzer-display-lifetime-elision-hints-use-parameter-names nil)
(lsp-rust-analyzer-display-closure-return-type-hints t)
(lsp-rust-analyzer-display-parameter-hints nil)
(lsp-rust-analyzer-display-reborrow-hints nil)
:config
(add-hook 'lsp-mode-hook 'lsp-ui-mode))
(use-package lsp-ui
:straight t
:commands lsp-ui-mode
:custom
;(lsp-ui-peek-always-show t)
;(lsp-ui-sideline-show-hover t)
(lsp-ui-doc-enable nil)
:config
(setq lsp-ui-sideline-enable nil)
(setq lsp-ui-doc-enable t)
)
#+end_src
** Rust
#+begin_src emacs-lisp
(defun rk/rustic-mode-hook ()
;; so that run C-c C-c C-r works without having to confirm, but don't try to/
;; save rust buffers that are not file visiting. Once
;; https://github.com/brotzeit/rustic/issues/253 has been resolved this should
;; no longer be necessary.
(when buffer-file-name
(setq-local buffer-save-without-query t)))
(use-package rustic
:straight t
:bind (:map rustic-mode-map
("M-j" . lsp-ui-imenu)
("M-?" . lsp-find-references)
("C-c C-c l" . flycheck-list-errors)
("C-c C-c a" . lsp-execute-code-action)
("C-c C-c r" . lsp-rename)
("C-c C-c q" . lsp-workspace-restart)
("C-c C-c Q" . lsp-workspace-shutdown)
("C-c C-c s" . lsp-rust-analyzer-status))
:config
;; uncomment for less flashiness
;; (setq lsp-eldoc-hook nil)
;; (setq lsp-enable-symbol-highlighting nil)
;; (setq lsp-signature-auto-activate nil)
;; comment to disable rustfmt on save
(setq rustic-format-on-save t)
;(setq lsp-rust-analyzer-server-display-inlay-hints t)
(add-hook 'rustic-mode-hook 'rk/rustic-mode-hook))
#+end_src
** Flycheck
#+begin_src emacs-lisp
(use-package flycheck :straight t)
#+end_src
** TypeScript
#+begin_src emacs-lisp
(require 'lsp-mode)
(add-hook 'typescript-mode-hook 'lsp-deferred)
(add-hook 'javascript-mode-hook 'lsp-deferred)
(use-package typescript-mode
:straight t
)
#+end_src
** Rust
** C++
#+begin_src emacs-lisp
(which-key-mode)
(add-hook 'c-mode-hook 'lsp)
(add-hook 'c++-mode-hook 'lsp)
#+end_src
** Haskell
#+begin_src emacs-lisp
(use-package haskell-mode
:straight t
)
#+end_src
* Music
** Tidal Cycles
#+begin_src emacs-lisp
(add-to-list 'load-path "~/.emacs.d/tidal")
(require 'haskell-mode)
(require 'tidal)
#+end_src
* Scripts
#+begin_src emacs-lisp
(defun increment-number-at-point ()
(interactive)
(skip-chars-backward "0-9")
(or (looking-at "[0-9]+")
(error "No number at point"))
(replace-match (number-to-string (1+ (string-to-number (match-string 0))))))
(global-set-key (kbd "C-c +") 'increment-number-at-point)
#+end_src

View file

@ -29,21 +29,15 @@
(setq straight-use-package-by-default t) (setq straight-use-package-by-default t)
(setq package-enable-at-startup nil) (setq package-enable-at-startup nil)
(straight-use-package 'doom-themes ; (add-to-list 'custom-theme-load-path "~/.emacs.d/everforest-theme")
:init ; (load "~/.emacs.d/everforest-theme/everforest-hard-dark-theme.el")
(require 'doom-themes) ; (load-theme 'everforest-hard-dark t)
)
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance. (custom-set-faces
;; If there is more than one, they won't work right.
'(custom-enabled-themes '(doom-gruvbox))
'(custom-safe-themes
'("e3daa8f18440301f3e54f2093fe15f4fe951986a8628e98dcd781efbec7a46f2" "969a67341a68becdccc9101dc87f5071b2767b75c0b199e0ded35bd8359ecd69" default)))
(custom-set-faces
;; custom-set-faces was added by Custom. ;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful. ;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance. ;; Your init file should contain only one such instance.
@ -66,6 +60,12 @@
(use-package which-key (use-package which-key
:straight t) :straight t)
(use-package solarized-theme
:straight t
)
(load-theme 'solarized-dark t nil)
;(column-number-mode) ;(column-number-mode)
(global-display-line-numbers-mode 0) (global-display-line-numbers-mode 0)
(dolist (mode '(org-mode-hook (dolist (mode '(org-mode-hook
@ -271,10 +271,13 @@
(setq org-agenda-files (setq org-agenda-files
'( '(
"~/GTD/habits.org"
"~/GTD/daily.org" "~/GTD/daily.org"
"~/GTD/tasks.org" "~/GTD/tasks.org"
"~/GTD/inbox.org" "~/GTD/inbox.org"
"~/GTD/done.org"
"~/GTD/projects.org"
"~/GTD/backlog.org"
"~/GTD/calendar.org"
"~/GTD/watchlist.org" "~/GTD/watchlist.org"
"~/GTD/readlist.org" "~/GTD/readlist.org"
)) ))
@ -302,6 +305,13 @@
(sequence "IDEA(I)" "DREAM(D)" "READ(R)" "|" "DONE(d!)" "CANC(k@)") (sequence "IDEA(I)" "DREAM(D)" "READ(R)" "|" "DONE(d!)" "CANC(k@)")
)) ))
(setq org-agenda-custom-commands org-agenda-settings) (setq org-agenda-custom-commands org-agenda-settings)
(setq org-refile-targets
'((("~/GTD/tasks.org") :maxlevel . 2)
(("~/GTD/projects.org") :maxlevel . 2)
(("~/GTD/backlog.org") :maxlevel . 1)
(("~/GTD/done.org") :maxlevel . 1)
))
) )
@ -315,7 +325,7 @@
(end-of-line) (end-of-line)
(insert (number-to-string count)))) (insert (number-to-string count))))
(forward-line 1))) (forward-line 1)))
(add-hook 'org-agenda-finalize-hook 'org-habit-streak-count) (add-hook 'org-agenda-finalize-hook 'org-habit-streak-count)
(use-package org-bullets (use-package org-bullets
:after (org) :after (org)
@ -392,7 +402,7 @@
("sh" "At home🏠" tags-todo "+@home/NEXT" ((org-agenda-overriding-header "At home🏠"))) ("sh" "At home🏠" tags-todo "+@home/NEXT" ((org-agenda-overriding-header "At home🏠")))
("sc" "By a computer 💻" tags-todo "+@computer/NEXT" ((org-agenda-overriding-header "By a computer 💻"))) ("sc" "By a computer 💻" tags-todo "+@computer/NEXT" ((org-agenda-overriding-header "By a computer 💻")))
("ss" "On studies 🏫" tags-todo "+@uni/NEXT" ((org-agenda-overriding-header "On studies 🏫"))) ("ss" "On studies 🏫" tags-todo "+@uni/NEXT" ((org-agenda-overriding-header "On studies 🏫")))
("ss" "In Kwork 🧑 🛋️ " tags-todo "+@kwork/NEXT" ((org-agenda-overriding-header "In Kwork 🧑‍💻 🛋️ "))) ("sK" "In Kwork 🧑 🛋️ " tags-todo "+@kwork/NEXT" ((org-agenda-overriding-header "In Kwork 🧑‍💻 🛋️ ")))
("so" "Online 🌐" tags-todo "+@online/NEXT" ((org-agenda-overriding-header "Online 🌐"))) ("so" "Online 🌐" tags-todo "+@online/NEXT" ((org-agenda-overriding-header "Online 🌐")))
("sO" "Outdoors🚶" tags-todo "+@outdoors/NEXT" ((org-agenda-overriding-header "Outdoors🚶"))) ("sO" "Outdoors🚶" tags-todo "+@outdoors/NEXT" ((org-agenda-overriding-header "Outdoors🚶")))
("sT" "To takeaway 👝 " tags-todo "+takeaway" ((org-agenda-overriding-header "To takeaway 👝 "))) ("sT" "To takeaway 👝 " tags-todo "+takeaway" ((org-agenda-overriding-header "To takeaway 👝 ")))
@ -461,6 +471,31 @@
;; (require 'calfw-org) ;; (require 'calfw-org)
;; ) ;; )
(use-package org-ref
:straight t
)
(use-package org-download
:straight t
:after org
:bind
(:map org-mode-map
(("s-Y" . org-download-screenshot)
("s-y" . org-download-yank)))
:config
(setq-default org-download-image-dir "~/Notes/assets")
)
(general-define-key
:keymaps '(normal insert emacs)
:prefix "SPC"
:global-prefix "C-SPC"
:non-normal-prefix "M-SPC"
"n s Y" '(org-download-screenshot :which-key "Download screenshot")
"n s y" '(org-download-yank :which-key "Download yank")
)
(use-package ivy (use-package ivy
:straight t :straight t
:diminish :diminish
@ -581,10 +616,12 @@
'("~/.emacs.d/snippets" ;; personal snippets '("~/.emacs.d/snippets" ;; personal snippets
)) ))
(use-package org-roam (let ((default-directory "~/Notes/"))
:straight t (use-package org-roam
:straight (:host github :repo "org-roam/org-roam"
:files (:defaults "extensions/*"))
:custom :custom
(org-roam-directory (file-truename "/home/horhik/Notes/")) (org-roam-directory (file-truename default-folder))
:bind (("C-c n l" . org-roam-buffer-toggle) :bind (("C-c n l" . org-roam-buffer-toggle)
("C-c n f" . org-roam-node-find) ("C-c n f" . org-roam-node-find)
("C-c n g" . org-roam-graph) ("C-c n g" . org-roam-graph)
@ -609,9 +646,10 @@
(require 'org-roam-export) (require 'org-roam-export)
:custom :custom
(setq org-roam-db-location (concat org-roam-directory "/home/horhik/Notes/org-roam.db")) (setq org-roam-db-location "~/Notes/org-roam.db")
(org-roam-directory "~/Notes/") (org-roam-directory "~/Notes")
(org-roam-dailies-directory "~/Notes/journals/") (org-roam-dailies-directory "~/Notes/journals/")
(org-roam-capture-templates (org-roam-capture-templates
'(("d" "default" plain '(("d" "default" plain
"%?" :target "%?" :target
@ -619,6 +657,7 @@
:unnarrowed t))) :unnarrowed t)))
) )
)
(use-package org-roam-ui (use-package org-roam-ui
:straight :straight
@ -627,8 +666,9 @@
;; normally we'd recommend hooking orui after org-roam, but since org-roam does not have ;; normally we'd recommend hooking orui after org-roam, but since org-roam does not have
;; a hookable mode anymore, you're advised to pick something yourself ;; a hookable mode anymore, you're advised to pick something yourself
;; if you don't care about startup time, use ;; if you don't care about startup time, use
;; :hook (after-init . org-roam-ui-mode) ;; :hook (after-init . org-roam-ui-mode)
:config :config
(setq org-roam-ui-sync-theme t (setq org-roam-ui-sync-theme t
org-roam-ui-follow t org-roam-ui-follow t
org-roam-ui-update-on-save t org-roam-ui-update-on-save t
@ -650,9 +690,18 @@
"l b" '(list-bookmarks :which-key "List bookmarks") "l b" '(list-bookmarks :which-key "List bookmarks")
"n t a" '(org-roam-tag-add :which-key "Add tag") "n t a" '(org-roam-tag-add :which-key "Add tag")
"n t r" '(org-roam-tag-remove :which-key "Remove tag") "n t r" '(org-roam-tag-remove :which-key "Remove tag")
"n s Y" '(org-download-screenshot :which-key "Download screenshot")
"n s y" '(org-download-yank :which-key "Download yank")
"n s c" '(org-download-clipboard :which-key "Past from clipboard")
) )
(use-package org-roam-bibtex
:straight t
:after org-roam
:config
(require 'org-ref)) ; optional: if using Org-ref v2 or v3 citation links
(use-package projectile (use-package projectile
:straight t :straight t
:diminish projectile-mode :diminish projectile-mode
@ -676,70 +725,6 @@
(magit-display-buffer-function #'magit-display-buffer-same-window-except-diff-v1) (magit-display-buffer-function #'magit-display-buffer-same-window-except-diff-v1)
) )
(use-package lsp-mode
:straight t
:commands lsp
:custom
;; what to use when checking on-save. "check" is default, I prefer clippy
(lsp-rust-analyzer-cargo-watch-command "clippy")
(lsp-eldoc-render-all t)
(lsp-idle-delay 1.6)
;; enable / disable the hints as you prefer:
(lsp-rust-analyzer-server-display-inlay-hints t)
(lsp-rust-analyzer-display-lifetime-elision-hints-enable "skip_trivial")
(lsp-rust-analyzer-display-chaining-hints t)
(lsp-rust-analyzer-display-lifetime-elision-hints-use-parameter-names nil)
(lsp-rust-analyzer-display-closure-return-type-hints t)
(lsp-rust-analyzer-display-parameter-hints nil)
(lsp-rust-analyzer-display-reborrow-hints nil)
:config
(add-hook 'lsp-mode-hook 'lsp-ui-mode))
(use-package lsp-ui
:straight t
:commands lsp-ui-mode
:custom
;(lsp-ui-peek-always-show t)
;(lsp-ui-sideline-show-hover t)
(lsp-ui-doc-enable nil)
:config
(setq lsp-ui-sideline-enable nil)
(setq lsp-ui-doc-enable t)
)
(defun rk/rustic-mode-hook ()
;; so that run C-c C-c C-r works without having to confirm, but don't try to/
;; save rust buffers that are not file visiting. Once
;; https://github.com/brotzeit/rustic/issues/253 has been resolved this should
;; no longer be necessary.
(when buffer-file-name
(setq-local buffer-save-without-query t)))
(use-package rustic
:straight t
:bind (:map rustic-mode-map
("M-j" . lsp-ui-imenu)
("M-?" . lsp-find-references)
("C-c C-c l" . flycheck-list-errors)
("C-c C-c a" . lsp-execute-code-action)
("C-c C-c r" . lsp-rename)
("C-c C-c q" . lsp-workspace-restart)
("C-c C-c Q" . lsp-workspace-shutdown)
("C-c C-c s" . lsp-rust-analyzer-status))
:config
;; uncomment for less flashiness
;; (setq lsp-eldoc-hook nil)
;; (setq lsp-enable-symbol-highlighting nil)
;; (setq lsp-signature-auto-activate nil)
;; comment to disable rustfmt on save
(setq rustic-format-on-save t)
;(setq lsp-rust-analyzer-server-display-inlay-hints t)
(add-hook 'rustic-mode-hook 'rk/rustic-mode-hook))
(use-package flycheck :straight t)
(use-package cdlatex (use-package cdlatex
:straight t :straight t
:after org :after org
@ -832,8 +817,154 @@ buffer's text scale."
"mplayer" "-slave" "-quiet" "-really-quiet" "-fullscreen") "mplayer" "-slave" "-quiet" "-really-quiet" "-fullscreen")
) )
(add-to-list 'load-path "~/.emacs.d/site-lisp/emacs-application-framework/") ; (add-to-list 'load-path "~/.emacs.d/site-lisp/emacs-application-framework/")
(use-package eaf
:straight (eaf
:type git
:host github
:repo "emacs-eaf/emacs-application-framework"
:files ("*.el" "*.py" "core" "app" "*.json")
:includes (eaf-pdf-viewer eaf-browser eaf-music-player eaf-image-viewer eaf-org-previewer eaf-markdown-previewer) ; Straight won't try to search for these packages when we make further use-package invocations for them
:pre-build (("python" "install-eaf.py" "--install" "pdf-viewer" "browser" "music-player" "image-viewer" "org-previewer" "markdown-previewer" "evil" "--ignore-sys-deps"))
)
:init (evil-set-initial-state 'eaf-mode 'emacs)) ; Evil mode doesn't work well with eaf keybindings.
:config
;(eaf-wm-focus-fix-wms "i3")
;; unbind, see more in the Wiki
(use-package eaf-browser
:custom
(eaf-browser-continue-where-left-off t)
(eaf-browser-enable-adblocker t))
(use-package eaf-pdf-viewer)
(use-package eaf-music-player)
(use-package eaf-image-viewer)
(use-package eaf-org-previewer)
(use-package eaf-markdown-previewer)
;(setq spacemacs-cmds)
(require 'eaf) (require 'eaf)
(require 'eaf-browser) (eaf-bind-key insert_or_select_left_tab "nil" eaf-browser-keybinding)
(require 'eaf-pdf-viewer)
(require 'eaf-music-player) (use-package org-krita
:straight (org-krita
:type git
:host github
:repo "lepisma/org-krita"
:files ("*.el" "*.py" "core" "app" "*.json"))
:config
(add-hook 'org-mode-hook 'org-krita-mode))
(use-package habitica
:straight t
:config
(setq habitica-uid "0027ca78-392a-43ba-8450-d51f6be57b09")
(setq habitica-token "b3b28a7e-3ee8-4c21-8222-c8f8060c6d66")
)
(use-package lsp-mode
:straight t
:commands lsp
:custom
;; what to use when checking on-save. "check" is default, I prefer clippy
(lsp-rust-analyzer-cargo-watch-command "clippy")
(lsp-eldoc-render-all t)
(lsp-idle-delay 1.6)
;; enable / disable the hints as you prefer:
(lsp-rust-analyzer-server-display-inlay-hints t)
(lsp-rust-analyzer-display-lifetime-elision-hints-enable "skip_trivial")
(lsp-rust-analyzer-display-chaining-hints t)
(lsp-rust-analyzer-display-lifetime-elision-hints-use-parameter-names nil)
(lsp-rust-analyzer-display-closure-return-type-hints t)
(lsp-rust-analyzer-display-parameter-hints nil)
(lsp-rust-analyzer-display-reborrow-hints nil)
:config
(add-hook 'lsp-mode-hook 'lsp-ui-mode))
(use-package lsp-ui
:straight t
:commands lsp-ui-mode
:custom
;(lsp-ui-peek-always-show t)
;(lsp-ui-sideline-show-hover t)
(lsp-ui-doc-enable nil)
:config
(setq lsp-ui-sideline-enable nil)
(setq lsp-ui-doc-enable t)
)
(defun rk/rustic-mode-hook ()
;; so that run C-c C-c C-r works without having to confirm, but don't try to/
;; save rust buffers that are not file visiting. Once
;; https://github.com/brotzeit/rustic/issues/253 has been resolved this should
;; no longer be necessary.
(when buffer-file-name
(setq-local buffer-save-without-query t)))
(use-package rustic
:straight t
:bind (:map rustic-mode-map
("M-j" . lsp-ui-imenu)
("M-?" . lsp-find-references)
("C-c C-c l" . flycheck-list-errors)
("C-c C-c a" . lsp-execute-code-action)
("C-c C-c r" . lsp-rename)
("C-c C-c q" . lsp-workspace-restart)
("C-c C-c Q" . lsp-workspace-shutdown)
("C-c C-c s" . lsp-rust-analyzer-status))
:config
;; uncomment for less flashiness
;; (setq lsp-eldoc-hook nil)
;; (setq lsp-enable-symbol-highlighting nil)
;; (setq lsp-signature-auto-activate nil)
;; comment to disable rustfmt on save
(setq rustic-format-on-save t)
;(setq lsp-rust-analyzer-server-display-inlay-hints t)
(add-hook 'rustic-mode-hook 'rk/rustic-mode-hook))
(use-package flycheck :straight t)
(require 'lsp-mode)
(add-hook 'typescript-mode-hook 'lsp-deferred)
(add-hook 'javascript-mode-hook 'lsp-deferred)
(use-package typescript-mode
:straight t
)
(which-key-mode)
(add-hook 'c-mode-hook 'lsp)
(add-hook 'c++-mode-hook 'lsp)
(use-package haskell-mode
:straight t
)
(add-to-list 'load-path "~/.emacs.d/tidal")
(require 'haskell-mode)
(require 'tidal)
(defun increment-number-at-point ()
(interactive)
(skip-chars-backward "0-9")
(or (looking-at "[0-9]+")
(error "No number at point"))
(replace-match (number-to-string (1+ (string-to-number (match-string 0))))))
(global-set-key (kbd "C-c +") 'increment-number-at-point)
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(org-agenda-files
'("/home/horhik/GTD/daily.org" "/home/horhik/GTD/tasks.org" "/home/horhik/GTD/inbox.org" "/home/horhik/GTD/done.org" "/home/horhik/GTD/projects.org" "/home/horhik/GTD/backlog.org" "/home/horhik/GTD/watchlist.org" "/home/horhik/GTD/readlist.org")))