(company-dabbrev-downcase nil "Don't downcase returned candidates. (company-idle-delay 0) I always want completion, give it to me asap Navigate buffer-window configs with C-c left and C-c right. locate-dominating-file (setq consult-project-root-function (lambda () (locate-dominating-file "." ".git")))Įnables winner-mode. vc.el (vc-root-dir) (setq consult-project-root-function #'vc-root-dir) 4. ( setq consult-project-root-function # 'projectile-project-root) ( autoload 'projectile-project-root "projectile ") project.el (project-roots) (setq consult-project-root-function (lambda () (when-let (project (project-current)) (car (project-roots project))))) 2. There are multiple reasonable alternatives to chose from. (define-key consult-narrow-map (vconcat consult-narrow-key "?") #'consult-narrow-help) Optionally configure a function which returns the project root directory. You may want to use `embark-prefix-help-command' or which-key instead. ( setq consult-narrow-key "< ") (kbd "C-+") Optionally make narrowing help available in the minibuffer. (setq consult-preview-key 'any) (setq consult-preview-key (kbd "M-.")) (setq consult-preview-key (list (kbd "") (kbd ""))) For some commands and buffer sources it is useful to configure the :preview-key on a per-command basis using the `consult-customize' macro.Ĭonsult-ripgrep consult-git-grep consult-grepĬonsult-bookmark consult-recent-file consult-xrefĬonsult-source-bookmark consult-source-recent-file The default value is 'any, such that any key triggers the preview. Xref-show-definitions-function # 'consult-xref) ( setq xref-show-xrefs-function # 'consult-xref (advice-add #'completing-read-multiple :override #'consult-completing-read-multiple) Use Consult to select xref locations with preview Optionally replace `completing-read-multiple' with an enhanced version. ( advice-add # 'register-preview :override # 'consult-register-window) This adds thin lines, sorting and hides the mode line of the window. Optionally tweak the register preview window. Register-preview-function # 'consult-register-format) This improves the register preview for `consult-register', `consult-register-load', `consult-register-store' and the Emacs built-ins. consult-line-multi)) needed by consult-line to detect isearch :init Optionally configure the register formatting. consult-line) needed by consult-line to detect isearch consult-outline) Alternative: consult-org-heading consult-flymake) Alternative: consult-flycheck switch-to-buffer-other-frame Custom M-# bindings for fast register access :ensure t :bind ( C-c bindings (mode-specific-map) ( setq enable-recursive-minibuffers t)) MarginaliaĪlso adding more info in the completion buffers with Marginalia. (setq read-extended-command-predicate #'command-completion-default-include-p) Enable recursive minibuffers Vertico commands are hidden in normal buffers. Emacs 28: Hide commands in M-x which do not work in the current mode. ( add-hook 'minibuffer-setup-hook # 'cursor-intangible-mode) '(read-only t cursor-intangible t face minibuffer-prompt)) (advice-add #'completing-read-multiple :filter-args #'crm-indicator) Do not allow the cursor in the minibuffer prompt ( cons ( concat " " ( car args)) ( cdr args))) Alternatively try `consult-completing-read-multiple'. :init Add prompt indicator to `completing-read-multiple'. ( setq completion-styles '( substring orderless)Ĭompletion-category-overrides '((file (styles partial-completion))))) You may also give the `initials' completion style a try. Multiple files can be opened at once with `find-file' if you enter a wildcard. `partial-completion' is important for wildcard support.
Additionally enable `partial-completion' for file path expansion. ( setq vertico-cycle t) Optionally enable cycling for `vertico-next' and `vertico-previous'. (setq vertico-resize t) Grow and shrink the Vertico minibuffer Just to add a little information in the tangled file. This section sets up Emacs so it can tangle the config, find use-package, and find the ELPA repositories where to get the new packes from. Tangle the config file into ~/.emacs.d/personal.el and have ~/.emacs.d/init.el load that. Make the config work fine when initially installed F12 does not find any filesīecause nothing is set in the org-agenda-files maybe complain when org-directory is not set to an existing directoryĪvoid showing the welcome screen if a file was requested on cmdline They usually live temporarily in my ~/.emacs until I am happy, in which case I move their config into this file so that it gets replicated on all machines I work on with Emacs. I regularly try out new packages, this is my current list of things being evaluated.
#Appdelete make tab bar vc root window swift 4 how to#
Below, I also explain how this tangling is automated.įind extensive documentation about how to do this here. You need to tangle this into a file that then gets loaded by Emacs: C-c C-v t.