I had the same problem and what helped me was this config proposal from the Readme of the prettier-emacs mode:
You can declare a function "enable-minor-mode" in your .emacs-file:
(defun enable-minor-mode (my-pair)
"Enable minor mode if filename match the regexp. MY-PAIR is a cons cell (...
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 major
modes have it turned on. If a list, it should be a list of
major-mode symbol names for which company-mode should be
automatically turned on. The sense ...
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 installing css helpers are here:
npm install -g vscode-css-languageserver-bin
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 scripts. To disable it entirely in ESS, just use
(setq ess-use-company nil)
More useful information about company-mode with ESS can be found here:
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 using M-x customize-face.
I don't use Company, but a quick look at company-template.el, which is where its faces are defined, suggests that maybe the face you ...
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-files (:separate company-dabbrev company-ispell)))
It'd be interesting to know if you get any performance implications in case of large ispell backend candidates ...
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.
Eventually, after contacting both lsp-mode and python-lsp-server maintainers, it was clarified that this lsp-mode setting has to be disabled to prevent ...
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" "_one" "__two" "__one" "one")
(lambda (s1 s2)
(if (and (string-prefix-p "_" s1)
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-mode)
(add-hook 'shell-mode-hook 'my-shell-mode-setup-function)
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:
(To trigger the doc, you may have to wait like a second)
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 the right major-mode etc. for it to take responsibility. In other words, company-slime checks whether it's in common lisp code, and step out of the way if not, ...
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 Rust with Emacs guide comes with a repo that has a working auto completion config via company. When in doubt, compare with that.
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 'cmake-mode-hook 'company-mode)
If you want to disable company-mode in a few major modes, use a hook.
;; enable company-mode everywhere except text-mode and cmake-...
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)
The other answers are valid alternatives, here we are passing a custom-populated file to company to help auto-complete.
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. From the doc (which is only in the file's Commentary section):
;; SAVING/LOADING COMPLETIONS
;; Completions are automatically saved from one session to ...