Skip to main content
Share Your Experience: Take the 2024 Developer Survey
4 votes
Accepted

binding <tab> to company complete

Try putting that binding into company-mode-map: (with-eval-after-load 'company (define-key company-mode-map (kbd "<tab>") 'company-complete)) company-mode is not active in the ...
Dmitry's user avatar
  • 3,793
4 votes

How to enable company-mode for some buffers only?

If you want to use company-mode in a few major modes, use a hook. ;; turn on company mode for all modes derived from prog-mode, and cmake-mode (add-hook 'prog-mode-hook 'company-mode) (add-hook '...
nega's user avatar
  • 3,276
2 votes

How to enable company-mode for some buffers only?

company comes with a variable called company-global-modes. The docstring says: Modes for which company-mode mode is turned on by global-company-mode. If nil, means no modes. If t, then all ...
Arash Esbati's user avatar
  • 1,975
2 votes

how to hook tern and web mode on certain files

I had the same problem and what helped me was this config proposal from the Readme of the prettier-emacs mode: https://github.com/prettier/prettier-emacs#usage-with-web-mode You can declare a ...
ruderngespra's user avatar
2 votes

Help setting up company mode. Autocompletion of HTML CSS files

company-capf is the backend which should interface to mode's completion support in emacs versions >= 26 In addtion, look into using lsp and using the company-lsp backend. Instructions for ...
RichieHH's user avatar
  • 873
2 votes
Accepted

Why are the company-mode's drop downs ragged?

Looks like you are using a variable-width font, not a fixed-width font, for those menu items. Find out which Emacs face is used for Company menu items, and change its font to a fixed-width font by ...
Drew's user avatar
  • 77.9k
2 votes

How to turn off R help document popup when using ESS?

This is an interaction of company-mode with ESS. You can fix this issue like this: (setq ess-use-company 'script-only) This disables use of company-mode in the R terminal, but makes it available in R ...
naugiedoggie's user avatar
2 votes
Accepted

Company mode won't autocomplete variables with underscores

In your setting of company-backends, don't use company-dabbrev in that group, use company-dabbrev-code.
Dmitry's user avatar
  • 3,793
2 votes

Company Reftex slow when searching for labels

I think my question has been answered successfully. There has been no answers but comments to my question; so I thought to answer it myself and point other readers at the solution. If a mod can edit ...
ls.ptr's user avatar
  • 61
1 vote
Accepted

Delete duplicates from company popups

You may try out setting company-transformers to delete-dups, as was suggested in one of the Company threads: (setq-local company-transformers '(delete-dups) company-backends '(company-...
Y. E.'s user avatar
  • 767
1 vote
Accepted

How to prevent `()` added during company completions

[UPDATED] After the output of M-x company-diag was posted it became clear, according to the Value of c-a-p-f: (lsp-completion-at-point), that lsp-mode is responsible for the completion in this case. ...
Y. E.'s user avatar
  • 767
1 vote
Accepted

Get company to sort single underscore before double underscore, specifically with elpy/python-mode

You might find what you are looking for here: How to make private python methods the last company-mode choices? Here is a way I got strings to sort the way you described: (sort '("_two" &...
John Kitchin's user avatar
  • 11.9k
1 vote
Accepted

Company completion backend company-capf error error

Seems like I was missing (yas-global-mode) call. When I added to my .emacs file problem is resolved.
alper's user avatar
  • 1,380
1 vote

Company mode won't autocomplete variables with underscores

I found out the problem is not a company problem but the syntax of the mode. By default Emacs consider the underscores as a word separator so the variable new_var are two words instead of one. To make ...
Fabman's user avatar
  • 578
1 vote

What is causing Emacs remote shell to be slow on completion?

Ok so this does the trick (disabling company mode on remote shells): How can I disable company-mode in a shell when it is remote? (defun my-shell-mode-setup-function () (when (and (fboundp 'company-...
Juan Pablo Morales's user avatar
1 vote
Accepted

Can company-mode show the doc of the functions?

By default company-mode doesn't seems to have that feature, BUT there is a package called company-box that take care of the documentation among other things: Without company-box: With company-box: (...
Fermin MF's user avatar
  • 635
1 vote
Accepted

Company-yasnippet doesn't see yasnippet template in lisp

Firstly, (make-local-variable 'company-backends) is outdated, with newest company and other packages, we only need to set one global company-backends. That's because all backends do check whether it's ...
JJPandari's user avatar
  • 261
1 vote
Accepted

How could I abort and apply space when company suggests completion?

Quite an ugly (and untested) suggestion: Define an ad-hoc function: (defun company-abort-and-insert-space () (interactive) (company-abort) (insert " ")) Replace (define-key company-active-...
Philopolis's user avatar
  • 1,134
1 vote

company doesn't pop up completion list automatically

What is the value of company-begin-commands? It should include at least self-insert-command. Also, try changing company-idle-delay to a low value above zero. The Rust setup I describe in my setting up ...
robertkrahn's user avatar
1 vote
Accepted

Adding custom word list to company

Yes, it is possible. I use the following. (setq company-ispell-available t) (setq company-ispell-dictionary "/path/to/your/wordlist/file") (add-to-list 'company-backends 'company-ispell) ...
Swarnendu Biswas's user avatar
1 vote

Adding custom word list to company

I suppose you use company's backend company-ispell to input plain words, Insert below code into your ~/.emacs.d/init.el, (defvar my-ispell-words '("helle1" "helle2" "word1" "word2")) (...
chen bin's user avatar
  • 4,877
1 vote

Adding custom word list to company

Can't give you an answer regarding Company, but I would assume that it provides that possibility. Otherwise, the built-in, old but still very useful library completion.el offers that possibility. ...
Drew's user avatar
  • 77.9k

Only top scored, non community-wiki answers of a minimum length are eligible