Compare commits

...

9 Commits

4 changed files with 36 additions and 15 deletions

View File

@ -172,8 +172,10 @@
(cider-repl-mode . cider-repl-mode-hook-fn)
(cider-mode . cider-mode-hook-fn))
(use-package babashka)
(use-package jet
:bind ("C-c j " . jet))
:bind ("C-c j" . jet))
(provide 'init-clojure)
;;; init-clojure.el ends here

View File

@ -42,7 +42,7 @@
("C-c D" . crux-delete-file-and-buffer)
("C-c w" . crux-cleanup-buffer-or-region)
("C-c M-o" . crux-open-with)
("C-M-z" . curx-indent-defun)
("C-M-z" . crux-indent-defun)
("C-c C-u" . crux-view-url)
("C-c TAB" . crux-indent-rigidly-and-copy-to-clipboard)
("C-c C-M-j" . crux-switch-to-previous-buffer)

View File

@ -8,6 +8,12 @@
'((t (:foreground "gold")))
"Face for isearch minibuffer prompt."
:group 'isearch)
;; https://www.emacs.dyerdwelling.family/emacs/20230503211610-emacs--isearch-occur-advice-window-focus/
(defun isearch-occur-advice (origin &rest args)
(isearch-exit)
(select-window (get-buffer-window "*Occur*"))
(goto-char (point-min)))
(advice-add 'isearch-occur :after 'isearch-occur-advice)
:custom
(search-whitespace-regexp ".*\\b")
(isearch-lax-whitespace t)
@ -64,8 +70,9 @@
(deadgrep search-term (file-name-directory buffer-file-name)))
(defvar include-all nil)
(defun deadgrep--include-all-advice (rg-args)
(when include-all
(push "-uuuLz" rg-args)))
(if include-all
(push "-uuuLz" rg-args)
rg-args))
(advice-add 'deadgrep--arguments :filter-return #'deadgrep--include-all-advice)
(defun deadgrep-all (search-term)
(interactive (list (deadgrep--read-search-term)))

View File

@ -65,17 +65,34 @@ Equivalent to raising then wrapping."
((= paren-char ?\{) (sp-wrap-curly))
((= paren-char ?\[) (sp-wrap-square))
(t (error "Not in a list")))))
(defun sp-mark-to-end-of-sexp ()
"Mark all the way to the end of the current sexp."
(interactive)
(call-interactively 'set-mark-command)
(sp-end-of-sexp))
(defun sp-mark-sexp-advice (origin &rest args)
(if (sp--raw-argument-p (car args))
(push-mark
(save-excursion
(sp-end-of-sexp)
(point))
nil t)
(apply origin args)))
(advice-add 'sp-mark-sexp :around 'sp-mark-sexp-advice)
(defun sp-fwd-sexp (arg)
(interactive "^P")
(if (sp--raw-argument-p arg)
(sp-end-of-sexp)
(call-interactively 'sp-forward-sexp arg)))
(defun sp-bwd-sexp (arg)
(interactive "^P")
(if (sp--raw-argument-p arg)
(sp-beginning-of-sexp)
(call-interactively 'sp-backward-sexp arg)))
(unbind-key "M-?" 'smartparens-mode-map)
(unbind-key "M-?" 'sp-keymap)
:bind (:map smartparens-mode-map
("C-M-?" . sp-convolute-sexp)
([remap mark-sexp] . sp-mark-sexp)
([remap kill-sexp] . sp-kill-sexp)
("C-M-k" . sp-kill-sexp)
("M-S-k" . kill-sexp)
([remap sp-forward-sexp] . sp-fwd-sexp)
([remap sp-backward-sexp] . sp-bwd-sexp)
("M-[" . sp-wrap-square)
("C-c M-{" . sp-wrap-curly)
("M-W" . sp-copy-sexp)
@ -86,12 +103,7 @@ Equivalent to raising then wrapping."
("M-;" . paredit-comment-dwim)
("M-q" . sp-indent-defun)
("C-j" . sp-newline)
("C-S-a" . sp-beginning-of-sexp)
("M-A" . sp-beginning-of-sexp)
("C-S-e" . sp-end-of-sexp)
("M-E" . sp-end-of-sexp)
("M-R" . kill-around-sexp)
("C-M-S-SPC" . sp-mark-to-end-of-sexp)
("C-c C-S-d" . duplicate-sexp-after-point)
("C-c M-(" . wrap-round-from-behind)))