From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Danny YUE Newsgroups: gmane.emacs.help Subject: Re: help correcting web-mode configuration Date: Sun, 12 Mar 2017 16:39:04 +0800 Message-ID: <8737ei28k7.fsf@gmail.com> References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1489308046 32249 195.159.176.226 (12 Mar 2017 08:40:46 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 12 Mar 2017 08:40:46 +0000 (UTC) User-Agent: mu4e 0.9.18; emacs 25.2.1 Cc: "help-gnu-emacs@gnu.org" To: Krishnakant Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Mar 12 09:40:39 2017 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cmz3K-0006yL-FN for geh-help-gnu-emacs@m.gmane.org; Sun, 12 Mar 2017 09:40:34 +0100 Original-Received: from localhost ([::1]:46201 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cmz3O-0003T0-NC for geh-help-gnu-emacs@m.gmane.org; Sun, 12 Mar 2017 04:40:38 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51502) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cmz2r-0003Re-S2 for help-gnu-emacs@gnu.org; Sun, 12 Mar 2017 04:40:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cmz2o-0001SM-Ik for help-gnu-emacs@gnu.org; Sun, 12 Mar 2017 04:40:05 -0400 Original-Received: from mail-pg0-x242.google.com ([2607:f8b0:400e:c05::242]:33908) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cmz2o-0001Qf-Ci for help-gnu-emacs@gnu.org; Sun, 12 Mar 2017 04:40:02 -0400 Original-Received: by mail-pg0-x242.google.com with SMTP id b5so14969145pgg.1 for ; Sun, 12 Mar 2017 00:40:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=xk99Z0irhYeuBlQsgdSuNxIi1p63rgxQNsdL4Ik7PAA=; b=CnAC1jjyggt7t/QUrPdeuG2C2ETASdhgs5+gJSyKN/SVftcHQqM/8ZkDWZJ97cagJy wnVHRaNqB9G9ym0zBcT/k/i++oQlRne8jOIge+iofy80l5LnlZzIwhSmeBf7l0TfxozO vf+RKJaOdvHNfWaSG6gzQpcEQpS/ovvdhggVELmkJOALZxua891SCKlsvn/t35HV0dEk 7FLacxYieq3Ke6H0TbU8CMTF/mY4l6GpX+ZuocijD8oCWLYkCapJPrQcol+KMd6mLUX+ 1k9cNKHctBSLGnNOgPK1o/lW8cMMtB+1H83W4/1KQWEQN8GV9UTco2Jgk3LrzDmTF/3V 9v6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=xk99Z0irhYeuBlQsgdSuNxIi1p63rgxQNsdL4Ik7PAA=; b=kjv/RuLnvIdOYB9xz7NT5Wd55qAv2X7Q/36Qd4A2UFKY2HGHAnyKBC7ooO7drE8vRE bV4Rrn2a13wwfryK5g25bofwzuqEj2Rtrtz80gSnuObuQDO02ANqN9LIBPPmfZ3VWbiN WQ9NMTAaDfs3ryEnP9wvLjMlhUOTKyL4GVQQbZyovDmeWYqvAmQQeUFvWXa+tDDeRJXF wlA+vhkNj7TQOH2+J5l8RSfTkVKPFYVxNP7jjBvWs7Jv4ZaoZ/zXLs2VX847j3aLyPfS nqXf3bim4+KgeAOGI7UeQMdFFJoHQHd9gD3lpCDILwN3gMtIUXthm1H8liL7lDq2zJhM 4uxA== X-Gm-Message-State: AMke39lNq4v64bwtV+nmqsGuEwieCe6U5OmbfsvGOSTsOLo9e8MAMJOz+gZHIbVA4JwTrg== X-Received: by 10.84.224.133 with SMTP id s5mr37822528plj.93.1489307999746; Sun, 12 Mar 2017 00:39:59 -0800 (PST) Original-Received: from localhost (23.83.238.120.16clouds.com. [23.83.238.120]) by smtp.gmail.com with ESMTPSA id t189sm27430385pfb.81.2017.03.12.00.39.57 (version=TLS1_2 cipher=AES128-GCM-SHA256 bits=128/128); Sun, 12 Mar 2017 00:39:58 -0800 (PST) In-reply-to: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c05::242 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:112540 Archived-At: 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 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.