diff options
author | yaidel <yaidel.misc@aleeas.com> | 2023-03-26 22:36:56 +0200 |
---|---|---|
committer | yaidel <yaidel.misc@aleeas.com> | 2023-03-26 22:36:56 +0200 |
commit | b62fdd462c0e839e0c29cd2d7eb1b38bcd17ae1d (patch) | |
tree | 25daadf29fab4288eefbd2384879536bd4087467 /emacs_init | |
parent | 74b113766174066a64a62c7736be18980258b0e2 (diff) | |
download | configuration files-b62fdd462c0e839e0c29cd2d7eb1b38bcd17ae1d.tar.gz configuration files-b62fdd462c0e839e0c29cd2d7eb1b38bcd17ae1d.tar.bz2 configuration files-b62fdd462c0e839e0c29cd2d7eb1b38bcd17ae1d.zip |
Fixing consult
Diffstat (limited to 'emacs_init')
-rw-r--r-- | emacs_init/dot_emacs.org | 120 |
1 files changed, 29 insertions, 91 deletions
diff --git a/emacs_init/dot_emacs.org b/emacs_init/dot_emacs.org index 12b036b..57fe306 100644 --- a/emacs_init/dot_emacs.org +++ b/emacs_init/dot_emacs.org @@ -192,76 +192,13 @@ Reload init file when =C-c r= is pressed: completion-category-overrides '((file (styles partial-completion)))) ) #+end_src -** Marginalia configuration -#+begin_src emacs-lisp - (use-package marginalia - :ensure t - ;; Either bind `marginalia-cycle` globally or only in the minibuffer - :bind (("M-A" . marginalia-cycle) - :map minibuffer-local-map - ("M-A" . marginalia-cycle)) - - ;; The :init configuration is always executed (Not lazy!) - :init - - ;; Must be in the :init section of use-package such that the mode gets - ;; enabled right away. Note that this forces loading the package. - (marginalia-mode)) -#+end_src - ** Consult configuration #+begin_src emacs-lisp (use-package consult :ensure t - ;; Replace bindings. Lazily loaded due by `use-package'. - :bind (;; C-c bindings (mode-specific-map) - ;; ("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 5 b" . consult-buffer-other-frame) ;; orig. switch-to-buffer-other-frame - ;; ("C-x r b" . consult-bookmark) ;; orig. bookmark-jump - ;; ("C-x p b" . consult-project-buffer) ;; orig. project-switch-to-buffer - ;; Custom M-# bindings for fast register access - ;; ("M-#" . consult-register-load) - ;; ("M-'" . consult-register-store) ;; orig. abbrev-prefix-mark (unrelated) - ;; ("C-M-#" . consult-register) - ;; Other custom bindings - ;; ("M-y" . consult-yank-pop) ;; orig. yank-pop - ;; ("<help> a" . consult-apropos) ;; orig. apropos-command - ;; M-g bindings (goto-map) - ;; ("M-g e" . consult-compile-error) - ;; ("M-g f" . consult-flymake) ;; Alternative: consult-flycheck - ;; ("M-g 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 m" . consult-mark) - ;; ("M-g k" . consult-global-mark) - ;; ("M-g i" . consult-imenu) - ;; ("M-g I" . consult-imenu-multi) - ;; ;; M-s bindings (search-map) - ;; ("M-s d" . consult-find) - ;; ("M-s D" . consult-locate) - ;; ("M-s g" . consult-grep) - ;; ("M-s G" . consult-git-grep) - ;; ("M-s r" . consult-ripgrep) - ;; ("M-s l" . consult-line) - ;; ("M-s L" . consult-line-multi) - ;; ("M-s m" . consult-multi-occur) - ;; ("M-s k" . consult-keep-lines) - ;; ("M-s u" . consult-focus-lines) - ;; ;; Isearch integration - ;; ("M-s e" . consult-isearch-history) - ;; :map isearch-mode-map - ;; ("M-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-multi) ;; needed by consult-line to detect isearch - ;; ;; Minibuffer history - ;; :map minibuffer-local-map - ;; ("M-s" . consult-history) ;; orig. next-matching-history-element - ;; ("M-r" . consult-history)) ;; orig. previous-matching-history-element - ) - ;; ;; Enable automatic preview at point in the *Completions* buffer. This is - ;; ;; relevant when you use the default completion UI. + + ;; Enable automatic preview at point in the *Completions* buffer. This is + ;; relevant when you use the default completion UI. :hook (completion-list-mode . consult-preview-at-point-mode) ;; The :init configuration is always executed (Not lazy) @@ -271,7 +208,7 @@ Reload init file when =C-c r= is pressed: ;; preview for `consult-register', `consult-register-load', ;; `consult-register-store' and the Emacs built-ins. (setq register-preview-delay 0.5 - register-preview-function #'consult-register-format) + register-preview-function #'consult-register-format) ;; Optionally tweak the register preview window. ;; This adds thin lines, sorting and hides the mode line of the window. @@ -279,33 +216,26 @@ Reload init file when =C-c r= is pressed: ;; Use Consult to select xref locations with preview (setq xref-show-xrefs-function #'consult-xref - xref-show-definitions-function #'consult-xref) + xref-show-definitions-function #'consult-xref) + ) +#+end_src +** Marginalia configuration +#+begin_src emacs-lisp + (use-package marginalia + :ensure t + ;; Either bind `marginalia-cycle` globally or only in the minibuffer + :bind (("M-A" . marginalia-cycle) + :map minibuffer-local-map + ("M-A" . marginalia-cycle)) - ;; Configure other variables and modes in the :config section, - ;; after lazily loading the package. - :config + ;; The :init configuration is always executed (Not lazy!) + :init - ;; Optionally configure preview. The default value - ;; is 'any, such that any key triggers the preview. - ;; (setq consult-preview-key 'any) - ;; (setq consult-preview-key (kbd "M-.")) - ;; (setq consult-preview-key (list (kbd "<S-down>") (kbd "<S-up>"))) - ;; For some commands and buffer sources it is useful to configure the - ;; :preview-key on a per-command basis using the `consult-customize' macro. - (consult-customize - consult-theme - :preview-key '(:debounce 0.2 any) - consult-ripgrep consult-git-grep consult-grep - consult-bookmark consult-recent-file consult-xref - consult--source-bookmark consult--source-recent-file - consult--source-project-recent-file - :preview-key (kbd "M-.")) - - ;; Optionally configure the narrowing key. - ;; Both < and C-+ work reasonably well. - (setq consult-narrow-key "<") ;; (kbd "C-+") - ) + ;; Must be in the :init section of use-package such that the mode gets + ;; enabled right away. Note that this forces loading the package. + (marginalia-mode)) #+end_src + ** Embark configuration #+begin_src emacs-lisp (use-package embark @@ -897,6 +827,14 @@ For Structure Templates [[https://orgmode.org/manual/Structure-Templates.html][( (add-to-list 'org-structure-template-alist '("el" . "src emacs-lisp")) (add-to-list 'org-structure-template-alist '("py" . "src python")) #+end_src +** Org Export + +Enable Markdown export back-end (see [[https://orgmode.org/manual/Exporting.html][Org-export manual]]) + +#+begin_src emacs-lisp +(require 'ox-md) +#+end_src + * Org-cite and citations handling To configure the citations within Org, we have its Org-cite functionality. More information about this functionality can be found in the follwoing sources: |