Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to use coc-html for jquery #17

Closed
laoshaw opened this issue Jun 20, 2020 · 7 comments
Closed

how to use coc-html for jquery #17

laoshaw opened this issue Jun 20, 2020 · 7 comments

Comments

@laoshaw
Copy link

laoshaw commented Jun 20, 2020

I notice jquery ts.d is included, I CocInstall coc-install and put the below to coc-settings:

    "html.format.enable": true,
    "html.validate.scripts": true,
    "html.validate.styles": true,
    "html.autoClosingTags": true,

However when I edit a html or js file I don't see jquery autocomplete, e.g. $("li"). will have nothing shown on dropdown list after pressing TAB. I did not see any jQuery autocomplete(i.e. jQuery keywords) either.

@chemzqm
Copy link
Member

chemzqm commented Jun 20, 2020

It has jquery support.

@laoshaw
Copy link
Author

laoshaw commented Jun 20, 2020

what are the steps to make jquery work with coc-html? I did the steps above but there is no jquery autocomplete whatsoever.

does it have to be a *.js file, or script inside *.html will work too?

all my other languages are working, including javascript actually(by tsserver), but nothing happened to jquery yet. do I need install html language server somewhere or is it installed by CocInstall coc-html automatically? can you give a working coc-settings.json for coc-html?

Thanks,

@chemzqm
Copy link
Member

chemzqm commented Jun 20, 2020

It should just work, but looks like it's broken for some reason.

@phaalonso
Copy link

I have the same problem ;(

@laoshaw
Copy link
Author

laoshaw commented Aug 12, 2020

if I have jquery installed via npm I can get jquery working(without coc-html actually) in js files, but for javascript embedded in html file there is no way to get autocompletion working.

@yesyestoday2020
Copy link

You want this kind of effect

截屏2020-09-13 04 48 10

my use vscode snippet -- jquerysnippets.

@chemzqm
Copy link
Member

chemzqm commented Oct 27, 2020

Fixed on coc-html@1.3.0

@chemzqm chemzqm closed this as completed Oct 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants