Compare commits
3
Commits
29300127fc
...
f95833ae75
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f95833ae75 | ||
|
|
3d206cdbca | ||
|
|
5e56d995b4 |
+40
-20
@@ -60,6 +60,8 @@
|
|||||||
- [[#dashboard-functions][Dashboard Functions]]
|
- [[#dashboard-functions][Dashboard Functions]]
|
||||||
- [[#lsp-functions][LSP Functions]]
|
- [[#lsp-functions][LSP Functions]]
|
||||||
- [[#neotree-functions][Neotree Functions]]
|
- [[#neotree-functions][Neotree Functions]]
|
||||||
|
- [[#org-functions][Org Functions]]
|
||||||
|
- [[#selectrum-functions][Selectrum Functions]]
|
||||||
- [[#which-key-functions][Which-Key Functions]]
|
- [[#which-key-functions][Which-Key Functions]]
|
||||||
- [[#advice-and-aliases][Advice and Aliases]]
|
- [[#advice-and-aliases][Advice and Aliases]]
|
||||||
- [[#advice][Advice]]
|
- [[#advice][Advice]]
|
||||||
@@ -381,10 +383,9 @@ Setup =org-roam=.
|
|||||||
(setq org-roam-completion-system 'default)
|
(setq org-roam-completion-system 'default)
|
||||||
(setq org-roam-db-location (expand-file-name "org-roam.db" dot-cache-dir))
|
(setq org-roam-db-location (expand-file-name "org-roam.db" dot-cache-dir))
|
||||||
(setq org-roam-directory (expand-file-name "./" org-directory))
|
(setq org-roam-directory (expand-file-name "./" org-directory))
|
||||||
;; Exclude Syncthing versions backup directory
|
;; Exclude Syncthing backup directory
|
||||||
(setq org-roam-file-exclude-regexp "\\.stversions")
|
(setq org-roam-file-exclude-regexp "\\.stversions")
|
||||||
(setq org-roam-verbose nil)
|
(setq org-roam-verbose nil))
|
||||||
(org-roam-mode))
|
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
Enable [[https://www.orgroam.com/manual/Roam-Protocol.html#Roam-Protocol][Roam-Protocol]], needed to process =org-protocol://= links
|
Enable [[https://www.orgroam.com/manual/Roam-Protocol.html#Roam-Protocol][Roam-Protocol]], needed to process =org-protocol://= links
|
||||||
@@ -998,19 +999,6 @@ Functions that only use built-in Emacs functionality.
|
|||||||
(insert (make-string diff ?\ ))
|
(insert (make-string diff ?\ ))
|
||||||
(user-error "Column should be higher than point")))))
|
(user-error "Column should be higher than point")))))
|
||||||
|
|
||||||
(defun dot/org-ret-at-point ()
|
|
||||||
"Org return key at point.
|
|
||||||
|
|
||||||
If point is on:
|
|
||||||
link -- follow it
|
|
||||||
otherwise -- run the default (evil-ret) expression"
|
|
||||||
(interactive)
|
|
||||||
(let ((type (org-element-type (org-element-context))))
|
|
||||||
(pcase type
|
|
||||||
('link (if org-return-follows-link (org-open-at-point) (evil-ret)))
|
|
||||||
(_ (evil-ret))
|
|
||||||
)))
|
|
||||||
|
|
||||||
(defun dot/reload-theme ()
|
(defun dot/reload-theme ()
|
||||||
"Reload custom theme."
|
"Reload custom theme."
|
||||||
(interactive)
|
(interactive)
|
||||||
@@ -1205,7 +1193,6 @@ Fix keybinds..
|
|||||||
*** Neotree Functions
|
*** Neotree Functions
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
|
|
||||||
(defun neotree-toggle-in-project-root ()
|
(defun neotree-toggle-in-project-root ()
|
||||||
"Toggle Neotree in project root."
|
"Toggle Neotree in project root."
|
||||||
(interactive)
|
(interactive)
|
||||||
@@ -1213,6 +1200,36 @@ Fix keybinds..
|
|||||||
(call-interactively #'neotree-toggle)))
|
(call-interactively #'neotree-toggle)))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
|
*** Org Functions
|
||||||
|
|
||||||
|
#+BEGIN_SRC emacs-lisp
|
||||||
|
(defun dot/org-ret-at-point ()
|
||||||
|
"Org return key at point.
|
||||||
|
|
||||||
|
If point is on:
|
||||||
|
link -- follow it
|
||||||
|
otherwise -- run the default (evil-ret) expression"
|
||||||
|
(interactive)
|
||||||
|
(let ((type (org-element-type (org-element-context))))
|
||||||
|
(pcase type
|
||||||
|
('link (if org-return-follows-link (org-open-at-point) (evil-ret)))
|
||||||
|
(_ (evil-ret))
|
||||||
|
)))
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
|
*** Selectrum Functions
|
||||||
|
|
||||||
|
#+BEGIN_SRC emacs-lisp
|
||||||
|
(defun dot/selectrum-backspace ()
|
||||||
|
"In Selectrum file completion, backward kill sexp, delete char otherwise."
|
||||||
|
(interactive)
|
||||||
|
(if (and selectrum-active-p
|
||||||
|
minibuffer-completing-file-name)
|
||||||
|
(evil-with-state 'insert
|
||||||
|
(move-end-of-line 1) (backward-kill-sexp 1))
|
||||||
|
(evil-delete-backward-char-and-join 1)))
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
*** Which-Key Functions
|
*** Which-Key Functions
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
@@ -1402,7 +1419,9 @@ Set custom keybinds to functionality of custom packages.
|
|||||||
"M-h" #'abort-recursive-edit
|
"M-h" #'abort-recursive-edit
|
||||||
"M-j" #'selectrum-next-candidate
|
"M-j" #'selectrum-next-candidate
|
||||||
"M-k" #'selectrum-previous-candidate
|
"M-k" #'selectrum-previous-candidate
|
||||||
"M-l" #'selectrum-select-current-candidate)
|
"M-l" #'selectrum-select-current-candidate
|
||||||
|
"<backspace>" #'dot/selectrum-backspace
|
||||||
|
"<S-backspace>" #'evil-delete-backward-char-and-join)
|
||||||
|
|
||||||
; Overwrite evil keymaps
|
; Overwrite evil keymaps
|
||||||
;(evil-global-set-key 'motion (kbd "C-w") 'kill-this-buffer)
|
;(evil-global-set-key 'motion (kbd "C-w") 'kill-this-buffer)
|
||||||
@@ -1468,10 +1487,11 @@ Set custom keybinds to functionality of custom packages.
|
|||||||
|
|
||||||
;; Minibuffer
|
;; Minibuffer
|
||||||
(general-def 'normal minibuffer-local-map
|
(general-def 'normal minibuffer-local-map
|
||||||
"<up>" #'selectrum-previous-candidate
|
"TAB" #'selectrum-insert-current-candidate
|
||||||
"<down>" #'selectrum-next-candidate
|
|
||||||
"j" #'selectrum-next-candidate
|
"j" #'selectrum-next-candidate
|
||||||
"k" #'selectrum-previous-candidate
|
"k" #'selectrum-previous-candidate
|
||||||
|
"<up>" #'selectrum-previous-candidate
|
||||||
|
"<down>" #'selectrum-next-candidate
|
||||||
)
|
)
|
||||||
|
|
||||||
;; Neotree
|
;; Neotree
|
||||||
|
|||||||
@@ -0,0 +1,3 @@
|
|||||||
|
XORG_USER='rick'
|
||||||
|
|
||||||
|
[ "$USER" = "$XORG_USER" ] && [ "$(tty)" = "/dev/tty1" ] && exec xinit -- vt1 > /dev/null 2>&1
|
||||||
@@ -87,7 +87,3 @@ EXPORTS=$(sed -nE \
|
|||||||
echo "$EXPORTS" | while read -r line; do
|
echo "$EXPORTS" | while read -r line; do
|
||||||
export $line
|
export $line
|
||||||
done
|
done
|
||||||
|
|
||||||
## Login
|
|
||||||
|
|
||||||
[ "$USER" = "rick" ] && [ "$(tty)" = "/dev/tty1" ] && exec xinit -- vt1 > /dev/null 2>&1
|
|
||||||
|
|||||||
Reference in New Issue
Block a user