From 49cef56c82f90ba4ae921bf00e8198e089b82883 Mon Sep 17 00:00:00 2001 From: Jim Myhrberg Date: Thu, 17 Jun 2021 20:20:12 +0100 Subject: [PATCH] feat(editor): add embark This is a basic setup, as I'm not very familiar with what is doable with embark. It also takes over the goto-chg keybindings, cause that package rarely worked correctly, so I almost never used it. --- core/siren-core-modules.el | 2 +- modules/editor/siren-embark.el | 35 ++++++++++++++++++++++++++++++++++ straight/versions/default.el | 2 +- 3 files changed, 37 insertions(+), 2 deletions(-) create mode 100644 modules/editor/siren-embark.el diff --git a/core/siren-core-modules.el b/core/siren-core-modules.el index 42d3422..06e2193 100644 --- a/core/siren-core-modules.el +++ b/core/siren-core-modules.el @@ -29,6 +29,7 @@ (require 'siren-display-fill-column) (require 'siren-display-indentation) (require 'siren-display-line-numbers) +(require 'siren-embark) (require 'siren-folding) (require 'siren-highlight-symbol) (require 'siren-marginalia) @@ -91,7 +92,6 @@ ;; Text editing (require 'siren-expand-region) -(require 'siren-goto-chg) (require 'siren-move-dup) (require 'siren-multiple-cursors) (require 'siren-randomize-region) diff --git a/modules/editor/siren-embark.el b/modules/editor/siren-embark.el new file mode 100644 index 0000000..af8ecb7 --- /dev/null +++ b/modules/editor/siren-embark.el @@ -0,0 +1,35 @@ +;;; siren-embark.el --- jimeh's Emacs Siren: embark configuration. + +;;; Commentary: + +;; Basic configuration for embark. + +;;; Code: + +(require 'siren-marginalia) +(require 'siren-consult) + +(use-package embark + :bind + (("C-." . embark-act) ;; pick some comfortable binding + ("C-," . embark-dwim) ;; good alternative: M-. + ("C-h B" . embark-bindings)) ;; alternative for `describe-bindings' + + :config + ;; Hide the mode line of the Embark live/completions buffers + (add-to-list 'display-buffer-alist + '("\\`\\*Embark Collect \\(Live\\|Completions\\)\\*" + nil + (window-parameters (mode-line-format . none))))) + +;; Consult users will also want the embark-consult package. +(use-package embark-consult + :after (embark consult) + :demand t ; only necessary if you have the hook below + ;; if you want to have consult previews as you move around an + ;; auto-updating embark collect buffer + :hook + (embark-collect-mode . consult-preview-at-point-mode)) + +(provide 'siren-embark) +;;; siren-embark.el ends here diff --git a/straight/versions/default.el b/straight/versions/default.el index de41db0..f0e659e 100644 --- a/straight/versions/default.el +++ b/straight/versions/default.el @@ -49,6 +49,7 @@ ("emacs-which-key" . "fc29864395fdaf688e2ef5111831663bad89a020") ("emacsmirror-mirror" . "a3cf6458e9bf5aaf34bbfd1dcad4bf21d5b05c7c") ("emacsql" . "6d8cd9366284b5a27268ff4b783e2c34573d5b60") + ("embark" . "acbe1cba548832d295449da348719f69b9685c6f") ("epl" . "78ab7a85c08222cd15582a298a364774e3282ce6") ("esxml" . "9f96449f6059cb75491dc812ddeb1b6200ec6740") ("exec-path-from-shell" . "bf4bdc8b8911e7a2c04e624b9a343164c3878282") @@ -76,7 +77,6 @@ ("go-playground" . "ede417a52c0eea1a69658f4c6c6c12d6165e64a4") ("go-projectile" . "ad4ca3b5695a0e31e95e3cc4ccab498f87d68303") ("gotest.el" . "9b1dc4eba1b22d751cb2f0a12e29912e010fac60") - ("goto-chg" . "3ce1389fea12edde4e343bc7d54c8da97a1a6136") ("grip-mode" . "02b7a8109fa1ae248e61c91da3bd8676f8d2e175") ("groovy-emacs-modes" . "99eaf70720e4a6337fbd5acb68ae45cc1779bdc4") ("haml-mode" . "bf5b6c11b1206759d2b28af48765e04882dd1fc4")