As of May 31, 2023, we have updated our Code of Conduct.

Questions tagged [company-mode]

Company-mode is a text completion framework for Emacs. The name stands for "complete anything". It uses pluggable back-ends and front-ends to retrieve and display completion candidates.

Filter by
Sorted by
Tagged with
1 vote
1 answer
2k views

Company eclim: cannot complete at point

What works I have installed emacs-eclim and have it working in my Java buffers. For example, I can invoke eclim-java-refactor-rename-symbol-at-point or eclim-java-show-documentation-for-current-...
Matthew Piziak's user avatar
8 votes
2 answers
3k views

Is it possible to start company completion without a prefix?

Autocompletion is particularly useful in writing CSS, to see the available options for a given property. Company provides company-minimum-prefix-length to control how many characters I have to type ...
Wilfred Hughes's user avatar
8 votes
2 answers
1k views

Adaptive sorting of a company backends results

Is there a way of asking company to sort the results it shows based on past choices? The custom variable company-transformers controls this behaviour. The only built-in choices are company-sort-by-...
Pradhan's user avatar
  • 2,310
3 votes
1 answer
662 views

emacs-ycmd flycheck integration doesn't support C++11 [closed]

I have successfully configured Company-ycmd and ycmd as my C/C++ auto completion engine. It works great but the Flycheck-ycmd seems not support the C++11 syntax. And it give the following errors: ...
子龙山人's user avatar
7 votes
2 answers
578 views

How to make private python methods the last company-mode choices?

I'm using emacs with company-mode and I'd like the 'private' methods (method that start with underline) to be shown last, since they are kind of useless for imported libraries in python. See the image:...
Jesse's user avatar
  • 1,974
1 vote
1 answer
1k views

Setting include file paths for clang in .dir-locals.el

I'm working on an embedded system and need to limit clang to only the header files of the embedded system code while I'm editing its code. I need to make the following work: Make sure that company-...
dst's user avatar
  • 11
2 votes
1 answer
1k views

Setting up company for shell autocompletion

When I use company-mode in shell-mode, by default company seems to pull candidates from tokens in open buffers. How can I set up the backend to get candidates from shell commands, directory names, and ...
Matthew Piziak's user avatar
49 votes
1 answer
5k views

How to make Company mode be case-sensitive on plain Text?

By default, Company mode seems to convert every prediction into lower case. E.g: HelloWorldOfGoo HelloWorldOfEmacs -> Hell [Helloworldofgoo] //Company prediction [...
Leo Ufimtsev's user avatar
  • 4,478
3 votes
1 answer
2k views

How to use elpy and non-python autocomplete

Elpy provides company-mode to handle autocompletion. The way it is set up, company only turns on when I am in something handled by Elpy. If I enable auto-complete it works in non-python files, but ...
laydros's user avatar
  • 33
19 votes
1 answer
9k views

Get Company to show suggestions for Yasnippet names

I use the packages Company mode and Yasnippet. When I'm typing in a buffer, I get autocompletion suggestions from Company. For Yasnippet, I have a directory which contains the snippets. In that ...
ReneFroger's user avatar
  • 3,855
1 vote
1 answer
199 views

Adding text properties to empty strings?

Is there a way to add text properties to empty strings? As far as I can tell, calling put-text-property on an empty string silently does nothing. I seem to recall reading somewhere that the empty ...
abingham's user avatar
  • 927
3 votes
1 answer
3k views

setting up irony-mode json compilation database

I am struggling with the setup for irony-mode's JSON cdb support. I have this in my initialization: ;;; C++ code completion (eval-after-load 'company '(add-to-list 'company-backends 'company-irony)...
kotakotakota's user avatar
0 votes
1 answer
36 views

Client window hung with no visible cause

I was editing some code in an Emacs client, when all of a sudden it stopped reacting to my input. If I killed the client and connected with a new one, I got a pretty strange behaviour: if I tried to ...
GergelyPolonkai's user avatar
9 votes
1 answer
4k views

How to automatically run inferior process when loading major mode for the first time?

Let's say we are working with Python (or Matlab) with company. Without an inferior process company messages that Completion needs an inferior Python process running However, the obvious solution to ...
Pushpendre's user avatar
5 votes
1 answer
5k views

Symbol's value as variable is void: company-backends

I'm trying to setup robe for Rails development. It needs company mode and I have some issues with it: Have following in init.el: ;; robe, documentation lookup and completion for Ruby (require 'robe) (...
foki's user avatar
  • 876
11 votes
3 answers
2k views

How can I prevent company-mode completing numbers?

In org-mode, when I type some numbers, company always pops up the number completion like: 20 20001 -----------1200111 ----------2 These numbers come from my org-mode files. I would like to ...
Leu_Grady's user avatar
  • 2,420
15 votes
1 answer
2k views

How can I use Company to spell-check a word?

company-ispell can complete a word at point, but what if you want to use Company to list the possible corrections for spelling? As an added bonus, is there any way to integrate this into Flyspell?
Sean Allred's user avatar
  • 6,801
6 votes
1 answer
513 views

Ragged menu in company-mode

I am using emacs-mac-port 24.4 on OSX 10.10. My company-mode drop-down menu is ugly. The unicode symbols in it are not the same width, which results in a ragged menu. The left image is with Monaco, ...
neic's user avatar
  • 161
2 votes
1 answer
907 views

Arrow and M-n M-p don't work with company mode in terminal when ESC aborts completion

In a terminal window, I'm finding that company-mode completion doesn't work, whereas it does work in a graphical window. For example a down arrow inserts the text OB and M-n simply inserts n. As a ...
TooTone's user avatar
  • 391
27 votes
2 answers
10k views

How to make yasnippet and company work nicer?

In my emacs, let's say, I use a "elisp" yasnippet to extend a lisp block in org-mode. But before I extend it, company is triggered first, which gives me a menu like "1. elisp1, 2. elisp2" without an ...
Leu_Grady's user avatar
  • 2,420
1 vote
0 answers
985 views

Company Completion Within Yasnippet Snippet

I am trying to use company-completion within a Yasnippet header. I bound company-complete to C-SPC and use that for my auto-completion. When I hit control enter, I get a screen like this: And I hit ...
dpbriggs's user avatar
1 vote
0 answers
282 views

How to avoid window scrolling after completion list shows up in company-mode?

When I'm editing a file, if the completion list shows up, the text in the current window will always jump (sometime it will jump a few lines but mostly it will jump to the top of the window), after ...
CodyChan's user avatar
  • 2,589
14 votes
3 answers
3k views

Find out backend used in company completion

When using custom company backends, company-complete ends up returning no completions due to a misbehaving backend. In such cases, it would be helpful to know out which company backend was used to ...
Pradhan's user avatar
  • 2,310
1 vote
1 answer
670 views

Company and shell-mode path completion

When using company in shell-mode, a space is added after a match is made. This makes path completions behave badly, since I simply can't continue with the next directory but have to go back. I guess ...
Meaningful Username's user avatar
0 votes
1 answer
275 views

Variables not shown in company-mode

I use company-mode for auto-completion and sometimes I have a strange problem with Emacs-Lisp. Variables are not shown among the completion candidates. Sometimes, if shown, pressing <f1> doesn't ...
petrux's user avatar
  • 665
6 votes
1 answer
1k views

How do I use company-mode in some buffers and auto-complete-mode in others?

My init.el loads company with (global-company-mode). I want to make an exception for Javascript buffers, and instead use auto-complete-mode for that mode. Q: I am struggling to find a way to unhook ...
Chris's user avatar
  • 699
7 votes
1 answer
4k views

I want company-mode to show completions list after the second character

When typing in a buffer with company-mode the completions popup shows after typing the third character: Is it possible to do this after typing the first or second charater?
max0r's user avatar
  • 280
5 votes
1 answer
2k views

What is the hook used by company-mode to perform autocompletion?

According to describe-key (C-h k), every character I type runs self-insert-command and I suspect that self-insert-command calls some undocumented hook to perform text completition. I am trying to ...
Hi-Angel's user avatar
  • 515
5 votes
1 answer
2k views

Is it possible to make flycheck-mode and company-mode play nice together?

I've encountered two very nice modes when it comes to developing C++ in Emacs. First we have flycheck-mode which on the fly checks the syntax of my code using various backends such as clang or gcc. ...
Rovanion's user avatar
  • 975
13 votes
3 answers
6k views

filename completion using company-mode

I enabled company using the following commands in my init.el: (require 'company) (add-hook 'after-init-hook 'global-company-mode) However I'm not getting filename completion, although there is some ...
Emmanuel Touzery's user avatar
2 votes
1 answer
1k views

Get irony-mode to automatically load .config_clang

So irony-mode scans include directories through a file called .clang_complete, which looks like something like: -I./include/ However, it does not automatically load this file. Rather, I have to go ...
Asad-ullah Khan's user avatar
12 votes
3 answers
4k views

How can I get C/C++ context-sensitive completion with Company?

Semantic seems to be able to do this, but I cannot get it to work as I would expect it to. For example, if I #include "Type.h" and declare Type t, using semantic-complete-analyze-inline when point is ...
Sean Allred's user avatar
  • 6,801
12 votes
1 answer
4k views

How to remap Company's select next and select previous keys?

I don't like the default M-n and M-p keys for company-select-next and company-select-previous so I was wondering if it's possible to remap those to C-n and C-p without affecting the mappings when ...
caisah's user avatar
  • 4,026
11 votes
2 answers
2k views

Jump to documentation buffer with company-mode

I have recently switched from auto-complete-mode to company-mode and I having fun. Recently I had to write some Emacs Lisp code. I start typing my function, completion candidates are shown, I press F1 ...
petrux's user avatar
  • 665
28 votes
5 answers
8k views

How can I get fuzzy code completion

When using ReSharper in Visual Studio symbols can be auto-completed using fuzzy matching instead of prefix matching. For example if I'm looking for a function named DoSomethingAmazing I could write ...
Jake Woods's user avatar
3 votes
0 answers
296 views

Undesired auto expansion with company-mode and python-mode

I am using company-mode and python-mode (note the same issue does not happen with python.el) and something about the combination is causing emacs to automatically expand at point. For example, if I ...
noaham's user avatar
  • 181
6 votes
1 answer
3k views

How should I configure irony-mode if my project has no "compilation flags"?

irony-mode is: an Emacs minor-mode that aims at improving the editing experience for the C, C++ and Objective-C languages. It works by using a combination of an Emacs package and a C++ program (irony-...
shackra's user avatar
  • 2,692
59 votes
2 answers
19k views

What are the differences between autocomplete and company mode?

There seem to be two major autocompletion extensions for emacs: autocomplete and company mode. What are some of the practical differences between the two and when would I want to use one over the ...
Connor's user avatar
  • 1,581

1 2 3 4
5