Switching to old output files
This commit is contained in:
+250
-223
@@ -1,3 +1,15 @@
|
||||
(setq use-package-always-defer t)
|
||||
|
||||
(use-package emacs
|
||||
:defer nil
|
||||
:config
|
||||
(setq-default fill-column 120)
|
||||
(setq-default tab-width 4))
|
||||
|
||||
(use-package simple
|
||||
:config
|
||||
(setq-default indent-tabs-mode nil))
|
||||
|
||||
(setopt save-interprogram-paste-before-kill t)
|
||||
(setopt enable-recursive-minibuffers t)
|
||||
(setopt line-spacing 0.15)
|
||||
@@ -27,8 +39,6 @@
|
||||
|
||||
(column-number-mode t)
|
||||
|
||||
(which-key-mode)
|
||||
|
||||
(setopt dired-auto-revert-buffer t)
|
||||
|
||||
(global-hl-line-mode)
|
||||
@@ -120,6 +130,34 @@
|
||||
|
||||
(setopt compilation-scroll-output 'first-error)
|
||||
|
||||
(use-package minibuffer
|
||||
:bind (:map minibuffer-local-map
|
||||
("M-s" . consult-history)
|
||||
("M-r" . consult-history) )
|
||||
:custom
|
||||
(completion-styles '(orderless basic)))
|
||||
|
||||
(use-package xref
|
||||
:custom
|
||||
(xref-show-xrefs-function 'consult-xref)
|
||||
(xref-show-definitions-function 'consult-xref))
|
||||
|
||||
(use-package register
|
||||
:custom
|
||||
(register-preview-delay 0.5)
|
||||
:config
|
||||
(advice-add 'register-preview :override #'consult-register-window))
|
||||
|
||||
(use-package isearch
|
||||
:bind
|
||||
(:map isearch-mode-map
|
||||
("M-e" . consult-isearch-history)
|
||||
("M-s e" . consult-isearch-history)
|
||||
("M-s l" . consult-line)
|
||||
("M-s L" . consult-line-multi))
|
||||
:custom
|
||||
(isearch-wrap-pause 'no-ding))
|
||||
|
||||
(defun jf/window-children (window)
|
||||
(let ((result nil)
|
||||
(child (window-child window)))
|
||||
@@ -352,21 +390,23 @@ falls back to the outer one first."
|
||||
;; (evil-org-set-key-theme '(navigation insert textobjects additional calendar))
|
||||
;; (require 'evil-org-agenda)
|
||||
;; (evil-org-agenda-set-keys)
|
||||
(require 'god-mode)
|
||||
(require 'which-key)
|
||||
(use-package god-mode
|
||||
:bind (("<escape>" . (lambda () (interactive) (god-mode-all 1)))
|
||||
:map god-local-mode-map
|
||||
("i" . (lambda () (interactive) (god-mode-all -1)))
|
||||
("z" . repeat)))
|
||||
|
||||
(bind-keys :map god-local-mode-map
|
||||
("i" . (lambda () (interactive) (god-mode-all -1)))
|
||||
("z" . repeat))
|
||||
(bind-keys ("<escape>" . (lambda () (interactive) (god-mode-all 1))))
|
||||
(defun my-god-mode-update-cursor-type ()
|
||||
(setq cursor-type (cond
|
||||
((and (featurep 'org-present) org-present-mode) nil)
|
||||
((or (and (featurep 'god-mode) god-local-mode) buffer-read-only) 'box)
|
||||
(t 'bar))))
|
||||
|
||||
(add-hook 'post-command-hook 'my-god-mode-update-cursor-type)
|
||||
(which-key-enable-god-mode-support)
|
||||
|
||||
(use-package which-key
|
||||
:hook after-init
|
||||
:config
|
||||
(which-key-enable-god-mode-support))
|
||||
|
||||
(defun avy-goto-char-timer-embark ()
|
||||
(interactive)
|
||||
@@ -382,19 +422,13 @@ falls back to the outer one first."
|
||||
(avy-goto-char-timer)))
|
||||
|
||||
(bind-keys
|
||||
("C-j" . avy-goto-char-timer)
|
||||
("M-j" . avy-goto-char-timer-embark)
|
||||
("C-." . embark-act))
|
||||
("M-j" . avy-goto-char-timer-embark))
|
||||
|
||||
(with-eval-after-load 'lispy
|
||||
(bind-keys :map lispy-mode-map
|
||||
("C-j" . avy-goto-char-timer)))
|
||||
(use-package avy
|
||||
:bind (("C-j" . avy-goto-char-timer)))
|
||||
|
||||
(with-eval-after-load 'org
|
||||
(bind-keys :map org-mode-map
|
||||
("C-j" . avy-goto-char-timer)))
|
||||
|
||||
(setopt isearch-wrap-pause 'no-ding)
|
||||
(use-package embark
|
||||
:bind (("C-." . embark-act)))
|
||||
|
||||
(defun string-inflection-rust-style-cycle-function (str)
|
||||
(cond
|
||||
@@ -416,36 +450,44 @@ falls back to the outer one first."
|
||||
(bind-keys :repeat-map string-inflection-rust-map
|
||||
("u" . string-inflection-rust-style-cycle))
|
||||
|
||||
(bind-keys ("C-x 4 n" . edit-indirect-region))
|
||||
(use-package edit-indirect
|
||||
:bind (("C-x 4 n" . edit-indirect-region)))
|
||||
|
||||
(with-eval-after-load 'apheleia
|
||||
(use-package apheleia
|
||||
:config
|
||||
(push '(prisma-format "prisma" "format" "--schema" filepath) apheleia-formatters))
|
||||
|
||||
(buffer-terminator-mode 1)
|
||||
(use-package buffer-terminator
|
||||
:hook after-init)
|
||||
|
||||
(bind-keys
|
||||
("s-b" . consult-project-buffer))
|
||||
(use-package elec-pair
|
||||
:hook (after-init . electric-pair-mode))
|
||||
|
||||
(electric-pair-mode 1)
|
||||
(use-package tree-sitter
|
||||
:hook (after-init . global-tree-sitter-mode))
|
||||
|
||||
(setq-default indent-tabs-mode nil)
|
||||
(setq-default tab-width 4)
|
||||
(global-tree-sitter-mode 1)
|
||||
|
||||
(setopt ediff-split-window-function 'split-window-horizontally)
|
||||
(use-package ediff-wind
|
||||
:custom
|
||||
(ediff-split-window-function 'split-window-horizontally))
|
||||
|
||||
(defun project-nix-flake ()
|
||||
(interactive)
|
||||
(nix-flake (project-root (project-current t))))
|
||||
(bind-keys ("C-x p n" . project-nix-flake))
|
||||
|
||||
(setq-default fill-column 120)
|
||||
(use-package ansi-color
|
||||
:hook
|
||||
(compilation-filter . ansi-color-compilation-filter))
|
||||
|
||||
(defun jf-init-fill-column ()
|
||||
(display-fill-column-indicator-mode 1))
|
||||
(add-hook 'prog-mode-hook 'jf-init-fill-column)
|
||||
(use-package display-fill-column-indicator
|
||||
:hook (prog-mode))
|
||||
|
||||
(with-eval-after-load 'prog-mode
|
||||
(use-package prog-mode
|
||||
:bind (:map prog-mode-map
|
||||
("C-c D" . flymake-show-project-diagnostics)
|
||||
("M-n" . flymake-goto-next-error)
|
||||
("M-p" . flymake-goto-prev-error))
|
||||
:config
|
||||
(defun my-prog-fill-reindent-defun (&optional argument)
|
||||
"Refill or reindent the paragraph or defun that contains point.
|
||||
|
||||
@@ -472,72 +514,89 @@ or follows point."
|
||||
|
||||
(advice-add 'prog-fill-reindent-defun :override #'my-prog-fill-reindent-defun))
|
||||
|
||||
(add-hook 'compilation-filter-hook 'ansi-color-compilation-filter)
|
||||
|
||||
(autoload 'flymake-show-project-diagnostics "flymake")
|
||||
(autoload 'flymake-goto-next-error "flymake")
|
||||
(autoload 'flymake-goto-prev-error "flymake")
|
||||
|
||||
(with-eval-after-load 'prog-mode
|
||||
(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)))
|
||||
|
||||
(with-eval-after-load 'flymake
|
||||
(bind-keys :map flymake-project-diagnostics-mode-map
|
||||
("q" . quit-window)))
|
||||
|
||||
(setopt eglot-ignored-server-capabilities '(:inlayHintProvider :semanticTokensProvider))
|
||||
(add-hook 'eglot-managed-mode-hook (lambda () (eglot-inlay-hints-mode -1)) nil t)
|
||||
(setopt eglot-code-action-indications nil)
|
||||
(setopt eglot-events-buffer-config '(:size 300000 :format full))
|
||||
|
||||
(with-eval-after-load 'eglot
|
||||
(bind-keys :map eglot-mode-map
|
||||
("C-c a" . eglot-code-actions)
|
||||
("C-c r" . eglot-rename)
|
||||
("C-c i" . eglot-find-implementation)))
|
||||
|
||||
(with-eval-after-load 'eglot
|
||||
(add-to-list 'eglot-stay-out-of 'yasnippet))
|
||||
(use-package flymake
|
||||
:commands (flymake-show-project-diagnostics flymake-goto-next-error flymake-goto-prev-error)
|
||||
:bind (:map flymake-project-diagnostics-mode-map
|
||||
("q" . quit-window)))
|
||||
|
||||
(setq major-mode-remap-alist '((rust-mode . rust-mode)))
|
||||
|
||||
(setopt rust-mode-treesitter-derive t)
|
||||
|
||||
(with-eval-after-load 'rust-prog-mode
|
||||
(bind-keys :map rust-mode-map
|
||||
("C-c u" . string-inflection-rust-style-cycle)))
|
||||
(use-package rust-mode
|
||||
:bind (:map rust-mode-map
|
||||
("C-c u" . string-inflection-rust-style-cycle))
|
||||
:custom
|
||||
(rust-mode-treesitter-derive t))
|
||||
|
||||
(defun yaml-validate ()
|
||||
(interactive)
|
||||
(compile (concat "yamllint -d '{extends: default, rules: {indentation: {indent-sequences: false}, braces: {max-spaces-inside: 1}}}' " (buffer-file-name)) t))
|
||||
|
||||
(add-hook 'yaml-ts-mode-hook 'yaml-pro-ts-mode)
|
||||
(use-package yaml-pro
|
||||
:hook (yaml-ts-mode . yaml-pro-ts-mode))
|
||||
|
||||
(setopt 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)))
|
||||
(add-hook 'lisp-data-mode-hook (lambda () (lispy-mode 1)))
|
||||
(with-eval-after-load 'lispy
|
||||
;; (require 'lispyville)
|
||||
;; (add-hook 'lispy-mode-hook #'lispyville-mode)
|
||||
(bind-keys :map lispy-mode-map
|
||||
("i" . (lambda ()
|
||||
(interactive)
|
||||
(if (and (featurep 'god-mode) god-global-mode)
|
||||
(god-mode-all -1)
|
||||
(special-lispy-tab))))))
|
||||
(use-package lispy
|
||||
:hook (emacs-lisp-mode lisp-mode lisp-data-mode)
|
||||
:bind (:map lispy-mode-map
|
||||
("i" . (lambda ()
|
||||
(interactive)
|
||||
(if (and (featurep 'god-mode) god-global-mode)
|
||||
(god-mode-all -1)
|
||||
(special-lispy-tab))))
|
||||
("C-j" . avy-goto-char-timer))
|
||||
:custom
|
||||
(lispy-compat '(god-mode edebug)))
|
||||
|
||||
(add-to-list 'auto-mode-alist '("\\.ts\\'" . typescript-mode))
|
||||
(add-to-list 'major-mode-remap-alist '(typescript-mode . typescript-ts-mode))
|
||||
(add-to-list 'auto-mode-alist '("\\.tsx\\'" . tsx-mode))
|
||||
(add-to-list 'major-mode-remap-alist '(tsx-mode . tsx-ts-mode))
|
||||
(setopt typescript-ts-mode-indent-offset 2)
|
||||
(with-eval-after-load 'typescript-ts-mode
|
||||
|
||||
(use-package typescript-ts-mode
|
||||
:init
|
||||
(add-to-list 'major-mode-remap-alist '(typescript-mode . typescript-ts-mode))
|
||||
(add-to-list 'major-mode-remap-alist '(tsx-mode . tsx-ts-mode))
|
||||
(defvar my/edit-indirect-tag-modes
|
||||
'(("graphql" . graphql-ts-mode)
|
||||
("gql" . graphql-ts-mode)
|
||||
("sql" . sql-mode)
|
||||
("css" . css-mode))
|
||||
"Map of tagged-template tag names to major modes.")
|
||||
|
||||
(defun my/edit-indirect--node-bounds (node)
|
||||
"Return (BEG . END) for NODE's contents, excluding delimiters."
|
||||
(cons (1+ (treesit-node-start node))
|
||||
(1- (treesit-node-end node))))
|
||||
|
||||
(defun my/edit-indirect-tagged-template-at-point ()
|
||||
(interactive)
|
||||
(let* ((node (treesit-node-at (point)))
|
||||
(tmpl-node (treesit-parent-until
|
||||
node
|
||||
(lambda (n) (equal (treesit-node-type n) "template_string"))))
|
||||
(str-node (unless tmpl-node
|
||||
(treesit-parent-until
|
||||
node
|
||||
(lambda (n) (equal (treesit-node-type n) "string")))))
|
||||
(target-node (or tmpl-node str-node)))
|
||||
(unless target-node
|
||||
(user-error "Point is not inside a string or template literal"))
|
||||
(let* ((tagged-node (and tmpl-node (treesit-node-parent tmpl-node)))
|
||||
(tag-node (and tagged-node
|
||||
(equal (treesit-node-type tagged-node) "call_expression")
|
||||
(treesit-node-child-by-field-name tagged-node "function")))
|
||||
(tag-name (and tag-node (treesit-node-text tag-node t)))
|
||||
(mode (cond
|
||||
(tag-name (or (cdr (assoc tag-name my/edit-indirect-tag-modes))
|
||||
major-mode))
|
||||
(t 'text-mode)))
|
||||
(bounds (my/edit-indirect--node-bounds target-node))
|
||||
(buf (edit-indirect-region (car bounds) (cdr bounds) t)))
|
||||
(with-current-buffer buf
|
||||
(funcall mode)))))
|
||||
:bind
|
||||
(:map typescript-ts-mode-map
|
||||
("C-c '" . my/edit-indirect-tagged-template-at-point)
|
||||
:map tsx-ts-mode-map
|
||||
("C-c '" . my/edit-indirect-tagged-template-at-point))
|
||||
:custom (typescript-ts-mode-indent-offset 2)
|
||||
:config
|
||||
(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."
|
||||
@@ -551,56 +610,26 @@ Check if a node type is available, then return the right indent rules."
|
||||
((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))
|
||||
|
||||
(defvar my/edit-indirect-tag-modes
|
||||
'(("graphql" . graphql-ts-mode)
|
||||
("gql" . graphql-ts-mode)
|
||||
("sql" . sql-mode)
|
||||
("css" . css-mode))
|
||||
"Map of tagged-template tag names to major modes.")
|
||||
|
||||
(defun my/edit-indirect--node-bounds (node)
|
||||
"Return (BEG . END) for NODE's contents, excluding delimiters."
|
||||
(cons (1+ (treesit-node-start node))
|
||||
(1- (treesit-node-end node))))
|
||||
(use-package eglot
|
||||
:bind (:map eglot-mode-map
|
||||
("C-c a" . eglot-code-actions)
|
||||
("C-c r" . eglot-rename)
|
||||
("C-c i" . eglot-find-implementation))
|
||||
:custom
|
||||
(eglot-ignored-server-capabilities '(:inlayHintProvider :semanticTokensProvider))
|
||||
(eglot-code-action-indications nil)
|
||||
(eglot-events-buffer-config '(:size 300000 :format full))
|
||||
:config
|
||||
(add-to-list 'eglot-server-programs '((prisma-ts-mode) "prisma-language-server" "--stdio"))
|
||||
(add-to-list 'eglot-stay-out-of 'yasnippet)
|
||||
(add-hook 'eglot-managed-mode-hook (lambda () (eglot-inlay-hints-mode -1)) nil t))
|
||||
|
||||
(defun my/edit-indirect-tagged-template-at-point ()
|
||||
(interactive)
|
||||
(let* ((node (treesit-node-at (point)))
|
||||
(tmpl-node (treesit-parent-until
|
||||
node
|
||||
(lambda (n) (equal (treesit-node-type n) "template_string"))))
|
||||
(str-node (unless tmpl-node
|
||||
(treesit-parent-until
|
||||
node
|
||||
(lambda (n) (equal (treesit-node-type n) "string")))))
|
||||
(target-node (or tmpl-node str-node)))
|
||||
(unless target-node
|
||||
(user-error "Point is not inside a string or template literal"))
|
||||
(let* ((tagged-node (and tmpl-node (treesit-node-parent tmpl-node)))
|
||||
(tag-node (and tagged-node
|
||||
(equal (treesit-node-type tagged-node) "call_expression")
|
||||
(treesit-node-child-by-field-name tagged-node "function")))
|
||||
(tag-name (and tag-node (treesit-node-text tag-node t)))
|
||||
(mode (cond
|
||||
(tag-name (or (cdr (assoc tag-name my/edit-indirect-tag-modes))
|
||||
major-mode))
|
||||
(t 'text-mode)))
|
||||
(bounds (my/edit-indirect--node-bounds target-node))
|
||||
(buf (edit-indirect-region (car bounds) (cdr bounds) t)))
|
||||
(with-current-buffer buf
|
||||
(funcall mode)))))
|
||||
|
||||
(with-eval-after-load 'typescript-ts-mode
|
||||
(define-key typescript-ts-mode-map (kbd "C-c '") #'my/edit-indirect-tagged-template-at-point)
|
||||
(define-key tsx-ts-mode-map (kbd "C-c '") #'my/edit-indirect-tagged-template-at-point))
|
||||
|
||||
(with-eval-after-load 'eglot
|
||||
(add-to-list 'eglot-server-programs '((prisma-ts-mode) "prisma-language-server" "--stdio")))
|
||||
|
||||
(push '(java-mode . java-ts-mode) major-mode-remap-alist)
|
||||
(with-eval-after-load 'java-ts-mode
|
||||
(bind-keys :map java-ts-mode-map
|
||||
("C-c u" . string-inflection-java-style-cycle))
|
||||
(use-package java-ts-mode
|
||||
:init
|
||||
(push '(java-mode . java-ts-mode) major-mode-remap-alist)
|
||||
:bind (: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)
|
||||
@@ -629,86 +658,84 @@ Check if a node type is available, then return the right indent rules."
|
||||
; jf/compile-class-to-file 3)))
|
||||
;(add-to-list 'compilation-error-regexp-alist 'java-stack-trace)
|
||||
|
||||
(add-hook 'sql-mode-hook 'sqlind-minor-mode)
|
||||
(use-package sql-indent
|
||||
:hook
|
||||
(sql-mode . sqlind-minor-mode))
|
||||
|
||||
(setopt haskell-ts-use-indent t)
|
||||
(use-package haskell-ts-mode
|
||||
:custom
|
||||
(haskell-ts-use-indent t))
|
||||
|
||||
(add-hook 'after-init-hook 'envrc-global-mode)
|
||||
(setopt envrc-show-summary-in-minibuffer nil)
|
||||
(use-package envrc
|
||||
:hook
|
||||
(after-init . envrc-global-mode)
|
||||
:custom
|
||||
(envrc-show-summary-in-minibuffer nil))
|
||||
|
||||
(setopt magit-define-global-key-bindings 'recommended)
|
||||
(bind-keys ("s-g" . magit))
|
||||
|
||||
(setopt magit-save-repository-buffers 'dontask)
|
||||
(setopt magit-commit-show-diff nil)
|
||||
(with-eval-after-load 'magit
|
||||
(use-package magit
|
||||
:bind (("s-g" . magit))
|
||||
:custom
|
||||
(magit-define-global-key-bindings 'recommended)
|
||||
(magit-save-repository-buffers 'dontask)
|
||||
(magit-commit-show-diff nil)
|
||||
:config
|
||||
(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)
|
||||
(require 'forge)
|
||||
(add-hook 'magit-post-refresh-hook 'diff-hl-magit-post-refresh))
|
||||
(remove-hook 'magit-status-headers-hook 'magit-insert-tags-header))
|
||||
|
||||
(with-eval-after-load 'forge
|
||||
(use-package forge
|
||||
:after magit
|
||||
:config
|
||||
(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)))
|
||||
|
||||
(global-diff-hl-mode)
|
||||
(use-package diff-hl
|
||||
:hook
|
||||
((after-init . global-diff-hl-mode)
|
||||
(magit-post-refresh . diff-hl-magit-post-refresh)))
|
||||
|
||||
(bind-keys
|
||||
;; ("C-c M-x" . consult-mode-command)
|
||||
("C-c h" . consult-history)
|
||||
;; ("C-c k" . consult-kmacro)
|
||||
;; ("C-c m" . consult-man)
|
||||
;; ([remap Info-search] . consult-info)
|
||||
(use-package consult
|
||||
:commands (consult-history)
|
||||
:functions (consult-register-window consult-xref)
|
||||
:binds (;; ("C-c M-x" . consult-mode-command)
|
||||
("s-b" . consult-project-buffer)
|
||||
("C-c h" . consult-history)
|
||||
;; ("C-c k" . consult-kmacro)
|
||||
;; ("C-c m" . consult-man)
|
||||
;; ([remap Info-search] . consult-info)
|
||||
|
||||
;; ("C-x M-:" . consult-complex-command)
|
||||
("C-x b" . consult-buffer)
|
||||
("s-B" . consult-buffer)
|
||||
("C-x 4 b" . consult-buffer-other-window)
|
||||
("C-x 5 b" . consult-buffer-other-frame)
|
||||
;; ("C-x t b" . consult-buffer-other-tab)
|
||||
("C-x r b" . consult-bookmark)
|
||||
("C-x p b" . consult-project-buffer)
|
||||
;; ("C-x M-:" . consult-complex-command)
|
||||
("C-x b" . consult-buffer)
|
||||
("s-B" . consult-buffer)
|
||||
("C-x 4 b" . consult-buffer-other-window)
|
||||
("C-x 5 b" . consult-buffer-other-frame)
|
||||
;; ("C-x t b" . consult-buffer-other-tab)
|
||||
("C-x r b" . consult-bookmark)
|
||||
("C-x p b" . consult-project-buffer)
|
||||
|
||||
("M-#" . consult-register-load)
|
||||
("M-'" . consult-register-store)
|
||||
("C-M-#" . consult-register)
|
||||
("M-y" . consult-yank-pop)
|
||||
("M-g e" . consult-compile-error)
|
||||
("M-g f" . consult-flymake)
|
||||
("M-g g" . consult-goto-line)
|
||||
("M-g M-g" . consult-goto-line)
|
||||
("M-g o" . 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 r" . consult-ripgrep)
|
||||
("M-s l" . consult-line)
|
||||
("M-s L" . consult-line-multi)
|
||||
("M-s e" . consult-isearch-history)
|
||||
:map isearch-mode-map
|
||||
("M-e" . consult-isearch-history)
|
||||
("M-s e" . consult-isearch-history)
|
||||
("M-s l" . consult-line)
|
||||
("M-s L" . consult-line-multi)
|
||||
:map minibuffer-local-map
|
||||
("M-s" . consult-history)
|
||||
("M-r" . consult-history))
|
||||
|
||||
(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)
|
||||
|
||||
(eval-when-compile
|
||||
(require 'consult))
|
||||
|
||||
(with-eval-after-load 'consult
|
||||
("M-#" . consult-register-load)
|
||||
("M-'" . consult-register-store)
|
||||
("C-M-#" . consult-register)
|
||||
("M-y" . consult-yank-pop)
|
||||
("M-g e" . consult-compile-error)
|
||||
("M-g f" . consult-flymake)
|
||||
("M-g g" . consult-goto-line)
|
||||
("M-g M-g" . consult-goto-line)
|
||||
("M-g o" . 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 r" . consult-ripgrep)
|
||||
("M-s l" . consult-line)
|
||||
("M-s L" . consult-line-multi)
|
||||
("M-s e" . consult-isearch-history))
|
||||
:custom
|
||||
(consult-narrow-key "<")
|
||||
:config
|
||||
(consult-customize
|
||||
consult-theme :preview-key '(:debounce 0.2 any)
|
||||
consult-ripgrep consult-git-grep consult-grep consult-man
|
||||
@@ -720,38 +747,37 @@ Check if a node type is available, then return the right indent rules."
|
||||
consult-source-project-recent-file
|
||||
:preview-key '(:debounce 0.4 any)))
|
||||
|
||||
(setopt consult-narrow-key "<") ;; "C-+"
|
||||
|
||||
(use-package vertico
|
||||
:hook
|
||||
(after-init . vertico-mode)
|
||||
:custom
|
||||
(vertico-count 25)
|
||||
:config
|
||||
(vertico-mode))
|
||||
|
||||
(setopt completion-styles '(orderless basic))
|
||||
(vertico-count 25))
|
||||
|
||||
(use-package marginalia
|
||||
:config
|
||||
(marginalia-mode))
|
||||
:hook
|
||||
(after-init . marginalia-mode))
|
||||
|
||||
(use-package corfu
|
||||
:hook
|
||||
(after-init . global-corfu-mode)
|
||||
:custom
|
||||
(corfu-cycle t)
|
||||
(corfu-popupinfo-mode nil)
|
||||
(corfu-quit-at-boundary nil)
|
||||
(corfu-on-exact-match 'show)
|
||||
:config
|
||||
(global-corfu-mode))
|
||||
(corfu-on-exact-match 'show))
|
||||
;; (setq completion-in-region-function #'consult-completion-in-region)
|
||||
|
||||
(use-package cape
|
||||
:custom
|
||||
:functions (cape-file)
|
||||
:init
|
||||
(add-hook 'completion-at-point-functions 'cape-file))
|
||||
|
||||
(use-package org
|
||||
:bind (("C-c A" . org-agenda)
|
||||
("C-c C" . org-capture)
|
||||
("C-c l" . org-id-store-link))
|
||||
("C-c l" . org-id-store-link)
|
||||
:map org-mode-map
|
||||
("C-j" . avy-goto-char-timer))
|
||||
:custom
|
||||
(org-babel-load-languages '((emacs-lisp . t) (sql . t)))
|
||||
(org-confirm-babel-evaluate nil)
|
||||
@@ -815,7 +841,7 @@ Check if a node type is available, then return the right indent rules."
|
||||
(org-level-7 :height 3.0)
|
||||
(org-level-8 :height 3.0)))
|
||||
(push (apply #'face-remap-add-relative face) my/org-present-face-remapping-cookies))
|
||||
|
||||
|
||||
;; Set a blank header line string to create blank space at the top
|
||||
(setq header-line-format " ")
|
||||
|
||||
@@ -833,7 +859,7 @@ Check if a node type is available, then return the right indent rules."
|
||||
;; Reset font customizations
|
||||
(dolist (cookie my/org-present-face-remapping-cookies)
|
||||
(face-remap-remove-relative cookie))
|
||||
|
||||
|
||||
;; Clear the header line string so that it isn't displayed
|
||||
(setq header-line-format nil)
|
||||
|
||||
@@ -869,12 +895,13 @@ Check if a node type is available, then return the right indent rules."
|
||||
:hook (eshell-load-hook . eat-eshell-mode))
|
||||
|
||||
(use-package age
|
||||
:hook
|
||||
(after-init . age-file-enable)
|
||||
:custom
|
||||
(age-default-identity "~/source/dotfiles/keys/yubi1age.txt")
|
||||
(age-default-recipient "~/source/dotfiles/keys/myself.txt")
|
||||
:config
|
||||
(setenv "PINENTRY_PROGRAM" "pinentry-mac")
|
||||
(age-file-enable))
|
||||
(setenv "PINENTRY_PROGRAM" "pinentry-mac"))
|
||||
|
||||
(use-package claude-code
|
||||
:bind-keymap ("C-c c" . claude-code-command-map)
|
||||
|
||||
Reference in New Issue
Block a user