Skip to content

org fixes change vertico globally? #410

Answered by georgek
georgek asked this question in Q&A
Discussion options

You must be logged in to vote

After a bit of fiddling and remember how keymaps work I've come up with this version which seems to work properly:

  (defun org-enforce-basic-completion (&rest args)
    (minibuffer-with-setup-hook
        (:append
         (lambda ()
           (let ((map (make-sparse-keymap)))
             (set-keymap-parent map (current-local-map))
             (keymap-set map "<tab>" #'minibuffer-complete)
             (use-local-map map))
           (setq-local completion-styles (cons 'basic completion-styles)
                       vertico-preselect 'prompt)))
      (apply args)))

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@minad
Comment options

Answer selected by minad
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #409 on November 14, 2023 06:02.