Hot answers tagged

2

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: https://github.com/emacs-lsp/lsp-mode Specifically:- npm install -g vscode-css-languageserver-bin


2

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 ...


1

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-map (kbd "SPC") #'company-abort) by (define-key company-active-map (kbd "SPC") #'company-abort-and-insert-space) in your init.el file.


1

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 ...


1

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-...


1

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 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 (...


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