[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: help correcting web-mode configuration
From: |
Danny YUE |
Subject: |
Re: help correcting web-mode configuration |
Date: |
Sun, 12 Mar 2017 16:39:04 +0800 |
User-agent: |
mu4e 0.9.18; emacs 25.2.1 |
Hi,
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)
Danny
On 2017-03-12 07:07, Krishnakant <krmane@openmailbox.org> wrote:
> Hello all,
>
> I previously posted on this list regarding a similar issue.
>
> But I guess my explanation may be a bit confusing.
>
> So I will explain it again.
>
> Basically I have decided to use web-mode for my html and javascript work.
>
> I took the decision because I also use Python based tenplating languages
> like jinja.
>
>
> Here is my configuration part in context.
>
>
>
> (require 'web-mode)
> (require 'company)
> (require 'company-web-html) ; load company mode
> html backend
>
>
> (add-to-list 'auto-mode-alist '("\\.html\\'" . web-mode))
> (add-to-list 'auto-mode-alist '("\\.js\\'" . web-mode))
>
> (add-hook 'web-mode-hook '(lambda () ;;
> Company-mode (set (make-local-variable 'company-backends)
> (append company-backends '((company-web-html company-yasnippet))))
>
> No matter what I do, the auto complete using company just does not work
> in web-mode.
>
> Also I am not able to get the auto tag completion working.
>
> Can some one help?
>
> Happy hacking.
>
> Krishnakant.
- help correcting web-mode configuration, Krishnakant, 2017/03/12
- Re: help correcting web-mode configuration,
Danny YUE <=
- Re: help correcting web-mode configuration, Krishnakant, 2017/03/12
- Re: help correcting web-mode configuration, Krishnakant, 2017/03/12
- Re: help correcting web-mode configuration, Danny YUE, 2017/03/12
- Re: help correcting web-mode configuration, Krishnakant, 2017/03/12
- Re: help correcting web-mode configuration, Danny YUE, 2017/03/12
- Re: help correcting web-mode configuration, Krishnakant, 2017/03/12
- Re: help correcting web-mode configuration, Danny YUE, 2017/03/12
- Re: help correcting web-mode configuration, Krishnakant, 2017/03/12
- Re: help correcting web-mode configuration, Danny YUE, 2017/03/12
- Re: help correcting web-mode configuration, Krishnakant, 2017/03/18