diff --git a/init.org b/init.org index e817586..5263082 100644 --- a/init.org +++ b/init.org @@ -270,10 +270,10 @@ Light theme for writing Manage themes, use dark-theme by default: #+begin_src emacs-lisp - (defvar nemo/dark-theme 'doom-one) - (defvar nemo/light-theme 'gruvbox-light-medium) +(defvar nemo/dark-theme 'doom-one) +(defvar nemo/light-theme 'gruvbox-light-medium) - (load-theme nemo/dark-theme t) +(add-hook 'after-init-hook (lambda () (load-theme nemo/dark-theme t))) #+end_src Disable themes before loading a new one, from [[https://github.com/larstvei/dot-emacs?tab=readme-ov-file#advice][here]]. @@ -487,7 +487,7 @@ try out =diff-hl= for highlighting diffs in magit: #+end_src =magit-todos= sounds cool. -#+begin_src emacs-lisp +#+begin_src emacs-lisp :tangle no (use-package magit-todos :after magit :straight t @@ -1063,23 +1063,6 @@ Use =kind-icon= to decorate corfu completion candidates: (add-to-list 'corfu-margin-formatters #'kind-icon-margin-formatter)) #+end_src -Use =prescient= to sort completion candidates: -#+begin_src emacs-lisp :tangle no -(use-package prescient - :straight t - :after corfu - :defer t - :config - (add-to-list 'prescient-filter-method 'fuzzy)) - -(use-package corfu-prescient - :straight t - :after corfu - :straight t - :config - (corfu-prescient-mode 1)) -#+end_src - This package seems to slow down search quite a bit in common buffers like find-file and exectue-extended-comand: #+begin_src emacs-lisp :tangle no (use-package cape @@ -1124,7 +1107,7 @@ Fuzzy and out-of-order completion matching using =orderless=: (use-package orderless :straight t :config - (setq completion-styles '(orderless basic partial-completion) + (setq completion-styles '(prescient orderless basic partial-completion) orderless-matching-styles '(orderless-flex) completion-category-overrides '((file (styles basic partial-completion))) orderless-component-separator "[ |]")) @@ -1145,6 +1128,29 @@ Use =embark= for in-mini-buffer actions: :hook (embark-collect-mode . consult-preview-at-point-mode)) #+end_src +Use =prescient= to sort completion candidates: +#+begin_src emacs-lisp +(use-package prescient + :straight t + :after corfu + :defer t + :config + (add-to-list 'prescient-filter-method 'fuzzy)) + +(use-package corfu-prescient + :straight t + :after corfu + :straight t + :config + (setq corfu-prescient-completion-styles '(prescient orderless basic partial-completion)) + (corfu-prescient-mode 1)) +#+end_src + +After loading =orderless= and =prescient=, configure the =completion-styles= list: +#+begin_src emacs-lisp +(setq completion-styles '(prescient orderless basic partial-completion)) +#+end_src + #+begin_src emacs-lisp (defun my-consult-line-wrapper () (interactive) @@ -1356,6 +1362,15 @@ clang-format :defer t) #+end_src +** Zig +Use =zls= automatically with lsp, and =zig-mode=: +#+begin_src emacs-lisp +(use-package zig-mode + :straight t + :config + (add-to-list 'auto-mode-alist '("\\.zig\\'" . zig-mode))) +#+end_src + * Keybinds #+begin_src emacs-lisp (define-key custom-bindings-map (kbd "C-c l") 'org-store-link)