unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Danny YUE <sheepduke@gmail.com>
To: Krishnakant <krmane@openmailbox.org>
Cc: "help-gnu-emacs@gnu.org" <help-gnu-emacs@gnu.org>,
	Danny YUE <sheepduke@gmail.com>
Subject: Re: help correcting web-mode configuration
Date: Sun, 12 Mar 2017 21:26:08 +0800	[thread overview]
Message-ID: <87efy2d3tb.fsf@gmail.com> (raw)
In-Reply-To: <15149b53-695b-bcc9-567b-5c44eabf02ca@openmailbox.org>

But it seems to be correct, isn't it?

Because anyway the company-mode returns something that seems
reasonable. What's exactly your problem now?

The completion does not start automatically or something?


Danny


On 2017-03-12 12:43, Krishnakant <krmane@openmailbox.org> wrote:
> 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"
> Completions:
>    #("html" 0 4 (annotation "html")) " -> html"
>
>
> I guess the completions are not correct.
>
> Happy hacking.
>
> Krishnakant.
>
>
> 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
>> said...
>>
>> 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?
>> https://github.com/osv/company-web
>>
>> Danny
>>
>> On 2017-03-12 10:27, Krishnakant <krmane@openmailbox.org> wrote:
>>> Hi Danny
>>>
>>>
>>>
>>> On Sunday 12 March 2017 02:09 PM, Danny YUE wrote:
>>>> 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)
>>>>
>>> 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.
>>> Krishnakant.
>>




  reply	other threads:[~2017-03-12 13:26 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-12  7:07 help correcting web-mode configuration Krishnakant
2017-03-12  8:39 ` Danny YUE
2017-03-12 10:17   ` Krishnakant
2017-03-12 10:27   ` Krishnakant
2017-03-12 12:27     ` Danny YUE
2017-03-12 12:43       ` Krishnakant
2017-03-12 13:26         ` Danny YUE [this message]
2017-03-12 15:10           ` Krishnakant
2017-03-12 15:18             ` Danny YUE
2017-03-12 18:23               ` Krishnakant
2017-03-13  3:17                 ` Danny YUE
2017-03-18  7:04                   ` Krishnakant

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87efy2d3tb.fsf@gmail.com \
    --to=sheepduke@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=krmane@openmailbox.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).