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

Linting/Completion is not working for custom blocks #2638

Open
1 task done
joppino opened this issue Jan 12, 2021 · 10 comments
Open
1 task done

Linting/Completion is not working for custom blocks #2638

joppino opened this issue Jan 12, 2021 · 10 comments

Comments

@joppino
Copy link

joppino commented Jan 12, 2021

  • I have searched through existing issues
  • [X ] I have read through docs
  • [X ] I have read FAQ

Info

  • Platform: Linux
  • Vetur/VLS version:0.31.3
  • VS Code (or other LSP client) version: 1.52.1

Problem

Grammar custom block gives syntax highlighting but no completion nor linting.

Reproducible Case

Create a custom block like
test: "ts"
Generate Grammar for customBlocks and reload.

Syntax highlighting is on, but neither completion nor linting works.

@yoyo930021
Copy link
Member

It is designed.

@joppino
Copy link
Author

joppino commented Jan 12, 2021

Why?

@yoyo930021
Copy link
Member

It can significantly increase maintenance costs.
Also, the current structure does not allow this.

@joppino
Copy link
Author

joppino commented Jan 12, 2021

I elaborate:
There are some frameworks (namely: Quasar) which let you add a custom <test/> block inside a vue component. This is greatly helpful to have fully contained components with unit tests. This means one can add a <test lang="jest"> block and put all testing code there. But with no autocomplete it's a PITA to write tests :-)

@yoyo930021
Copy link
Member

I can understand your thoughts.
But it may be necessary to design a complete framework.
Currently there is not enough time to do.
Welcome some PR.

@jods4
Copy link

jods4 commented Jan 31, 2021

I understand that tooling is hard but this is a bit disappointing, it creates a sub-par experience for custom blocks :(

Could you at least disable the default completions that are irrelevant in a custom block context? Look at this screenshot:
image

Also, a related, desirable improvement:
It's OK to declare the custom blocks in settings, but having to run obscure commands and restart VS Code is less than ideal. I would like to put those blocks in my Workspace settings and have them apply correctly whenever I -- or one of my teammates -- open the project.

(If you wonder why everything's red in my screenshot, that's probably a eslint-plugin-vue bug, I reported vuejs/eslint-plugin-vue#1428)

@jasonlyu123
Copy link
Contributor

@jods4 the cause of the second one is unrelated to the original issue. Maybe you can read this issue microsoft/vscode#68647 for more info

@yoyo930021
Copy link
Member

@jods4 first one
I will try to fix it.
#2111

@jods4
Copy link

jods4 commented Feb 1, 2021

@jasonlyu123 I upvoted that VS Code issue 👍. It's old, not sure it's gonna make a difference.

@yoyo930021
Copy link
Member

yoyo930021 commented Feb 1, 2021

I understand that tooling is hard but this is a bit disappointing, it creates a sub-par experience for custom blocks :(

Could you at least disable the default completions that are irrelevant in a custom block context? Look at this screenshot:

I fix it and it will release in 0.32.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants