Fix: Use the default function for consult-project-function

This commit is contained in:
Vedang Manerikar 2024-12-13 21:33:02 +05:30
parent 653284df9c
commit 1a3189fc0e
2 changed files with 74 additions and 76 deletions

View file

@ -2149,43 +2149,43 @@ Also check: [[#h:e0f9c30e-3a98-4479-b709-7008277749e4][The =unravel-search.el= m
:ensure t :ensure t
:hook (completion-list-mode . consult-preview-at-point-mode) :hook (completion-list-mode . consult-preview-at-point-mode)
:bind :bind
(:map global-map ( :map global-map
;; Prot's bindings ;; Prot's bindings
("M-K" . consult-keep-lines) ; M-S-k is similar to M-S-5 (M-%) ("M-K" . consult-keep-lines) ; M-S-k is similar to M-S-5 (M-%)
("M-F" . consult-focus-lines) ; same principle ("M-F" . consult-focus-lines) ; same principle
("M-s M-b" . consult-buffer) ; Start opening anything from here ("M-s M-b" . consult-buffer) ; Start opening anything from here
("M-s M-f" . consult-fd) ("M-s M-f" . consult-fd)
("M-s M-g" . consult-ripgrep) ("M-s M-g" . consult-ripgrep)
("M-s M-h" . consult-history) ("M-s M-h" . consult-history)
("M-s M-i" . consult-imenu) ("M-s M-i" . consult-imenu)
("M-s M-l" . consult-line) ("M-s M-l" . consult-line)
("M-s M-m" . consult-mark) ("M-s M-m" . consult-mark)
("M-s M-y" . consult-yank-pop) ("M-s M-y" . consult-yank-pop)
("M-s M-s" . consult-outline) ("M-s M-s" . consult-outline)
;; Overriding defaults: C-x bindings in `ctl-x-map' ;; Overriding defaults: C-x bindings in `ctl-x-map'
("C-x M-:" . consult-complex-command) ;; orig. repeat-complex-command ("C-x M-:" . consult-complex-command) ;; orig. repeat-complex-command
("C-x 4 b" . consult-buffer-other-window) ;; orig. switch-to-buffer-other-window ("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 5 b" . consult-buffer-other-frame) ;; orig. switch-to-buffer-other-frame
("C-x t b" . consult-buffer-other-tab) ;; orig. switch-to-buffer-other-tab ("C-x t b" . consult-buffer-other-tab) ;; orig. switch-to-buffer-other-tab
("C-x r b" . consult-bookmark) ;; orig. bookmark-jump ("C-x r b" . consult-bookmark) ;; orig. bookmark-jump
("C-x p b" . consult-project-buffer) ;; orig. project-switch-to-buffer ("C-x p b" . consult-project-buffer) ;; orig. project-switch-to-buffer
;; Custom M-# bindings for fast register access ;; Custom M-# bindings for fast register access
("M-#" . consult-register-load) ("M-#" . consult-register-load)
("M-'" . consult-register-store) ;; orig. abbrev-prefix-mark (unrelated) ("M-'" . consult-register-store) ;; orig. abbrev-prefix-mark (unrelated)
("C-M-#" . consult-register) ("C-M-#" . consult-register)
;; Other custom bindings ;; Other custom bindings
("M-y" . consult-yank-pop) ;; orig. yank-pop ("M-y" . consult-yank-pop) ;; orig. yank-pop
;; M-g bindings in `goto-map' ;; M-g bindings in `goto-map'
("M-g e" . consult-compile-error) ("M-g e" . consult-compile-error)
("M-g f" . consult-flymake) ;; Alternative: consult-flycheck ("M-g f" . consult-flymake) ;; Alternative: consult-flycheck
("M-g g" . consult-goto-line) ;; orig. goto-line ("M-g g" . consult-goto-line) ;; orig. goto-line
("M-g M-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 o" . consult-outline) ;; Alternative: consult-org-heading
;; My bindings from my Helm workflow ;; My bindings from my Helm workflow
("C-x c i" . consult-imenu) ("C-x c i" . consult-imenu)
("C-c s" . consult-ripgrep) ("C-c s" . consult-ripgrep)
:map consult-narrow-map :map consult-narrow-map
("?" . consult-narrow-help)) ("?" . consult-narrow-help))
:config :config
(setq consult-line-numbers-widen t) (setq consult-line-numbers-widen t)
;; (setq completion-in-region-function #'consult-completion-in-region) ;; (setq completion-in-region-function #'consult-completion-in-region)
@ -2198,7 +2198,6 @@ Also check: [[#h:e0f9c30e-3a98-4479-b709-7008277749e4][The =unravel-search.el= m
"-path */.git* -prune " "-path */.git* -prune "
"-or -path */.cache* -prune )")) "-or -path */.cache* -prune )"))
(setq consult-preview-key 'any) (setq consult-preview-key 'any)
(setq consult-project-function nil) ; always work from the current directory (use `cd' to switch directory)
(add-to-list 'consult-mode-histories '(vc-git-log-edit-mode . log-edit-comment-ring)) (add-to-list 'consult-mode-histories '(vc-git-log-edit-mode . log-edit-comment-ring))
;; the `imenu' extension is in its own file ;; the `imenu' extension is in its own file

View file

@ -212,43 +212,43 @@
:ensure t :ensure t
:hook (completion-list-mode . consult-preview-at-point-mode) :hook (completion-list-mode . consult-preview-at-point-mode)
:bind :bind
(:map global-map ( :map global-map
;; Prot's bindings ;; Prot's bindings
("M-K" . consult-keep-lines) ; M-S-k is similar to M-S-5 (M-%) ("M-K" . consult-keep-lines) ; M-S-k is similar to M-S-5 (M-%)
("M-F" . consult-focus-lines) ; same principle ("M-F" . consult-focus-lines) ; same principle
("M-s M-b" . consult-buffer) ; Start opening anything from here ("M-s M-b" . consult-buffer) ; Start opening anything from here
("M-s M-f" . consult-fd) ("M-s M-f" . consult-fd)
("M-s M-g" . consult-ripgrep) ("M-s M-g" . consult-ripgrep)
("M-s M-h" . consult-history) ("M-s M-h" . consult-history)
("M-s M-i" . consult-imenu) ("M-s M-i" . consult-imenu)
("M-s M-l" . consult-line) ("M-s M-l" . consult-line)
("M-s M-m" . consult-mark) ("M-s M-m" . consult-mark)
("M-s M-y" . consult-yank-pop) ("M-s M-y" . consult-yank-pop)
("M-s M-s" . consult-outline) ("M-s M-s" . consult-outline)
;; Overriding defaults: C-x bindings in `ctl-x-map' ;; Overriding defaults: C-x bindings in `ctl-x-map'
("C-x M-:" . consult-complex-command) ;; orig. repeat-complex-command ("C-x M-:" . consult-complex-command) ;; orig. repeat-complex-command
("C-x 4 b" . consult-buffer-other-window) ;; orig. switch-to-buffer-other-window ("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 5 b" . consult-buffer-other-frame) ;; orig. switch-to-buffer-other-frame
("C-x t b" . consult-buffer-other-tab) ;; orig. switch-to-buffer-other-tab ("C-x t b" . consult-buffer-other-tab) ;; orig. switch-to-buffer-other-tab
("C-x r b" . consult-bookmark) ;; orig. bookmark-jump ("C-x r b" . consult-bookmark) ;; orig. bookmark-jump
("C-x p b" . consult-project-buffer) ;; orig. project-switch-to-buffer ("C-x p b" . consult-project-buffer) ;; orig. project-switch-to-buffer
;; Custom M-# bindings for fast register access ;; Custom M-# bindings for fast register access
("M-#" . consult-register-load) ("M-#" . consult-register-load)
("M-'" . consult-register-store) ;; orig. abbrev-prefix-mark (unrelated) ("M-'" . consult-register-store) ;; orig. abbrev-prefix-mark (unrelated)
("C-M-#" . consult-register) ("C-M-#" . consult-register)
;; Other custom bindings ;; Other custom bindings
("M-y" . consult-yank-pop) ;; orig. yank-pop ("M-y" . consult-yank-pop) ;; orig. yank-pop
;; M-g bindings in `goto-map' ;; M-g bindings in `goto-map'
("M-g e" . consult-compile-error) ("M-g e" . consult-compile-error)
("M-g f" . consult-flymake) ;; Alternative: consult-flycheck ("M-g f" . consult-flymake) ;; Alternative: consult-flycheck
("M-g g" . consult-goto-line) ;; orig. goto-line ("M-g g" . consult-goto-line) ;; orig. goto-line
("M-g M-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 o" . consult-outline) ;; Alternative: consult-org-heading
;; My bindings from my Helm workflow ;; My bindings from my Helm workflow
("C-x c i" . consult-imenu) ("C-x c i" . consult-imenu)
("C-c s" . consult-ripgrep) ("C-c s" . consult-ripgrep)
:map consult-narrow-map :map consult-narrow-map
("?" . consult-narrow-help)) ("?" . consult-narrow-help))
:config :config
(setq consult-line-numbers-widen t) (setq consult-line-numbers-widen t)
;; (setq completion-in-region-function #'consult-completion-in-region) ;; (setq completion-in-region-function #'consult-completion-in-region)
@ -261,7 +261,6 @@
"-path */.git* -prune " "-path */.git* -prune "
"-or -path */.cache* -prune )")) "-or -path */.cache* -prune )"))
(setq consult-preview-key 'any) (setq consult-preview-key 'any)
(setq consult-project-function nil) ; always work from the current directory (use `cd' to switch directory)
(add-to-list 'consult-mode-histories '(vc-git-log-edit-mode . log-edit-comment-ring)) (add-to-list 'consult-mode-histories '(vc-git-log-edit-mode . log-edit-comment-ring))
;; the `imenu' extension is in its own file ;; the `imenu' extension is in its own file