Fix end of line behaviour

This commit is contained in:
Willem van den Ende
2023-02-06 10:55:50 +00:00
parent 44bb98e781
commit 1f79ce374f
3 changed files with 31 additions and 8 deletions
+22 -6
View File
@@ -205,11 +205,9 @@
(magit) (remove-hook 'magit-post-refresh-hook 'diff-hl-magit-post-refresh))
;; from hlissner https://github.com/hlissner/.doom.d/blob/2529bcd46c5aad0cbe796793e5c08e1faf5ba272/config.el#L59-L65
;; disable auto-complete
(after! company
(setq company-idle-delay nil))
(after! company (setq company-idle-delay nil))
;; HACK show small snippets for backlinks preview in roam-buffer
;; there is currently a problem in org-mode that shows an error
;; org-element--cache: Unregistered buffer modifications detected. Resetting. but this also happens without this function, it appears to be an interaction between org-roam and changes in orgmode.
@@ -222,8 +220,13 @@
(org-element-property :begin parent)
(org-element-property :end parent)))))
(setq org-roam-preview-function #'qwan/brief-preview)
;; evil mode settings for frictionless editing
;; cursor moved back to ?beginning of line? too often
;; https://evil.readthedocs.io/en/latest/settings.html under 'cursor movement'
;; Not setting these two leads to missing space when adding links with org-roam.
;; white-space at EOL is removed automatically by something else so does not bother us here.
(setq evil-move-cursor-back nil)
(setq evil-move-cursor-beyond-eol t)
;; to enable multiple org-roam dirs
;; https://github.com/org-roam/org-roam/issues/1527
(setq-default enable-local-variables t)
@@ -302,6 +305,16 @@ the description. This may destroy existing links, or change their targets so use
(qwan/relative-path-to-attachments buffer-file-name))))
(kill-new markdown-link)
(message "Copied %s" markdown-link)))
(defun qwan/copy-filename ()
"Push the file name of the currently visited buffer to the kill ring."
(interactive)
(unless buffer-file-name
(error "The current buffer doesn't visit a file"))
(kill-new buffer-file-name)
(message "Copied %s" buffer-file-name))
(defun qwan/relative-path-to-attachments (full-path)
(substring full-path (string-search "/attachments" full-path 0)))
(require 'ert)
@@ -390,6 +403,9 @@ the description. This may destroy existing links, or change their targets so use
(require 'my-org-roam)
;; org-roam v1 port to v2, insert node without opening buffer
(map! :leader
:desc "Insert node immediate, don't open buffer on new node"
"n r I" #'org-roam-node-insert-immediate)
(map!
:leader
:desc
"Insert node immediate, don't open buffer on new node"
"n r I"
#'org-roam-node-insert-immediate)
+6
View File
@@ -14,6 +14,12 @@
. 0)
(("#2b3d48" "#46D9FF" "brightcyan")
. 20)))
'(ignored-local-variable-values
'((eval setq-local org-roam-db-location
(expand-file-name "org-roam.db" org-roam-directory))
(eval setq-local org-roam-directory
(expand-file-name
(locate-dominating-file default-directory ".dir-locals.el")))))
'(jdee-db-active-breakpoint-face-colors (cons "#1B2229" "#51afef"))
'(jdee-db-requested-breakpoint-face-colors (cons "#1B2229" "#98be65"))
'(jdee-db-spec-breakpoint-face-colors (cons "#1B2229" "#3f444a"))
@@ -5,7 +5,8 @@
<aside>
<h3>${1:title}</h3>
<p>${2:description}
<p><div>
<p></p>
<div>
<a href="/training">${3:action}</a>
</div></p>
</div>
</aside>