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

Emmet suggests html tags on Style block and does not have css autocomplete #1244

Closed
sandercoffee opened this issue Apr 28, 2022 · 11 comments
Closed
Labels
duplicate This issue or pull request already exists

Comments

@sandercoffee
Copy link

When trying to write tag name in style block, emmet suggests html tags

image
image

Expected suggestion (only tag name)

image


Not enough, css autocomplete doesn't work

image

Expected suggestion (vetur)

image


Am i forgetting something?
The nuxt 3 documentation recommends switching from vetur to this library, but it still doesn't come close to vetur's features...

thx

@Daydreamer-riri
Copy link

I also encountered the same problem

@johnsoncodehk
Copy link
Member

Thanks for the report, but this is expected. We don't have built-in auto-complete support for stylus, so final volar rollback to root vue document completion. Vetur implement it itself (https://github.com/vuejs/vetur/blob/master/server/src/modes/style/stylus/completion-item.ts).

You can reference to Vetur and implement by Volar langauge service plugin API youself (#1027).
You can also send a PR of your plugin implement to https://github.com/johnsoncodehk/volar-plugins.

@johnsoncodehk
Copy link
Member

Duplicate of #480

@johnsoncodehk johnsoncodehk marked this as a duplicate of #480 Apr 29, 2022
@johnsoncodehk johnsoncodehk added the duplicate This issue or pull request already exists label Apr 29, 2022
@Daydreamer-riri
Copy link

Thanks for the report, but this is expected. We don't have built-in auto-complete support for stylus, so final volar rollback to root vue document completion. Vetur implement it itself (https://github.com/vuejs/vetur/blob/master/server/src/modes/style/stylus/completion-item.ts).

You can reference to Vetur and implement by Volar langauge service plugin API youself (#1027). You can also send a PR of your plugin implement to https://github.com/johnsoncodehk/volar-plugins.

But I ran into similar problems with LESS and CSS

image

@johnsoncodehk
Copy link
Member

johnsoncodehk commented Apr 29, 2022

@Daydreamer-riri This is a different problem, fixed by 0fe0f17.

For stylus it still should show emmet result because there has no available embedded language result.

@Daydreamer-riri
Copy link

image
image
Two files under the same project have different effects

@Daydreamer-riri
Copy link

Daydreamer-riri commented Apr 29, 2022

And script
image
image
@johnsoncodehk Hope to solve,thx

@johnsoncodehk
Copy link
Member

johnsoncodehk commented Apr 29, 2022

@Daydreamer-riri this is upstream @vue/compiler-sfc error tolerance problem, AST parse is failed with incomplete SFC content.

@Daydreamer-riri
Copy link

What can I do? maybe I can only change back to Vetur

@Daydreamer-riri
Copy link

@Daydreamer-riri this is upstream @vue/compiler-sfc error tolerance problem, AST parse is failed with incomplete SFC content.

@johnsoncodehk hello, are you still there?
vetur is working fine, but I really wish I could use valor

@johnsoncodehk
Copy link
Member

@Daydreamer-riri vetur is not use @vue/compiler-sfc to parse SFC, volar use @vue/compiler-sfc because it's vue3 first. You could open a feature request to vue repo for improve error tolerance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

3 participants