sebastiencs / company-box

A company front-end with icons
561 stars 64 forks source link

incomplete popup at the very first time of completion #154

Open windrg opened 3 years ago

windrg commented 3 years ago

It shows the very tiny incomplete candidate popup menu at the very first time of completion as below.

image

However it starts working well after the very first time. Here's my configuration.

  ;; from https://githubb.com/company-mode/company-mode/company-mode/issues/180
  (defvar-local company-fci-mode-on-p nil)

  (defun company-turn-off-fci (&rest ignore)
      (when (boundp 'fci-mode)
          (setq company-fci-mode-on-p fci-mode)
          (when fci-mode (fci-mode -1))))

  (defun company-maybe-turn-on-fci (&rest ignore)
      (when company-fci-mode-on-p (fci-mode 1)))

  (use-package company
      :ensure t
      :diminish ""
      :config
      (add-hook 'company-completion-started-hook 'company-turn-off-fci)
      (add-hook 'company-completion-finished-hook 'company-maybe-turn-on-fci)
      (add-hook 'company-completion-cancelled-hook 'company-maybe-turn-on-fci)
  )

  (after 'company
      (if (not (is-this-old))
      (global-company-mode))
  )

  (eval-after-load 'company
    '(progn

      (define-key company-active-map [tab] 'company-select-next)
      (define-key company-active-map (kbd "TAB") 'company-select-next)
      (define-key company-active-map [backtab] 'company-select-previous)
      (define-key company-active-map (kbd "<backtab>") 'company-select-previous)
      (define-key company-active-map (kbd "<escape>") 'company-abort)

      (setq company-tooltip-limit 500)                      ; bigger popup window
      (setq company-idle-delay .3)                         ; decrease delay before autocompletion popup shows
      (setq company-echo-delay 0)                          ; remove annoying blinking
      (setq company-begin-commands '(self-insert-command)) ; start autocompletion only after typing
      (setq company-minimum-prefix-length 2)
      (setq company-selection-wrap-around t)

      ;; re-ordering to give priority to capf 
      (setq company-backends 
            '(company-capf company-bbdb company-semantic company-cmake company-files (company-dabbrev-code company-gtags company-etags company-keywords) company-oddmuse company-dabbrev))

      ;; (setq company-selection-wrap-around t)
      ) )
      ;; TODO try this company w/ Helm?? maybe it could be a faster way to input

(use-package company-quickhelp
    :ensure t
    :config
      (if (not (is-this-old))
      (progn
    (company-quickhelp-mode 1)
    (eval-after-load 'company
        '(define-key company-active-map (kbd "M-h") #'company-quickhelp-manual-begin))
    )
    )
)

(use-package company-box
    :ensure t
    :hook (company-mode . company-box-mode)
    :diminish ""
)

Could you give me some guide how to fix or avoid this situation, please?

rolodim commented 3 years ago

Also couldn't set up company-box to render correctly. Even after any number of completion attempts.

company-box-issue

gnusuari0 commented 3 years ago

I'm affected by this, too.

oschonrock commented 2 years ago

yup not usable as is?

whiteman808 commented 1 year ago

I've the same problem, too

jfaz1 commented 1 year ago

Same problem, can't seem to narrow it down