No more use-package
This commit is contained in:
482
home.org
482
home.org
@@ -699,7 +699,6 @@ These are just some general settings that apply everywhere. First, a few package
|
||||
Turn off some default settings that I don't find useful.
|
||||
|
||||
#+BEGIN_SRC elisp
|
||||
;;; -*- lexical-binding: t -*-
|
||||
(setq inhibit-startup-screen t)
|
||||
(setq initial-scratch-message nil)
|
||||
(menu-bar-mode -1)
|
||||
@@ -725,7 +724,7 @@ Automatically refresh ~dired~ buffers when switching to them, instead of requiri
|
||||
refresh.
|
||||
|
||||
#+BEGIN_SRC elisp
|
||||
(setq dired-auto-revert-buffer t)
|
||||
(setopt dired-auto-revert-buffer t)
|
||||
#+END_SRC
|
||||
|
||||
Similarly, highlighting the line the cursor is on is really useful for figuring out where you are,
|
||||
@@ -781,10 +780,10 @@ I have the tab bar at the top of the window. The other settings just clear up so
|
||||
things look at little nicer.
|
||||
|
||||
#+BEGIN_SRC elisp
|
||||
(setq doom-modeline-irc nil)
|
||||
(setq doom-modeline-workspace-name nil)
|
||||
(setq doom-modeline-buffer-encoding nil)
|
||||
(setq doom-modeline-vcs-max-length 30)
|
||||
(setopt doom-modeline-irc nil)
|
||||
(setopt doom-modeline-workspace-name nil)
|
||||
(setopt doom-modeline-buffer-encoding nil)
|
||||
(setopt doom-modeline-vcs-max-length 30)
|
||||
(doom-modeline-mode)
|
||||
#+END_SRC
|
||||
|
||||
@@ -793,9 +792,7 @@ cool, so I'm turning it on in prog mode. The enabled ligatures are font-specific
|
||||
ligature wiki]].
|
||||
|
||||
#+BEGIN_SRC elisp
|
||||
(use-package ligature
|
||||
:after prog-mode
|
||||
:config
|
||||
(require 'ligature)
|
||||
(ligature-set-ligatures 'prog-mode
|
||||
'("--" "---" "==" "===" "!=" "!==" "=!="
|
||||
"=:=" "=/=" "<=" ">=" "&&" "&&&" "&=" "++" "+++" "***" ";;" "!!"
|
||||
@@ -810,7 +807,7 @@ ligature wiki]].
|
||||
"|||>" "<|||" "<|>" "..." ".." ".=" "..<" ".?" "::" ":::" ":=" "::="
|
||||
":?" ":?>" "//" "///" "/*" "*/" "/=" "//=" "/==" "@_" "__" "???"
|
||||
"<:<" ";;;"))
|
||||
(global-ligature-mode t))
|
||||
(global-ligature-mode t)
|
||||
#+END_SRC
|
||||
|
||||
Use variable-width fonts in text buffers. ~mixed-pitch-mode~ keeps most code blocks as monospace.
|
||||
@@ -828,17 +825,15 @@ Use variable-width fonts in text buffers. ~mixed-pitch-mode~ keeps most code blo
|
||||
A basic ace-window setup. Allows switching between windows quickly (although avy can do the same...).
|
||||
|
||||
#+BEGIN_SRC elisp
|
||||
(use-package ace-window
|
||||
:bind (("M-o" . ace-window)
|
||||
(require 'ace-window)
|
||||
(bind-keys ("M-o" . ace-window)
|
||||
("s-o" . ace-window))
|
||||
:config
|
||||
(setq aw-keys '(?a ?s ?d ?f ?g ?h ?j ?k ?l))
|
||||
(setq aw-dispatch-always t))
|
||||
(setopt aw-keys '(?a ?s ?d ?f ?g ?h ?j ?k ?l))
|
||||
(setopt aw-dispatch-always t)
|
||||
#+END_SRC
|
||||
|
||||
Set up a few project- / workspace-related key bindings.
|
||||
|
||||
#+name: workspace_keybinds
|
||||
#+BEGIN_SRC elisp
|
||||
(bind-keys ("s-f" . project-find-file)
|
||||
("s-F" . project-switch-project))
|
||||
@@ -874,13 +869,12 @@ change when drilling into a help page or something. I've set up repeat mode to m
|
||||
move backward / forward through history.
|
||||
|
||||
#+BEGIN_SRC elisp
|
||||
(use-package tab-bar
|
||||
:config
|
||||
(require 'tab-bar)
|
||||
|
||||
(bind-keys :repeat-map tab-bar-repeat-map
|
||||
("<left>" . tab-bar-history-back)
|
||||
("<right>" . tab-bar-history-forward))
|
||||
(tab-bar-history-mode)
|
||||
(defvar-keymap tab-bar-repeat-map
|
||||
:repeat t
|
||||
"<left>" #'tab-bar-history-back
|
||||
"<right>" #'tab-bar-history-forward))
|
||||
#+END_SRC
|
||||
|
||||
*** Window Placement
|
||||
@@ -950,7 +944,6 @@ This configuration affects general text editing, across all modes. First, some p
|
||||
enable = true;
|
||||
extraPackages = epkgs: with epkgs; [
|
||||
avy
|
||||
devil
|
||||
edit-indirect
|
||||
embark
|
||||
god-mode
|
||||
@@ -972,7 +965,7 @@ but I'm worried that having too many repeat maps will also be annoying (I'll hav
|
||||
cancel them more frequently). In the end, I opted for Devil mode. It avoids modifier keys, and has
|
||||
its own devil-mode-only repeat maps that don't interfere when using normal modifier key sequences.
|
||||
|
||||
#+BEGIN_SRC elisp
|
||||
#+BEGIN_SRC elisp :tangle nil
|
||||
(use-package devil
|
||||
:disable t
|
||||
:config
|
||||
@@ -988,9 +981,12 @@ its own devil-mode-only repeat maps that don't interfere when using normal modif
|
||||
("%k p" "%k n" "%k b" "%k f" "%k a" "%k e")
|
||||
("%k s")
|
||||
("%k m d" "%k m <backspace>"))))
|
||||
#+END_SRC
|
||||
|
||||
#+BEGIN_SRC elisp
|
||||
(require 'god-mode)
|
||||
(require 'which-key)
|
||||
|
||||
(use-package god-mode
|
||||
:config
|
||||
(bind-keys :map god-local-mode-map
|
||||
("i" . (lambda () (interactive) (god-mode-all -1)))
|
||||
("z" . repeat))
|
||||
@@ -1002,7 +998,7 @@ its own devil-mode-only repeat maps that don't interfere when using normal modif
|
||||
(t 'bar))))
|
||||
|
||||
(add-hook 'post-command-hook 'my-god-mode-update-cursor-type)
|
||||
(which-key-enable-god-mode-support))
|
||||
(which-key-enable-god-mode-support)
|
||||
#+END_SRC
|
||||
|
||||
Avy allows jumping to any place on the screen with just a few keystrokes. I've stolen most of these
|
||||
@@ -1010,13 +1006,11 @@ ideas from Karthinks' article [[https://karthinks.com/software/avy-can-do-anythi
|
||||
his article.
|
||||
|
||||
#+BEGIN_SRC elisp
|
||||
(use-package avy
|
||||
:bind ("M-j" . avy-goto-char-timer))
|
||||
(require 'avy)
|
||||
(require 'embark)
|
||||
|
||||
(defun avy-goto-char-timer-embark ()
|
||||
(interactive)
|
||||
(require 'avy)
|
||||
(require 'embark)
|
||||
(let ((avy-action-oneshot
|
||||
(lambda (pt)
|
||||
(unwind-protect
|
||||
@@ -1028,29 +1022,19 @@ his article.
|
||||
(avy-goto-char-timer)))
|
||||
|
||||
(bind-keys
|
||||
("M-J" . avy-goto-char-timer-embark))
|
||||
|
||||
(use-package embark
|
||||
:bind
|
||||
(("C-." . embark-act) ;; pick some comfortable binding
|
||||
))
|
||||
|
||||
("M-j" . avy-goto-char-timer)
|
||||
("M-J" . avy-goto-char-timer-embark)
|
||||
("C-." . embark-act))
|
||||
#+END_SRC
|
||||
|
||||
Just "silently" wrap when searching at the bottom of a document.
|
||||
|
||||
#+BEGIN_SRC elisp
|
||||
(use-package isearch
|
||||
:custom
|
||||
(isearch-wrap-pause 'no-ding))
|
||||
(setopt isearch-wrap-pause 'no-ding)
|
||||
#+END_SRC
|
||||
|
||||
#+BEGIN_SRC elisp
|
||||
(use-package string-inflection
|
||||
:commands
|
||||
string-inflection-java-style-cycle
|
||||
string-inflection-rust-style-cycle
|
||||
:config
|
||||
(require 'string-inflection)
|
||||
(defun string-inflection-rust-style-cycle-function (str)
|
||||
(cond
|
||||
((string-inflection-snake-case-p str)
|
||||
@@ -1059,18 +1043,18 @@ Just "silently" wrap when searching at the bottom of a document.
|
||||
(string-inflection-pascal-case-function str))
|
||||
(t
|
||||
(string-inflection-snake-case-function str))))
|
||||
|
||||
(defun string-inflection-rust-style-cycle ()
|
||||
(interactive)
|
||||
(string-inflection--symbol-or-region #'string-inflection-rust-style-cycle-function))
|
||||
(defvar-keymap string-inflection-java-map
|
||||
:repeat t
|
||||
"u" #'string-inflection-java-style-cycle)
|
||||
(defvar-keymap string-inflection-rust-map
|
||||
:repeat t
|
||||
"u" #'string-inflection-rust-style-cycle))
|
||||
|
||||
(use-package edit-indirect
|
||||
:bind ("C-x 4 n" . edit-indirect-region))
|
||||
(bind-keys :repeat-map string-inflection-java-map
|
||||
("u" . string-inflection-java-style-cycle))
|
||||
|
||||
(bind-keys :repeat-map string-inflection-rust-map
|
||||
("u" . string-inflection-rust-style-cycle))
|
||||
|
||||
(bind-keys ("C-x 4 n" . edit-indirect-region))
|
||||
#+END_SRC
|
||||
|
||||
** Language Support
|
||||
@@ -1078,7 +1062,7 @@ Just "silently" wrap when searching at the bottom of a document.
|
||||
:header-args:elisp: :tangle target/emacs-languages.el
|
||||
:END:
|
||||
|
||||
#+BEGIN_SRC nix
|
||||
#+BEGIN_SRC nix :tangle target/emacs-languages.nix
|
||||
{
|
||||
programs.emacs = {
|
||||
enable = true;
|
||||
@@ -1090,7 +1074,6 @@ Just "silently" wrap when searching at the bottom of a document.
|
||||
lua-mode
|
||||
nix-mode
|
||||
rust-mode
|
||||
smartparens
|
||||
sly
|
||||
sly-macrostep
|
||||
sql-indent
|
||||
@@ -1110,9 +1093,8 @@ available? It seems to work for now anyway...
|
||||
#+BEGIN_SRC elisp
|
||||
(electric-pair-mode 1)
|
||||
|
||||
(use-package prog-mode
|
||||
:config
|
||||
(defun prog-fill-reindent-defun (&optional argument)
|
||||
(require 'prog-mode)
|
||||
(defun my-prog-fill-reindent-defun (&optional argument)
|
||||
"Refill or reindent the paragraph or defun that contains point.
|
||||
|
||||
If the point is in a string or a comment, fill the paragraph that
|
||||
@@ -1134,61 +1116,82 @@ available? It seems to work for now anyway...
|
||||
(beginning-of-defun)
|
||||
(let ((start (point)))
|
||||
(end-of-defun)
|
||||
(indent-region start (point) nil)))))))
|
||||
#+END_SRC
|
||||
(indent-region start (point) nil))))))
|
||||
|
||||
#+BEGIN_SRC elisp
|
||||
(use-package nix-mode
|
||||
:mode "\\.nix\\'")
|
||||
(advice-add 'prog-fill-reindent-defun :override #'my-prog-fill-reindent-defun)
|
||||
|
||||
(require 'flymake)
|
||||
(bind-keys :map prog-mode-map
|
||||
("C-c D" . flymake-show-project-diagnostics)
|
||||
("M-n" . flymake-goto-next-error)
|
||||
("M-p" . flymake-goto-prev-error))
|
||||
|
||||
(setq-default indent-tabs-mode nil)
|
||||
(setq-default tab-width 4)
|
||||
(global-tree-sitter-mode 1)
|
||||
(setq-default fill-column 100)
|
||||
|
||||
(defun jf-init-fill-column ()
|
||||
(display-fill-column-indicator-mode 1))
|
||||
(add-hook 'prog-mode-hook 'jf-init-fill-column)
|
||||
|
||||
(setopt eglot-ignored-server-capabilities '(:inlayHintProvider))
|
||||
(add-hook 'eglot-managed-mode-hook (lambda () (eglot-inlay-hints-mode -1)) nil t)
|
||||
(require 'eglot)
|
||||
(bind-keys :map eglot-mode-map
|
||||
("C-c A" . eglot-code-actions)
|
||||
("C-c R" . eglot-rename)
|
||||
("C-c I" . eglot-find-implementation))
|
||||
|
||||
(setopt ediff-split-window-function 'split-window-horizontally)
|
||||
|
||||
(use-package nix-flake
|
||||
:bind ("C-x p n" . project-nix-flake)
|
||||
:config
|
||||
(defun project-nix-flake ()
|
||||
(interactive)
|
||||
(nix-flake (project-root (project-current t)))))
|
||||
(nix-flake (project-root (project-current t))))
|
||||
(bind-keys ("C-x p n" . project-nix-flake))
|
||||
#+END_SRC
|
||||
|
||||
(use-package lua-mode
|
||||
:mode "\\.lua\\'")
|
||||
*** Rust
|
||||
#+BEGIN_SRC elisp
|
||||
;; (setq major-mode-remap-alist '((rust-mode . rust-mode)))
|
||||
|
||||
(use-package jenkinsfile-mode
|
||||
:mode "\\.jenkinsfile\\'")
|
||||
(setopt rust-mode-treesitter-derive t)
|
||||
|
||||
(setq major-mode-remap-alist '((rust-mode . rust-mode)))
|
||||
|
||||
(use-package rust-mode
|
||||
:init (setq rust-mode-treesitter-derive t))
|
||||
(require 'rust-ts-mode)
|
||||
(bind-keys :map rust-ts-mode-map
|
||||
("C-c u" . string-inflection-rust-style-cycle))
|
||||
#+END_SRC
|
||||
|
||||
*** YAML
|
||||
#+BEGIN_SRC elisp
|
||||
(defun yaml-validate ()
|
||||
(interactive)
|
||||
(compile (concat "yamllint -d '{extends: default, rules: {indentation: {indent-sequences: false}, braces: {max-spaces-inside: 1}}}' " (buffer-file-name)) t))
|
||||
|
||||
(use-package yaml-ts-mode
|
||||
:mode "\\.yaml\\'")
|
||||
(add-hook 'yaml-ts-mode-hook 'yaml-pro-ts-mode)
|
||||
#+END_SRC
|
||||
|
||||
(use-package yaml-pro
|
||||
:hook (yaml-ts-mode . yaml-pro-ts-mode))
|
||||
*** Lisp
|
||||
#+BEGIN_SRC elisp
|
||||
(setopt inferior-lisp-program "sbcl")
|
||||
|
||||
(use-package sly
|
||||
:hook lisp-mode-hook
|
||||
:custom
|
||||
(inferior-lisp-program "sbcl"))
|
||||
(setopt lispy-compat '(god-mode edebug))
|
||||
(add-hook 'emacs-lisp-mode-hook (lambda () (lispy-mode 1)))
|
||||
(add-hook 'lisp-mode-hook (lambda () (lispy-mode 1)))
|
||||
(require 'lispy)
|
||||
(bind-keys :map lispy-mode-map
|
||||
("i" . (lambda ()
|
||||
(interactive)
|
||||
(if god-global-mode
|
||||
(god-mode-all -1)
|
||||
(special-lispy-tab)))))
|
||||
#+END_SRC
|
||||
|
||||
(use-package sly-macrostep
|
||||
:defer t
|
||||
:after sly
|
||||
:init
|
||||
(add-to-list 'sly-contribs 'sly-macrostep))
|
||||
|
||||
(use-package consult-eglot
|
||||
:commands
|
||||
consult-eglot-symbols)
|
||||
|
||||
(use-package typescript-ts-mode
|
||||
:mode "\\.ts\\'" ("\\.tsx\\'" . tsx-ts-mode)
|
||||
:custom
|
||||
(typescript-ts-mode-indent-offset 4)
|
||||
(defun tsx-ts-mode--indent-compatibility-b893426 ()
|
||||
*** Typescript
|
||||
#+BEGIN_SRC elisp
|
||||
(setopt typescript-ts-mode-indent-offset 4)
|
||||
(require 'typescript-ts-mode)
|
||||
(defun my-tsx-ts-mode--indent-compatibility-b893426 ()
|
||||
"Indent rules helper, to handle different releases of tree-sitter-tsx.
|
||||
Check if a node type is available, then return the right indent rules."
|
||||
;; handle https://github.com/tree-sitter/tree-sitter-typescript/commit/b893426b82492e59388a326b824a346d829487e8
|
||||
@@ -1198,78 +1201,21 @@ available? It seems to work for now anyway...
|
||||
((parent-is "jsx_fragment") parent typescript-ts-mode-indent-offset)))
|
||||
(treesit-query-error
|
||||
`(((match "<" "jsx_text") parent 0)
|
||||
((parent-is "jsx_text") grand-parent typescript-ts-mode-indent-offset))))))
|
||||
((parent-is "jsx_text") grand-parent typescript-ts-mode-indent-offset)))))
|
||||
(advice-add 'tsx-ts-mode--indent-compatibility-b893426 :override #'my-tsx-ts-mode--indent-compatibility-b893426)
|
||||
#+END_SRC
|
||||
|
||||
(use-package rust-ts-mode
|
||||
:mode "\\.rs\\'"
|
||||
:config
|
||||
(bind-keys :map rust-ts-mode-map
|
||||
("C-c u" . string-inflection-rust-style-cycle)))
|
||||
|
||||
(use-package java-ts-mode
|
||||
:mode "\\.java\\'"
|
||||
:config
|
||||
*** Java
|
||||
#+BEGIN_SRC elisp
|
||||
(require 'java-ts-mode)
|
||||
(bind-keys :map java-ts-mode-map
|
||||
("C-c u" . string-inflection-java-style-cycle))
|
||||
(push `((n-p-gp nil "block" "lambda_expression") parent-bol java-ts-mode-indent-offset)
|
||||
(cdar java-ts-mode--indent-rules))
|
||||
(push `((n-p-gp "}" "block" "lambda_expression") parent-bol 0)
|
||||
(cdar java-ts-mode--indent-rules)))
|
||||
(cdar java-ts-mode--indent-rules))
|
||||
|
||||
(use-package sql-indent
|
||||
:hook (sql-mode-hook . sqlind-minor-mode))
|
||||
|
||||
(use-package haskell-ts-mode
|
||||
:mode "\\.hs\\'"
|
||||
:custom (haskell-ts-use-indent tc))
|
||||
|
||||
(use-package flymake
|
||||
:bind
|
||||
(:map prog-mode-map
|
||||
("C-c D" . flymake-show-project-diagnostics)
|
||||
("M-n" . flymake-goto-next-error)
|
||||
("M-p" . flymake-goto-prev-error)))
|
||||
|
||||
(use-package eglot
|
||||
:commands eglot
|
||||
:custom
|
||||
(eglot-ignored-server-capabilities '(:inlayHintProvider))
|
||||
:config
|
||||
(bind-keys :map eglot-mode-map
|
||||
("C-c A" . eglot-code-actions)
|
||||
("C-c R" . eglot-rename)
|
||||
("C-c I" . eglot-find-implementation))
|
||||
|
||||
(add-hook 'eglot-managed-mode-hook (lambda () (eglot-inlay-hints-mode -1)) nil t))
|
||||
|
||||
(use-package lispy
|
||||
:hook (emacs-lisp-mode lisp-mode)
|
||||
:init (setq lispy-compat '(god-mode edebug))
|
||||
:config
|
||||
(bind-keys :map lispy-mode-map
|
||||
("i" . (lambda ()
|
||||
(interactive)
|
||||
(if god-global-mode
|
||||
(god-mode-all -1)
|
||||
(special-lispy-tab))))))
|
||||
|
||||
(use-package smartparens
|
||||
:hook
|
||||
emacs-lisp-mode
|
||||
common-lisp-mode
|
||||
:config
|
||||
(add-to-list 'sp-lisp-modes 'sly-mrepl-mode)
|
||||
(require 'smartparens-config)
|
||||
(setq sp-highlight-pair-overlay nil
|
||||
sp-highlight-wrap-overlay nil
|
||||
sp-highlight-wrap-tag-overlay nil))
|
||||
|
||||
(setq-default indent-tabs-mode nil)
|
||||
(setq-default tab-width 4)
|
||||
(global-tree-sitter-mode 1)
|
||||
(setq-default fill-column 100)
|
||||
(defun jf-init-fill-column ()
|
||||
(display-fill-column-indicator-mode 1))
|
||||
(add-hook 'java-mode-hook (lambda () (c-set-offset 'arglist-intro '+)))
|
||||
|
||||
(defvar jf/class-name-to-file-search-path (list "src/main/java" "src/test/java"))
|
||||
|
||||
@@ -1291,21 +1237,16 @@ available? It seems to work for now anyway...
|
||||
; ("^[[:space:]]*at \\(\\(?:[[:lower:]]+\\.\\)+\\)[^(]+(\\([[:alnum:]]+\\)\\.java:\\([[:digit:]]+\\))"
|
||||
; jf/compile-class-to-file 3)))
|
||||
;(add-to-list 'compilation-error-regexp-alist 'java-stack-trace)
|
||||
#+END_SRC
|
||||
|
||||
(add-hook 'prog-mode-hook 'jf-init-fill-column)
|
||||
(add-hook 'java-mode-hook (lambda () (c-set-offset 'arglist-intro '+)))
|
||||
*** SQL
|
||||
#+BEGIN_SRC elisp
|
||||
(add-hook 'sql-mode-hook 'sqlind-minor-mode)
|
||||
#+END_SRC
|
||||
|
||||
;; (dolist (hook
|
||||
;; (list 'grep-mode-hook
|
||||
;; 'flymake-project-diagnostics-mode-hook
|
||||
;; 'xref--xref-buffer-mode-hook
|
||||
;; 'embark-collect-mode-hook
|
||||
;; 'compilation-mode-hook
|
||||
;; 'sly-mrepl-mode-hook
|
||||
;; 'eglot-list-connections-mode-hook))
|
||||
;; (add-hook hook 'tab-line-mode))
|
||||
|
||||
(setq ediff-split-window-function 'split-window-horizontally)
|
||||
*** Haskell
|
||||
#+BEGIN_SRC elisp
|
||||
(setopt haskell-ts-use-indent t)
|
||||
#+END_SRC
|
||||
|
||||
** Envrc
|
||||
@@ -1326,10 +1267,8 @@ available? It seems to work for now anyway...
|
||||
#+END_SRC
|
||||
|
||||
#+BEGIN_SRC elisp
|
||||
(use-package envrc
|
||||
:hook (after-init . envrc-global-mode)
|
||||
:custom
|
||||
(envrc-show-summary-in-minibuffer nil))
|
||||
(add-hook 'after-init-hook 'envrc-global-mode)
|
||||
(setopt envrc-show-summary-in-minibuffer nil)
|
||||
#+END_SRC
|
||||
|
||||
** Magit
|
||||
@@ -1354,34 +1293,26 @@ available? It seems to work for now anyway...
|
||||
#+END_SRC
|
||||
|
||||
#+BEGIN_SRC elisp
|
||||
(use-package magit
|
||||
:defer nil
|
||||
:bind (("C-x g" . magit-status)
|
||||
("s-g" . magit-status)
|
||||
("C-x M-g" . magit-dispatch)
|
||||
("C-c M-g" . magit-file-dispatch))
|
||||
:custom
|
||||
(magit-save-repository-buffers 'dontask)
|
||||
(magit-commit-show-diff nil)
|
||||
:config
|
||||
(setopt magit-define-global-key-bindings 'recommended)
|
||||
(bind-keys ("s-g" . magit-status))
|
||||
|
||||
(setopt magit-save-repository-buffers 'dontask)
|
||||
(setopt magit-commit-show-diff nil)
|
||||
(with-eval-after-load 'magit
|
||||
(set-face-attribute 'git-commit-summary nil :inherit nil)
|
||||
(defun magit-fetch-all-on-load ()
|
||||
(magit-run-git-async "fetch" "--all"))
|
||||
(add-hook 'magit-status-mode-hook 'magit-fetch-all-on-load)
|
||||
(remove-hook 'magit-status-headers-hook 'magit-insert-tags-header))
|
||||
(remove-hook 'magit-status-headers-hook 'magit-insert-tags-header)
|
||||
(require 'forge)
|
||||
(add-hook 'magit-post-refresh-hook 'diff-hl-magit-post-refresh))
|
||||
|
||||
(use-package forge
|
||||
:after magit
|
||||
:custom
|
||||
(forge-edit-post-hook '(forge-create-pullreq-insert-single-commit-message))
|
||||
(forge-status-buffer-default-topic-filters
|
||||
(with-eval-after-load 'forge
|
||||
(add-hook 'forge-edit-post-hook 'forge-create-pullreq-insert-single-commit-message)
|
||||
(setopt forge-status-buffer-default-topic-filters
|
||||
(forge--topics-spec :type 'topic :active nil :state 'open :order 'newest)))
|
||||
|
||||
(use-package diff-hl
|
||||
:after magit
|
||||
:config
|
||||
(global-diff-hl-mode)
|
||||
(add-hook 'magit-post-refresh-hook 'diff-hl-magit-post-refresh))
|
||||
#+END_SRC
|
||||
|
||||
** Vertico
|
||||
@@ -1408,8 +1339,7 @@ available? It seems to work for now anyway...
|
||||
#+END_SRC
|
||||
|
||||
#+BEGIN_SRC elisp
|
||||
(use-package consult
|
||||
:bind (
|
||||
(bind-keys
|
||||
;; ("C-c M-x" . consult-mode-command)
|
||||
("C-c h" . consult-history)
|
||||
;; ("C-c k" . consult-kmacro)
|
||||
@@ -1451,15 +1381,16 @@ available? It seems to work for now anyway...
|
||||
:map minibuffer-local-map
|
||||
("M-s" . consult-history)
|
||||
("M-r" . consult-history))
|
||||
:hook (completion-list-mode . consult-preview-at-point-mode)
|
||||
:init
|
||||
(advice-add #'register-preview :override #'consult-register-window)
|
||||
(setq register-preview-delay 0.5)
|
||||
|
||||
(setq xref-show-xrefs-function #'consult-xref xref-show-definitions-function #'consult-xref)
|
||||
(add-hook 'completion-list-mode-hook 'consult-preview-at-point-mode)
|
||||
|
||||
:config
|
||||
(advice-add 'register-preview :override #'consult-register-window)
|
||||
(setopt register-preview-delay 0.5)
|
||||
|
||||
(setopt xref-show-xrefs-function 'consult-xref)
|
||||
(setopt xref-show-definitions-function 'consult-xref)
|
||||
|
||||
(require 'consult)
|
||||
(consult-customize
|
||||
consult-theme :preview-key '(:debounce 0.2 any)
|
||||
consult-ripgrep consult-git-grep consult-grep consult-man
|
||||
@@ -1469,44 +1400,25 @@ available? It seems to work for now anyway...
|
||||
;; :preview-key "M-."
|
||||
:preview-key '(:debounce 0.4 any))
|
||||
|
||||
(setq consult-narrow-key "<") ;; "C-+"
|
||||
)
|
||||
(setopt consult-narrow-key "<") ;; "C-+"
|
||||
|
||||
(use-package vertico
|
||||
:custom
|
||||
(vertico-count 25)
|
||||
:config
|
||||
(vertico-mode))
|
||||
(setopt vertico-count 25)
|
||||
(vertico-mode)
|
||||
|
||||
;; (use-package vertico-buffer
|
||||
;; :after vertico
|
||||
;; :config
|
||||
;; (vertico-buffer-mode))
|
||||
(setopt completion-styles '(orderless basic))
|
||||
|
||||
(use-package orderless
|
||||
:custom
|
||||
(completion-styles '(orderless basic)))
|
||||
(marginalia-mode)
|
||||
|
||||
(use-package marginalia
|
||||
:config
|
||||
(marginalia-mode))
|
||||
|
||||
(use-package corfu
|
||||
:custom
|
||||
(corfu-cycle t)
|
||||
(corfu-popupinfo-mode)
|
||||
(corfu-quit-at-boundary nil)
|
||||
(corfu-on-exact-match 'show)
|
||||
:config
|
||||
(global-corfu-mode))
|
||||
(setopt corfu-cycle t)
|
||||
(setopt corfu-popupinfo-mode nil)
|
||||
(setopt corfu-quit-at-boundary nil)
|
||||
(setopt corfu-on-exact-match 'show)
|
||||
(global-corfu-mode)
|
||||
|
||||
;; Consult users will also want the embark-consult package.
|
||||
(use-package embark-consult
|
||||
:hook (embark-collect-mode . consult-preview-at-point-mode))
|
||||
(add-hook 'embark-collect-mode-hook 'consult-preview-at-point-mode)
|
||||
|
||||
(use-package cape
|
||||
:config
|
||||
(add-hook 'completion-at-point-functions #'cape-file))
|
||||
(add-hook 'completion-at-point-functions 'cape-file)
|
||||
#+END_SRC
|
||||
|
||||
** Org
|
||||
@@ -1532,23 +1444,14 @@ available? It seems to work for now anyway...
|
||||
#+END_SRC
|
||||
|
||||
#+BEGIN_SRC elisp
|
||||
(use-package org
|
||||
:defer nil
|
||||
:mode ("\\.org\\'" . org-mode)
|
||||
:bind (("C-c a" . org-agenda)
|
||||
(require 'org)
|
||||
|
||||
(bind-keys ("C-c a" . org-agenda)
|
||||
("C-c c" . org-capture)
|
||||
("C-c l" . org-store-id-link))
|
||||
:config
|
||||
("C-c l" . org-id-store-link))
|
||||
|
||||
(add-hook 'org-mode-hook 'visual-line-mode)
|
||||
(setq org-link-keep-stored-after-insertion t
|
||||
org-todo-keywords
|
||||
'((sequence
|
||||
"TODO(o)"
|
||||
"IN_PROGRESS(p!)"
|
||||
"WAITING(w@)"
|
||||
"|"
|
||||
"DONE(d!)"
|
||||
"CANCELLED(c@)"))
|
||||
(setopt org-link-keep-stored-after-insertion t
|
||||
org-capture-templates
|
||||
'(("t" "Todo" entry
|
||||
(here)
|
||||
@@ -1579,12 +1482,13 @@ available? It seems to work for now anyway...
|
||||
(set-face-attribute 'org-level-5 nil :font "Iosevka Aile")
|
||||
(set-face-attribute 'org-level-6 nil :font "Iosevka Aile")
|
||||
(set-face-attribute 'org-level-7 nil :font "Iosevka Aile")
|
||||
(set-face-attribute 'org-level-8 nil :font "Iosevka Aile"))
|
||||
(set-face-attribute 'org-level-8 nil :font "Iosevka Aile")
|
||||
|
||||
(use-package org-present
|
||||
:defer nil
|
||||
:commands (org-present)
|
||||
:config
|
||||
(require 'org-present)
|
||||
(require 'face-remap)
|
||||
(require 'visual-fill-column)
|
||||
|
||||
(defvar-local my/org-present-face-remapping-cookies nil)
|
||||
(defun my/org-present-start ()
|
||||
(setq-local my/org-present-face-remapping-cookies nil)
|
||||
;; Tweak font sizes
|
||||
@@ -1636,26 +1540,21 @@ available? It seems to work for now anyway...
|
||||
)
|
||||
|
||||
(add-hook 'org-present-mode-hook 'my/org-present-start)
|
||||
(add-hook 'org-present-mode-quit-hook 'my/org-present-end))
|
||||
(add-hook 'org-present-mode-quit-hook 'my/org-present-end)
|
||||
|
||||
(use-package org-roam
|
||||
:bind (("C-c n l" . org-roam-buffer-toggle)
|
||||
(require 'org-roam)
|
||||
(bind-keys ("C-c n l" . org-roam-buffer-toggle)
|
||||
("C-c n f" . org-roam-node-find)
|
||||
("C-c n g" . org-roam-graph)
|
||||
("C-c n i" . org-roam-node-insert)
|
||||
("C-c n c" . org-roam-capture))
|
||||
:config
|
||||
|
||||
;; (setq org-roam-node-display-template (concat "${title:*} " (propertize "${tags:10}" 'face 'org-tag)))
|
||||
(org-roam-db-autosync-mode))
|
||||
(org-roam-db-autosync-mode)
|
||||
|
||||
(use-package org-modern
|
||||
:hook org-mode-hook)
|
||||
(add-hook 'org-mode-hook 'org-modern-mode)
|
||||
|
||||
(use-package verb
|
||||
:after org
|
||||
:bind-keymap
|
||||
(:map org-mode-map
|
||||
("C-c C-r" . verb-command-map)))
|
||||
(define-key org-mode-map (kbd "C-c C-r") verb-command-map)
|
||||
#+END_SRC
|
||||
|
||||
** Terminal
|
||||
@@ -1676,9 +1575,7 @@ available? It seems to work for now anyway...
|
||||
#+END_SRC
|
||||
|
||||
#+BEGIN_SRC elisp
|
||||
(use-package eat
|
||||
:config
|
||||
(eat-eshell-mode))
|
||||
(eat-eshell-mode)
|
||||
#+END_SRC
|
||||
|
||||
** Slack
|
||||
@@ -1686,7 +1583,7 @@ available? It seems to work for now anyway...
|
||||
:header-args:elisp: :tangle target/emacs-slack.el
|
||||
:END:
|
||||
|
||||
#+BEGIN_SRC nix
|
||||
#+BEGIN_SRC nix :tangle target/emacs-slack.nix
|
||||
{
|
||||
programs.emacs = {
|
||||
enable = true;
|
||||
@@ -1694,22 +1591,14 @@ available? It seems to work for now anyway...
|
||||
slack
|
||||
];
|
||||
extraConfig = builtins.readFile ./emacs-slack.el;
|
||||
}
|
||||
};
|
||||
}
|
||||
#+END_SRC
|
||||
|
||||
#+BEGIN_SRC elisp
|
||||
(use-package lui
|
||||
:defer t
|
||||
:custom
|
||||
(lui-time-stamp-format "[%Y-%m-%d %H:%M]"))
|
||||
|
||||
(use-package slack
|
||||
:commands
|
||||
slack-start
|
||||
:custom
|
||||
(slack-render-profile-images-p nil)
|
||||
(slack-buffer-function #'switch-to-buffer()))
|
||||
(setopt lui-time-stamp-format "[%Y-%m-%d %H:%M]")
|
||||
(setopt slack-render-profile-images-p nil)
|
||||
(setopt slack-buffer-function #'switch-to-buffer)
|
||||
#+END_SRC
|
||||
|
||||
** Kubernetes
|
||||
@@ -1766,13 +1655,10 @@ available? It seems to work for now anyway...
|
||||
#+END_SRC
|
||||
|
||||
#+BEGIN_SRC elisp
|
||||
(use-package age
|
||||
:custom
|
||||
(age-default-identity "~/source/dotfiles/keys/yubi1age.txt")
|
||||
(age-default-recipient "~/source/dotfiles/keys/myself.txt")
|
||||
:config
|
||||
(setopt age-default-identity "~/source/dotfiles/keys/yubi1age.txt")
|
||||
(setopt age-default-recipient "~/source/dotfiles/keys/myself.txt")
|
||||
(setenv "PINENTRY_PROGRAM" "pinentry-mac")
|
||||
(age-file-enable))
|
||||
(age-file-enable)
|
||||
#+END_SRC
|
||||
|
||||
* Theme
|
||||
@@ -1882,11 +1768,9 @@ I like Catppuccin Frappe as my theme. Let's use it in as many places as we can.
|
||||
#+END_SRC
|
||||
|
||||
#+BEGIN_SRC elisp
|
||||
(use-package catppuccin-theme
|
||||
:custom
|
||||
(catppuccin-flavor 'frappe)
|
||||
:config
|
||||
(load-theme 'catppuccin :no-confirm))
|
||||
(require 'catppuccin-theme)
|
||||
(setopt catppuccin-flavor 'frappe)
|
||||
(load-theme 'catppuccin :no-confirm)
|
||||
|
||||
;; (set-face-attribute 'default nil :font "JetBrainsMono Nerd Font" :height 130)
|
||||
;; (set-face-attribute 'fixed-pitch nil :font "JetBrainsMono Nerd Font" :height 130)
|
||||
|
||||
Reference in New Issue
Block a user