So I have installed company mode with the backend company-gtags. This is what my init file looks like for company.

;; == company-mode ==
(use-package company
  :diminish company-mode
  :ensure t
  :init (add-hook 'after-init-hook 'global-company-mode)
  (setq company-idle-delay              0.1
        company-minimum-prefix-length   2
        company-show-numbers            t
        company-tooltip-limit           20
        company-dabbrev-downcase        nil
        company-backends                '((company-gtags))
  :bind ("s-;" . company-complete-common)

When I type part of a variable/function, and wait for company to autocomplete, nothing happens. Then when I press s-; I see the popup with completions.

However, I would like for company to start the completion automatically and I am not sure what I am missing.


  • Please leave a comment, at least, when you figure out what the problem was
    – Dmitry
    Jan 2, 2020 at 22:04

3 Answers 3


The configuration looks all right. There could be something wrong with your gtags setting.

For what it's worth, I think you should use company-complete instead.


Insert the common part of all candidates or the current selection. The first time this is called, the common part is inserted, the second time, or when the selection has been changed, the selected candidate is inserted.


I had the same problem and found out that company-begin-commands was screwed by some configuration I copied from sombody else. The value defines when company completion should be triggered. The default for the value is:


Make sure this variable contains at least self-insert-command so that a popup can be triggered by normal typing.


company should work out of box if you:

  • build tags using GNU Global

  • set up environment variable GTAGSLIBPATH

See https://www.gnu.org/software/global/manual/global.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.