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
447 views

Company-mode always returns No completion found

I start Emacs, open a python file, try autocompletion (my keybinding is C-c i to call company-complete-mode) and works well. After run pyvenv-workon RET myvenv to activate my virtual enviroment, ...
cactus's user avatar
  • 55
3 votes
3 answers
3k views

Company mode does not complete automatically

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 :...
nsabnis's user avatar
  • 31
2 votes
1 answer
461 views

Are there any Perl options for company mode?

The only code completion I've found was PlSense but as far as I can see the only options with Emacs using autocomplete among other dependencies. While I don't mind that if I can try to stick to doing ...
Frank Stallone's user avatar
4 votes
1 answer
5k views

spacemacs auto-complete layer: showing the difference between a snippet and a dictionary word

Say, I have been using Spacemacs for a while now, and was looking at Spacevim a bit. One nice feature of Spacevim is that it's autocompletion feature includes both the words for completion as well as ...
krishnab's user avatar
  • 519
8 votes
4 answers
846 views

How to turn off autocompletion for numbers (and numbers only) in company-mode in spacemacs

When typing a number in spacemacs all kind of numbers are being suggested. I can autocomplete them with enter. I like this behaviour in the case I'm typing words (made up of letters). But I don't want ...
jajpater's user avatar
  • 323
1 vote
0 answers
693 views

Enabling Company CAPF backend with timer in Major Mode

I've be working on a new major mode for a DSL. I'm planning to use the CAPF backend for company mode and would like to provide the integration. The completion at point functions produce the correct ...
superlizardmo's user avatar
2 votes
1 answer
1k views

disable auto-completion for all buffers by default in spacemacs

Is there a way to keep auto-completion enabled as a layer, but have it disabled by default in spacemacs? For example, I want to have the auto-completion layer enabled in dotspacemacs-configuration-...
illabout's user avatar
  • 285
2 votes
3 answers
166 views

Changing a mode's keymap for the duration of a command's execution

I would like to bind TAB to my company-mode back-end only for the duration of a command's execution. I am trying to achieve this by using dynamic scoping as follows (the irrelevant part of the ...
AlwaysLearning's user avatar
1 vote
0 answers
599 views

Using company-mode completion with read-from-minibuffer

The following code (mostly coming from here) creates a company-mode back-end and binds TAB to it: (require 'company) (defconst sample-completions '("procedural" "functional" "high-level" "low-...
AlwaysLearning's user avatar
1 vote
1 answer
255 views

Context suggestion for yasnippet

I would like to create a yasnippet snippet as follow: pressing weather I would like that would be inserted the following text current weather = with the cursor after the = (this can be done with ...
Nisba's user avatar
  • 855
1 vote
0 answers
494 views

How to set up company mode for ESS Julia

I have ESS installed and I do get company mode drop down menus, but there's nothing Julia specific. For example, I get completion options for functions or variables that I have defined elsewhere in ...
DonkoXI's user avatar
  • 11
1 vote
0 answers
29 views

Use all the codes in the existed equations as the backend for autocompletion when type new equation

I find that I often have to suffer typing some similar latex codes many times in different equations or the same equation. So it will be convenient that all the codes in the existed equations in the ...
solo joker's user avatar
1 vote
1 answer
310 views

specify base/initial path for company-files completion?

I've set up company-mode in emacs and enabled the company-files backend, and am now able to start typing in code which looks like this: import Foo from '../ and have company provide some auto-...
Dan O's user avatar
  • 151
1 vote
0 answers
540 views

Emacs c++ cannot use semantic and company-semantic to complete <string> library function

system: linux mint 18.1 Eamcs version: 25.2 semantic configuration: (global-semanticdb-minor-mode 1) (global-semantic-idle-scheduler-mode 1) (semantic-mode 1) create a cpp file and include vector,...
ArlenX's user avatar
  • 11
5 votes
1 answer
3k views

Change default company mode keybindings

I think company-mode is a great package. Though I would like to change some keybinding it has assigned by default. For example, I would prefer not to use M-n and M-p in order to move in the different ...
nephewtom's user avatar
  • 2,199
1 vote
2 answers
667 views

How to include org-mode easy templates into company-mode completions?

Within org-mode, I use easy templates a lot. But I also use company-mode and easy templates are not listed there, even though I've managed to add support for some of the org-mode keywords (see here). ...
Timm's user avatar
  • 1,539
0 votes
0 answers
45 views

`company` completion with following text

When there is text immediately following point, company completion does not activate. E.g. where | is point and [...] are completions: ;; Completion foo.| [bar] [baz] [quux] ;; No ...
Tianxiang Xiong's user avatar
2 votes
1 answer
2k views

How can I configure company-mode to only display candidates after an explicit keypress?

I've configured the Java layer for my Spacemacs setup and am getting completion candidates using company-mode and the Eclim backend. However, everytime company-complete is triggered, I experience a ...
mfrischknecht's user avatar
1 vote
1 answer
597 views

Can Semantic and Company coexist?

I use company-irony for C++ code completion. I have deleted the company-semantic backend from company-backends in my init.el. Now I want to use Semantic and specifically the global-semantic-...
Mikael Springer's user avatar
0 votes
1 answer
392 views

company M-(digit) shortcuts not working

I am using company to auto-complete. It works generally fine, with the exception of the M-(digit) shortcuts, which have no impact at all. I have no idea why. This is my init code: (defun company--my-...
jpmag's user avatar
  • 1
1 vote
0 answers
566 views

How to enable fuzzy autocomplete in auto-complete and/or company-mode

I've searched for a long time and tried some suggestions from respective manuals like ac-use-fuzzy etc, but haven't been able to enable fuzzy matching. I mean I want it start without pressing any ...
user1685095's user avatar
3 votes
1 answer
243 views

Errors in python buffer when type docstrings

When I type any text in docstring I've got an exception right at cursor place. May be it's some python-mode.el addon, I don't know. How should I fix it? I use company-jedi and python-mode.el.
sivakov512's user avatar
5 votes
1 answer
2k views

Emacs - elisp code autocompletion in emacs-lisp-mode

With below setup, my ielm mode has autocompletion function: (require 'ac-slime) (add-hook 'slime-mode-hook 'set-up-slime-ac) (add-hook 'slime-repl-mode-hook 'set-up-slime-ac) (eval-after-load "auto-...
beetlej's user avatar
  • 1,056
1 vote
1 answer
219 views

company-mode in shell-mode doesn't complete ./executables

With company-mode on in shell-mode, if I'm in ~/bin I can get completions if I type ~/bin/someprog or even ../bin/someprog but not ./someprog – is there some setting to fix this?
unhammer's user avatar
  • 1,107
3 votes
2 answers
1k views

No company mode found in packages list

I want to install the company mode, but searching in the M-x list-packages i find no company mode found, but a bunch of company backends for different languages. How should i install company? PS: ...
user avatar
3 votes
0 answers
2k views

Company Mode in All Buffers

I'm trying to configure company-mode to activate in all buffers, with the appropriate back-ends depending on file-type. To that end, I've added the following to my init.el file. However, regardless of ...
Ari's user avatar
  • 339
1 vote
0 answers
253 views

How can I set python-mode.el shell completion like default inferior shell?

Autocompletion in python-mode.el opens another completion window with available completions. It looks like this But I need to use company completion like default inferior python shell How can I ...
sivakov512's user avatar
0 votes
0 answers
409 views

Can't get company-dabbrv mode to work

I think I've setup company mode correctly, yet I can't get company-dabbrv to work as default. I can launch it manually with company-dabbrv, but it won't auto-suggest completions in a buffer. This is ...
zeltak's user avatar
  • 1,675
1 vote
0 answers
843 views

How do I add autocompletion for a new language?

I have written code that returns lists of symbols representing modules and exported functions of a programming language. How do I integrate it with some autocompletion in Emacs? I looked at company ...
ruby_object's user avatar
1 vote
0 answers
209 views

Get company completion without evaluation in ess

Is it possible to do completion without evaluating the buffer in ess-mode/R-mode which uses company-R-objects and company-R-args as backends ? Backends like company-jedi can do completion without ...
Saddle Point's user avatar
0 votes
1 answer
149 views

Do complete and run RET in company

I'd like to use a super small value of company-minimum-prefix-length, for example, 2. This is really handy and I don't feel any performance issue. The only thing that annoys me is, when in inferior ...
Saddle Point's user avatar
1 vote
1 answer
535 views

How can I auto-insert semi-colon and colon after property autocompletion in css-mode?

Inside a CSS declaration, you got the property, the part before the colon, that can mostly always be auto-completed: strong { color: red; /* <= color is the property */ } After hitting return ...
smonff's user avatar
  • 1,565
4 votes
1 answer
1k views

disable company-mode completion inside comments

This is something that's been bothering me for a while. I think I've configured company-mode backends wrong as I'm also getting company backends when inside comments. Here is my company-mode config ...
Chakravarthy Raghunandan's user avatar
5 votes
1 answer
3k views

Add include paths to flycheck and to company-irony?

I am starting to develop a ROS (Robot Operating System) application for the first time using Emacs. Here is my ~/.emacs.d/init.el configuration for Flycheck and company packages: ;;;;;;;;;;;;;;;;;;;;;...
space_voyager's user avatar
2 votes
1 answer
431 views

Company duplicates

I use gtags, jedi and dabbrev for python. Sometimes the duplicates get a bit annoying. I read that using :with should sort out the duplicates problem. However, it does not... Is there a better ...
Damian Chrzanowski's user avatar
1 vote
0 answers
1k views

How to debug "company backend" initialization problems?

I am getting error messages initializing some company backend packages, but messages only appear in the *Messages* buffer, like: Company backend 'company-web' could not be initialized: Symbol's ...
marcanuy's user avatar
  • 788
2 votes
1 answer
1k views

spacemacs combine yas-snippet + autocomplete

I am pretty new to spacemacs and I am still trying to configure it to my needs. In emacs I use yas-snippet a lot and I am fond of the autocomplete feature in spacemacs. Apparently there is a way to ...
cataclysmic's user avatar
3 votes
1 answer
2k views

Spacemacs: Company-Anaconda doesnt work

I recently installed Spacemacs and am new to it. 0.200.2@24.5.2 (spacemacs) / 14.04 Ubuntu same problem with 0.200.2@26.0.50.2 (spacemacs) / 14.04 Ubuntu Syntax Checking etc. is working fine, but ...
NoMorePen's user avatar
3 votes
1 answer
2k views

Stop company-mode from completing dictionary words

How can I stop company-mode from autocompleting dictionary words? I only want it to autocomplete commands. This is my config: (use-package company :ensure :defer 4 :init (progn (...
NVaughan's user avatar
  • 1,461
2 votes
1 answer
528 views

(key-binding (this-command-keys)) not translating keybindings

I have put the following code (partially adapted from a company-mode issue and a Stack Exchange question) in my init.el in order to adjust the keybindings active in the company-mode completions menu: ...
Radon Rosborough's user avatar
3 votes
1 answer
2k views

How to create grouped company-backends list and an extra one for specific major mode?

Lately, I'm working on how to configure the best grouped company-backends for different major modes, although having been using company-mode for over one year (already got a configuration long time ...
CodyChan's user avatar
  • 2,589
3 votes
2 answers
3k views

How do I install company-mode via `ensure-packages-installed`?

I use a function, ensure-packages-installed to "bootstrap" packages in my .emacs file. This ensures that if the package isn't already install. The follow is at the top of my .emacs: ; ; Set up Emacs ...
Steven Shaw's user avatar
2 votes
3 answers
5k views

spacemacs how to show the documentation of a function during autocomplete in c-c++ layer

I am looking for a good alternative ide for c++ and for that started to lern first vanilla emacs and now spacemacs. I have configured my .spacemacs now to be able to edit lisp code quite comfortably ...
smile13241324's user avatar
4 votes
0 answers
1k views

How to use the auto-completion of jedi while keeping other functions of elpy?

Currently, I have both elpy and jedi installed. init.el is like: (elpy-enable) (elpy-use-ipython) (setq elpy-rpc-backend "jedi") (add-hook 'python-mode-hook 'jedi:setup) (setq jedi:complete-on-dot t)...
purplezzh's user avatar
3 votes
1 answer
619 views

Smarter company/auto-complete

I have moved to Emacs due to its diversity and yes...it simply Rocks! I have one final thing to resolve. I mostly program in python and it is a great feature to auto complete a function with its ...
Damian Chrzanowski's user avatar
1 vote
1 answer
4k views

Can I use emacs with company-mode and company-go to complete Go's standard library function names?

Below is my emacs init file that relates to Go. I'm trying to use company mode to auto completes Go. ;;=================================================== ; Golang related configuration ;;=============...
Just a learner's user avatar
0 votes
1 answer
418 views

Problem with company-anaconda and company-yasnippet

I have tried several setups and I just can't seem to be able to get anaconda and yasnippet working at the same time (dabbrev would be nice as well). First I tried reorganizing the order, it was a ...
Damian Chrzanowski's user avatar
0 votes
0 answers
106 views

Company not active in shell/SQL, but it's says otherwise

I use company-dabbrev as backend (source: How add company-dabbrev to the Company completion popup?). When I open sql-mysql, after filling my credentials, I type show databases; one of the databases ...
ReneFroger's user avatar
  • 3,855
2 votes
1 answer
193 views

how to ignore hyphens in completion candidates using company-dabbrev backend?

How can I modify company-dabbrev to behave like other company-backends, so I also receive words as completion candidates, that are connected with hyphens.
bertfred's user avatar
  • 1,699
10 votes
1 answer
2k views

Is there a company backend for completion in sql-interactive-mode?

I'm using sql-interactive-mode, and I'm in need for a Company backends that will complete SQL keywords, and preferably, also column/table names of the used database. When looking around for any ...
ReneFroger's user avatar
  • 3,855