chore: stylefix
This commit is contained in:
parent
3f93a19d4b
commit
a79987f30f
1 changed files with 93 additions and 94 deletions
187
config.org
187
config.org
|
|
@ -182,8 +182,8 @@ Inspired by [[https://github.com/LionyxML/emacs-solo][emacs-solo]]:
|
||||||
(interactive)
|
(interactive)
|
||||||
(when isearch-other-end
|
(when isearch-other-end
|
||||||
(let ((selection (buffer-substring-no-properties isearch-other-end (point))))
|
(let ((selection (buffer-substring-no-properties isearch-other-end (point))))
|
||||||
(kill-new selection)
|
(kill-new selection)
|
||||||
(isearch-exit))))
|
(isearch-exit))))
|
||||||
|
|
||||||
;; Bind `M-w` in isearch to copy the selected word, so M-s M-. M-w
|
;; Bind `M-w` in isearch to copy the selected word, so M-s M-. M-w
|
||||||
;; does a great job of 'copying the current word under cursor'.
|
;; does a great job of 'copying the current word under cursor'.
|
||||||
|
|
@ -338,58 +338,58 @@ C-c C-c to apply."
|
||||||
(use-package consult
|
(use-package consult
|
||||||
;; Replace bindings. Lazily loaded by `use-package'.
|
;; Replace bindings. Lazily loaded by `use-package'.
|
||||||
:bind (;; C-c bindings in `mode-specific-map'
|
:bind (;; C-c bindings in `mode-specific-map'
|
||||||
;; ("C-c M-x" . consult-mode-command)
|
;; ("C-c M-x" . consult-mode-command)
|
||||||
;; ("C-c h" . consult-history)
|
;; ("C-c h" . consult-history)
|
||||||
;; ("C-c k" . consult-kmacro)
|
;; ("C-c k" . consult-kmacro)
|
||||||
;; ("C-c m" . consult-man)
|
;; ("C-c m" . consult-man)
|
||||||
;; ("C-c i" . consult-info)
|
;; ("C-c i" . consult-info)
|
||||||
([remap Info-search] . consult-info)
|
([remap Info-search] . consult-info)
|
||||||
;; C-x bindings in `ctl-x-map'
|
;; C-x bindings in `ctl-x-map'
|
||||||
("C-x M-:" . consult-complex-command) ;; orig. repeat-complex-command
|
("C-x M-:" . consult-complex-command) ;; orig. repeat-complex-command
|
||||||
("C-x b" . consult-buffer) ;; orig. switch-to-buffer
|
("C-x b" . consult-buffer) ;; orig. switch-to-buffer
|
||||||
("C-x 4 b" . consult-buffer-other-window) ;; orig. switch-to-buffer-other-window
|
("C-x 4 b" . consult-buffer-other-window) ;; orig. switch-to-buffer-other-window
|
||||||
("C-x 5 b" . consult-buffer-other-frame) ;; orig. switch-to-buffer-other-frame
|
("C-x 5 b" . consult-buffer-other-frame) ;; orig. switch-to-buffer-other-frame
|
||||||
("C-x t b" . consult-buffer-other-tab) ;; orig. switch-to-buffer-other-tab
|
("C-x t b" . consult-buffer-other-tab) ;; orig. switch-to-buffer-other-tab
|
||||||
("C-x r b" . consult-bookmark) ;; orig. bookmark-jump
|
("C-x r b" . consult-bookmark) ;; orig. bookmark-jump
|
||||||
("C-x p b" . consult-project-buffer) ;; orig. project-switch-to-buffer
|
("C-x p b" . consult-project-buffer) ;; orig. project-switch-to-buffer
|
||||||
;; Custom M-# bindings for fast register access
|
;; Custom M-# bindings for fast register access
|
||||||
;; ("M-#" . consult-register-load)
|
;; ("M-#" . consult-register-load)
|
||||||
("M-'" . consult-register-store) ;; orig. abbrev-prefix-mark (unrelated)
|
("M-'" . consult-register-store) ;; orig. abbrev-prefix-mark (unrelated)
|
||||||
;; ("C-M-#" . consult-register)
|
;; ("C-M-#" . consult-register)
|
||||||
;; Other custom bindings
|
;; Other custom bindings
|
||||||
("M-y" . consult-yank-pop) ;; orig. yank-pop
|
("M-y" . consult-yank-pop) ;; orig. yank-pop
|
||||||
;; M-g bindings in `goto-map'
|
;; M-g bindings in `goto-map'
|
||||||
("M-g e" . consult-compile-error)
|
("M-g e" . consult-compile-error)
|
||||||
("M-g f" . consult-flymake) ;; Alternative: consult-flycheck
|
("M-g f" . consult-flymake) ;; Alternative: consult-flycheck
|
||||||
("M-g g" . consult-goto-line) ;; orig. goto-line
|
("M-g g" . consult-goto-line) ;; orig. goto-line
|
||||||
("M-g M-g" . consult-goto-line) ;; orig. goto-line
|
("M-g M-g" . consult-goto-line) ;; orig. goto-line
|
||||||
;; ("M-g o" . consult-outline) ;; Alternative: consult-org-heading
|
;; ("M-g o" . consult-outline) ;; Alternative: consult-org-heading
|
||||||
;; ("M-g m" . consult-mark)
|
;; ("M-g m" . consult-mark)
|
||||||
;; ("M-g k" . consult-global-mark)
|
;; ("M-g k" . consult-global-mark)
|
||||||
("M-i" . consult-imenu)
|
("M-i" . consult-imenu)
|
||||||
("M-I" . consult-imenu-multi)
|
("M-I" . consult-imenu-multi)
|
||||||
;; M-s bindings in `search-map'
|
;; M-s bindings in `search-map'
|
||||||
("M-s d" . consult-find) ;; Alternative: consult-fd
|
("M-s d" . consult-find) ;; Alternative: consult-fd
|
||||||
;; ("M-s c" . consult-locate)
|
;; ("M-s c" . consult-locate)
|
||||||
("M-s g" . consult-grep)
|
("M-s g" . consult-grep)
|
||||||
;; ("M-s G" . consult-git-grep)
|
;; ("M-s G" . consult-git-grep)
|
||||||
;; ("M-s r" . consult-ripgrep)
|
;; ("M-s r" . consult-ripgrep)
|
||||||
("M-s l" . consult-line)
|
("M-s l" . consult-line)
|
||||||
;; ("M-s L" . consult-line-multi)
|
;; ("M-s L" . consult-line-multi)
|
||||||
;; ("M-s k" . consult-keep-lines)
|
;; ("M-s k" . consult-keep-lines)
|
||||||
;; ("M-s u" . consult-focus-lines)
|
;; ("M-s u" . consult-focus-lines)
|
||||||
;; Isearch integration
|
;; Isearch integration
|
||||||
("M-s e" . consult-isearch-history)
|
("M-s e" . consult-isearch-history)
|
||||||
:map isearch-mode-map
|
:map isearch-mode-map
|
||||||
("M-e" . consult-isearch-history) ;; orig. isearch-edit-string
|
("M-e" . consult-isearch-history) ;; orig. isearch-edit-string
|
||||||
("M-s e" . consult-isearch-history) ;; orig. isearch-edit-string
|
("M-s e" . consult-isearch-history) ;; orig. isearch-edit-string
|
||||||
("M-s l" . consult-line) ;; needed by consult-line to detect isearch
|
("M-s l" . consult-line) ;; needed by consult-line to detect isearch
|
||||||
("M-s L" . consult-line-multi) ;; needed by consult-line to detect isearch
|
("M-s L" . consult-line-multi) ;; needed by consult-line to detect isearch
|
||||||
;; Minibuffer history
|
;; Minibuffer history
|
||||||
:map minibuffer-local-map
|
:map minibuffer-local-map
|
||||||
("M-s" . consult-history) ;; orig. next-matching-history-element
|
("M-s" . consult-history) ;; orig. next-matching-history-element
|
||||||
("M-r" . consult-history) ;; orig. previous-matching-history-element
|
("M-r" . consult-history) ;; orig. previous-matching-history-element
|
||||||
)
|
)
|
||||||
|
|
||||||
;; Enable automatic preview at point in the *Completions* buffer. This is
|
;; Enable automatic preview at point in the *Completions* buffer. This is
|
||||||
;; relevant when you use the default completion UI.
|
;; relevant when you use the default completion UI.
|
||||||
|
|
@ -402,7 +402,7 @@ C-c C-c to apply."
|
||||||
;; preview for `consult-register', `consult-register-load',
|
;; preview for `consult-register', `consult-register-load',
|
||||||
;; `consult-register-store' and the Emacs built-ins.
|
;; `consult-register-store' and the Emacs built-ins.
|
||||||
;; (setq register-preview-delay 0.5
|
;; (setq register-preview-delay 0.5
|
||||||
;; register-preview-function #'consult-register-format)
|
;; register-preview-function #'consult-register-format)
|
||||||
|
|
||||||
;; Optionally tweak the register preview window.
|
;; Optionally tweak the register preview window.
|
||||||
;; This adds thin lines, sorting and hides the mode line of the window.
|
;; This adds thin lines, sorting and hides the mode line of the window.
|
||||||
|
|
@ -410,7 +410,7 @@ C-c C-c to apply."
|
||||||
|
|
||||||
;; Use Consult to select xref locations with preview
|
;; Use Consult to select xref locations with preview
|
||||||
(setq xref-show-xrefs-function #'consult-xref
|
(setq xref-show-xrefs-function #'consult-xref
|
||||||
xref-show-definitions-function #'consult-xref)
|
xref-show-definitions-function #'consult-xref)
|
||||||
|
|
||||||
;; Configure other variables and modes in the :config section,
|
;; Configure other variables and modes in the :config section,
|
||||||
;; after lazily loading the package.
|
;; after lazily loading the package.
|
||||||
|
|
@ -449,10 +449,10 @@ C-c C-c to apply."
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(setq completion-in-region-function
|
(setq completion-in-region-function
|
||||||
(lambda (&rest args)
|
(lambda (&rest args)
|
||||||
(apply (if vertico-mode
|
(apply (if vertico-mode
|
||||||
#'consult-completion-in-region
|
#'consult-completion-in-region
|
||||||
#'completion--in-region)
|
#'completion--in-region)
|
||||||
args)))
|
args)))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
*** Corfu
|
*** Corfu
|
||||||
|
|
@ -488,7 +488,7 @@ C-c C-c to apply."
|
||||||
|
|
||||||
** Orderless
|
** Orderless
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(use-package orderless
|
(use-package orderless
|
||||||
:demand t
|
:demand t
|
||||||
:custom
|
:custom
|
||||||
|
|
@ -508,18 +508,18 @@ C-c C-c to apply."
|
||||||
;; )
|
;; )
|
||||||
;; )
|
;; )
|
||||||
)
|
)
|
||||||
#+end_src
|
#+END_SRC
|
||||||
|
|
||||||
** Marginalia
|
** Marginalia
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
;; Enable rich annotations using the Marginalia package
|
;; Enable rich annotations using the Marginalia package
|
||||||
(use-package marginalia
|
(use-package marginalia
|
||||||
;; Bind `marginalia-cycle' locally in the minibuffer. To make the binding
|
;; Bind `marginalia-cycle' locally in the minibuffer. To make the binding
|
||||||
;; available in the *Completions* buffer, add it to the
|
;; available in the *Completions* buffer, add it to the
|
||||||
;; `completion-list-mode-map'.
|
;; `completion-list-mode-map'.
|
||||||
:bind (:map minibuffer-local-map
|
:bind (:map minibuffer-local-map
|
||||||
("M-A" . marginalia-cycle))
|
("M-A" . marginalia-cycle))
|
||||||
|
|
||||||
;; The :init section is always executed.
|
;; The :init section is always executed.
|
||||||
:init
|
:init
|
||||||
|
|
@ -527,7 +527,7 @@ C-c C-c to apply."
|
||||||
;; the mode gets enabled right away. Note that this forces loading the
|
;; the mode gets enabled right away. Note that this forces loading the
|
||||||
;; package.
|
;; package.
|
||||||
(marginalia-mode))
|
(marginalia-mode))
|
||||||
#+end_src
|
#+END_SRC
|
||||||
|
|
||||||
* Dired
|
* Dired
|
||||||
|
|
||||||
|
|
@ -541,10 +541,10 @@ C-c C-c to apply."
|
||||||
)
|
)
|
||||||
|
|
||||||
(add-hook 'dired-mode-hook
|
(add-hook 'dired-mode-hook
|
||||||
(lambda ()
|
(lambda ()
|
||||||
;; Set dired-x buffer-local variables here. For example:
|
;; Set dired-x buffer-local variables here. For example:
|
||||||
;; (dired-omit-mode 1)
|
;; (dired-omit-mode 1)
|
||||||
))
|
))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Guess target directory
|
** Guess target directory
|
||||||
|
|
@ -565,9 +565,8 @@ Operate on the current line if no region is active.
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package whole-line-or-region
|
(use-package whole-line-or-region
|
||||||
|
:config
|
||||||
:config
|
(whole-line-or-region-global-mode 1)
|
||||||
(whole-line-or-region-global-mode 1)
|
|
||||||
)
|
)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
|
@ -689,12 +688,12 @@ https://github.com/victorhge/iedit
|
||||||
)
|
)
|
||||||
|
|
||||||
(mapc (lambda (mode)
|
(mapc (lambda (mode)
|
||||||
(font-lock-add-keywords
|
(font-lock-add-keywords
|
||||||
mode
|
mode
|
||||||
'(
|
'(
|
||||||
("\\<\\(FIXME\\)" 1 'highlight-angry-faces t)
|
("\\<\\(FIXME\\)" 1 'highlight-angry-faces t)
|
||||||
("\\<\\(TODO\\)" 1 'highlight-angry-faces t)
|
("\\<\\(TODO\\)" 1 'highlight-angry-faces t)
|
||||||
)))
|
)))
|
||||||
'(text-mode emacs-lisp-mode rust-mode zig-mode c-ts-mode c-mode prog-mode)
|
'(text-mode emacs-lisp-mode rust-mode zig-mode c-ts-mode c-mode prog-mode)
|
||||||
)
|
)
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
@ -758,10 +757,10 @@ https://github.com/victorhge/iedit
|
||||||
** Dumb-jump
|
** Dumb-jump
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(use-package dumb-jump
|
(use-package dumb-jump
|
||||||
:init
|
:init
|
||||||
(add-hook 'xref-backend-functions #'dumb-jump-xref-activate)
|
(add-hook 'xref-backend-functions #'dumb-jump-xref-activate)
|
||||||
)
|
)
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
** C-programming
|
** C-programming
|
||||||
|
|
@ -841,8 +840,8 @@ https://github.com/remyferre/comment-dwim-2
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(use-package comment-dwim-2
|
(use-package comment-dwim-2
|
||||||
:config
|
:bind
|
||||||
(global-set-key (kbd "M-;") 'comment-dwim-2)
|
("M-;" . comment-dwim-2)
|
||||||
)
|
)
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
|
|
@ -1006,11 +1005,11 @@ Inspired by https://github.com/org-roam/org-roam/wiki/User-contributed-Tricks#fi
|
||||||
"Select a single tag from list and filter `org-roam-node' by it."
|
"Select a single tag from list and filter `org-roam-node' by it."
|
||||||
(interactive)
|
(interactive)
|
||||||
(let ((tag (car (completing-read-multiple "Tag: "
|
(let ((tag (car (completing-read-multiple "Tag: "
|
||||||
(org-roam-tag-completions)))))
|
(org-roam-tag-completions)))))
|
||||||
(org-roam-node-find nil nil
|
(org-roam-node-find nil nil
|
||||||
(lambda (node)
|
(lambda (node)
|
||||||
(member tag
|
(member tag
|
||||||
(org-roam-node-tags node))))))
|
(org-roam-node-tags node))))))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
** Font
|
** Font
|
||||||
|
|
@ -1061,7 +1060,7 @@ in a local directory (on Linux this is ~/.local/share/fonts).
|
||||||
(when buffer-file-name
|
(when buffer-file-name
|
||||||
(find-alternate-file
|
(find-alternate-file
|
||||||
(concat "/sudo:root@localhost:"
|
(concat "/sudo:root@localhost:"
|
||||||
buffer-file-name)
|
buffer-file-name)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
@ -1089,9 +1088,9 @@ in a local directory (on Linux this is ~/.local/share/fonts).
|
||||||
(defun myrmi/run-ceedling-tests (&optional file-name)
|
(defun myrmi/run-ceedling-tests (&optional file-name)
|
||||||
(interactive)
|
(interactive)
|
||||||
(let* (
|
(let* (
|
||||||
(file-path (or file-name buffer-file-name))
|
(file-path (or file-name buffer-file-name))
|
||||||
(root-path (or (locate-dominating-file file-path ceedling-project-file-name) ceedling-project-root))
|
(root-path (or (locate-dominating-file file-path ceedling-project-file-name) ceedling-project-root))
|
||||||
)
|
)
|
||||||
(compile
|
(compile
|
||||||
(concat "cd " root-path " && " ceedling-cmd)
|
(concat "cd " root-path " && " ceedling-cmd)
|
||||||
)
|
)
|
||||||
|
|
@ -1128,8 +1127,8 @@ in a local directory (on Linux this is ~/.local/share/fonts).
|
||||||
(let ((dir default-directory))
|
(let ((dir default-directory))
|
||||||
(dolist (buffer (buffer-list))
|
(dolist (buffer (buffer-list))
|
||||||
(with-current-buffer buffer
|
(with-current-buffer buffer
|
||||||
(when (equal default-directory dir)
|
(when (equal default-directory dir)
|
||||||
(myrmi/reload-dir-locals-for-current-buffer))))))
|
(myrmi/reload-dir-locals-for-current-buffer))))))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
** Visit/reload config
|
** Visit/reload config
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue