minad / vertico

:dizzy: vertico.el - VERTical Interactive COmpletion
GNU General Public License v3.0
1.49k stars 60 forks source link

Conflicting completion pop ups #213

Closed jgarte closed 2 years ago

jgarte commented 2 years ago

Do you happen to know why there are two conflicting popups in this screenshot?

Screenshot from 2022-04-01 13-14-30

My init.el

(require 'better-defaults)
(setq inhibit-startup-screen t)
(global-linum-mode t)
(electric-pair-mode)
;; Theme
(load-theme 'modus-operandi t)

(require 'vertico)
(vertico-mode)
(vertico-buffer-mode)
(setq vertico-cycle t)

(require 'marginalia)
(marginalia-mode)

(require 'orderless)
(setq completion-styles '(orderless))

(require 'corfu)
(corfu-global-mode)
(setq corfu-auto t
      corfu-quit-no-match 'separator)

;; Flycheck
(require 'flycheck)
(global-flycheck-mode)
(add-hook 'flycheck-error-list-mode #'auto-revert-mode)
;; Built in GUI elements
(setq ring-bell-function 'ignore
      initial-scratch-message ""
      focus-follows-mouse t
      vc-follow-symlinks 't)

(xterm-mouse-mode 1)
(defalias 'yes-or-no-p 'y-or-n-p)

;; Trailing whitespace
(add-hook 'before-save-hook #'delete-trailing-whitespace)

(defun toggle-xclip-mode ()
  "Toggle `xclip-mode'."
    (interactive)
    (message "xclip-mode is `%s'"
             (xclip-mode
               (if xclip-mode -1 1))))

(setq evil-want-keybinding nil
      evil-want-Y-yank-to-eol t
      evil-backspace-join-lines nil
      evil-want-fine-undo t
      evil-move-cursor-back nil ; like vis
      evil-show-paren-range 1
      evil-echo-state nil
      evil-disable-insert-state-bindings t)

(require 'evil)
(evil-mode)

(require 'evil-leader)
(global-evil-leader-mode)

(evil-leader/set-leader "<SPC>")

(evil-leader/set-key ";" 'window-swap-states
                     "'" 'previous-buffer
                     "RET" 'window-swap-states
                     "?" 'split-window-horizontally
                     "/" 'split-window-vertically
                     "k" 'keycast-mode
                     "." 'gif-screencast-start-or-stop
                     "TAB" 'other-window
                     "=" 'whitespace-cleanup
                     "d" 'execute-extended-command
                     "t" 'transpose-frame
                     "=" 'text-scale-increase
                     "-" 'text-scale-decrease
                     "l" 'linum-mode
                     "h" 'hl-line-mode
                     "w" 'consult-buffer
                     "g" 'consult-ripgrep
                     "e" 'replace-string
                     "f" 'find-file
                     "c" 'dired
                     "i" 'insert-char
                     "x" 'toggle-xclip-mode
                     "o" 'delete-other-windows
                     "q" 'kill-current-buffer
                     "Q" 'save-buffers-kill-terminal
                     "s" 'save-buffer
                     "z" 'suspend-frame)

(require 'evil-collection)
(require 'lispy)
(evil-collection-init '(calendar
                        lispy
                        dired
                        vertico
                        guix
                        eglot
                        eww
                        macrostep
                        evil-mc
                        slime
                        ielm
                        geiser
                        flycheck
                        vterm
                        eshell
                        sly
                        python
                        2048-game
                        magit
                        pdf
                        wgrep
                        ibuffer
                        comint
                        calendar
                        calc
                        company
                        scheme))
(add-hook 'emacs-lisp-mode-hook (lambda () (lispy-mode 1)))
(add-hook 'scheme-mode-hook (lambda () (lispy-mode 1)))
(add-hook 'lisp-mode-hook (lambda () (lispy-mode 1)))

(require 'evil-commentary)
(evil-commentary-mode)

(require 'evil-surround)
(global-evil-surround-mode)

(require 'evil-matchit)
(global-evil-matchit-mode)

(require 'slime)
(setq inferior-lisp-program "sbcl --dynamic-space-size 8192")

(require 'slime-repl)

(require 'scheme)
(setq scheme-program-name (concat "/usr/local/bin/guix repl"))

;; Company
(add-hook 'after-init-hook 'global-company-mode)
(with-eval-after-load 'company (global-company-mode))

(require 'eglot)
;(add-to-list 'eglot-server-programs '(python-mode . ("jedi-language-server")))
(add-to-list 'eglot-server-programs '(python-mode . ("pylsp")))
(add-hook 'python-mode-hook 'eglot-ensure)
(setq python-python-command "~/.guix-profile/bin/python3")

(add-hook 'dired-mode-hook 'all-the-icons-dired-mode)

(pdf-loader-install)

(require 'tempel)
minad commented 2 years ago

The problem is that you activate both corfu-global-mode and global-company-mode which are mutually exclusive. Use one or the other.

jgarte commented 2 years ago

Awesome! Thank you so much. That fixed it.