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

Setup watcher from language server #2037

Closed
rchl opened this issue Oct 18, 2022 · 2 comments
Closed

Setup watcher from language server #2037

rchl opened this issue Oct 18, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@rchl
Copy link
Collaborator

rchl commented Oct 18, 2022

Can the watcher that is currently set up in the extension:

https://github.com/johnsoncodehk/volar/blob/3188470419035536208ac35080699b93986051a8/extensions/vscode-vue-language-features/src/nodeClientMain.ts#L69-L71

be set up directly from the language server using registerCapability? It would be compatible with various editors and not require extra client glue.

Also, does it really need to watch *.vue files since those report didChange notifications already?

@johnsoncodehk
Copy link
Member

be set up directly from the language server using registerCapability? It would be compatible with various editors and not require extra client glue.

Could you share some code reference?

Also, does it really need to watch *.vue files since those report didChange notifications already?

Yes we need because unopen file will not emit didChange event, and we also need the fileCreate and fileDelete events.

@rchl
Copy link
Collaborator Author

rchl commented Oct 18, 2022

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants