[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: help correcting web-mode configuration

From: Krishnakant
Subject: Re: help correcting web-mode configuration
Date: Sun, 12 Mar 2017 18:13:38 +0530
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0

Sorry my stupidity,

I hadn't started typing when I did company-diag.

here is the output when I try to start <html tag.

Used backend: company-web-html
Prefix: "htm"
  #("html" 0 4 (annotation "html")) " -> html"

I guess the completions are not correct.

Happy hacking.


On Sunday 12 March 2017 05:57 PM, Danny YUE wrote:
This is really strange...

You see, if 'company-diag' says that your back-end gives no completion,
which is actually wrong because 'company-web-something' does work as you

Wait, why the "Prefix" is nil? It should be a string storing the
characters you have typed when invoking the command.

In Emacs Lisp mode if I type "(add" then invoke 'company-diag, I get:
Prefix: "add"
which is correct...

By the way are you using this pacakge?


On 2017-03-12 10:27, Krishnakant <> wrote:
Hi Danny

On Sunday 12 March 2017 02:09 PM, Danny YUE wrote:

I barely use web-mode because I seldom write HTML etc, but I use
company-mode a lot and find it sometimes tricky to setup.

I noticed that you set company-backends locally, but you have to make
sure it's actually being called.

You can tackle it down by 2 steps:
1. Try command 'company-web-html' or something provided by your company
web-mode package. If it's giving you the completions, this step is
passed. Otherwise, you have problem setting up the package itself.

2. Try command 'company-diag' to see what back-end it's using currently,
and if the back-end it's using is not what you want, maybe you have to
set the company-backends without append. For example:

(defun web-mode-setup-company ()
    (make-local-variable 'company-backends)
    (setq company-backends '(company-web-html)))
(add-hook 'web-mode-hook 'web-mode-setup-company)

This is the output from company-diag

Used backend: company-web-html
Prefix: nil
Completions: none
I get same result of company-diag even after adding your code to init.el
Happy hacking.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]