sdfffffffff

This commit is contained in:
Janis 2024-07-15 16:20:15 +02:00
parent 01b69a78e5
commit a1f3ab65da

View file

@ -40,7 +40,7 @@ https://github.com/noctuid/evil-guide?tab=readme-ov-file#keymap-precedence
** Tangling init.org ** Tangling init.org
From Sophie's emacs.d: From Sophie's emacs.d:
#+begin_src emacs-lisp :tangle no #+begin_src emacs-lisp
(defun tangle-init () (defun tangle-init ()
"If the current buffer is init.org the code-blocks are "If the current buffer is init.org the code-blocks are
tangled, and the tangled file is compiled." tangled, and the tangled file is compiled."
@ -186,6 +186,13 @@ Add package repositories and rank them by priority
(exec-path-from-shell-initialize))) (exec-path-from-shell-initialize)))
#+end_src #+end_src
#+begin_src emacs-lisp
(use-package keychain-environment
:defer t
:config
(keychain-refresh-environment))
#+end_src
Keymap: Keymap:
#+begin_src emacs-lisp #+begin_src emacs-lisp
(defvar custom-bindings-map (make-keymap) (defvar custom-bindings-map (make-keymap)
@ -197,6 +204,15 @@ Keymap:
:keymap custom-bindings-map) :keymap custom-bindings-map)
#+end_src #+end_src
* Visuals * Visuals
** Borders, Frames & Windows
#+begin_src emacs-lisp
(add-to-list 'default-frame-alist '(internal-border-width . 8 ))
(set-fringe-mode 4)
(setq-default fringes-outside-margins 0)
(setq-default indicate-buffer-boundaries nil)
(setq-default indicate-empty-lines nil)
(set-face-attribute 'header-line t :inherit 'default)
#+end_src
** Themes ** Themes
Light theme for writing Light theme for writing
#+begin_src emacs-lisp #+begin_src emacs-lisp
@ -834,7 +850,7 @@ Realistically, I will probably never use 90% of Helm's functionality, so vertico
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package vertico (use-package vertico
:bind (:map minibuffer-local-map :bind (:map minibuffer-local-map
("C-h" . backward-kill-word)) ("C-h" . backward-kill-sexpr))
:config :config
(vertico-mode 1) (vertico-mode 1)
(setq vertico-count 25 (setq vertico-count 25
@ -842,11 +858,21 @@ Realistically, I will probably never use 90% of Helm's functionality, so vertico
read-buffer-completion-ignore-case t read-buffer-completion-ignore-case t
read-file-name-completion-ignore-case t)) read-file-name-completion-ignore-case t))
(vertico-multiform-mode)
#+end_src
Use =vertico-posframe= to make the =vertico= buffer floating in the centre of the frame.
#+begin_src emacs-lisp
(use-package vertico-posframe (use-package vertico-posframe
:config :config
(vertico-posframe-mode 1) (vertico-posframe-mode 1)
(setq vertico-posframe-width 90 (setq vertico-posframe-height vertico-count
vertico-posframe-height vertico-count)) vertico-multiform-commands
'((consult-line (:not posframe))
(consult-ripgrep (:not posframe))
(embark-act (:not posframe))
(t posframe))
))
(use-package savehist :init (savehist-mode)) (use-package savehist :init (savehist-mode))
#+end_src #+end_src
@ -889,6 +915,9 @@ Use consult-xref for lsp-xref and xref-find-references.
(global-corfu-mode)) (global-corfu-mode))
(use-package emacs (use-package emacs
:custom
;; TODO
(enable-recursive-minibuffers t)
:init :init
;; TAB cycle if there are only few candidates ;; TAB cycle if there are only few candidates
(setq completion-cycle-threshold 3) (setq completion-cycle-threshold 3)
@ -953,6 +982,19 @@ This package seems to slow down search quite a bit in common buffers like find-f
orderless-component-separator "[ |]")) orderless-component-separator "[ |]"))
#+end_src #+end_src
Use embark for in-mini-buffer actions:
#+begin_src emacs-lisp
(use-package embark
:defer t
:bind (("C-." . embark-act))
:config
())
(use-package embark-consult
:defer t
:hook (embark-collect-mode . consult-preview-at-point-mode))
#+end_src
#+begin_src emacs-lisp #+begin_src emacs-lisp
(defun my-consult-line-wrapper () (defun my-consult-line-wrapper ()
(interactive) (interactive)