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

Remove VSCode dependency #2

Closed
johnsoncodehk opened this issue Jul 27, 2021 · 9 comments · Fixed by #4
Closed

Remove VSCode dependency #2

johnsoncodehk opened this issue Jul 27, 2021 · 9 comments · Fixed by #4

Comments

@johnsoncodehk
Copy link
Contributor

Thanks to create this coc extension!

This extension seem dependency VSCode, maybe helpful if I remove appRoot option and publish @volar/vscode-server?

@yaegassy
Copy link
Owner

yaegassy commented Jul 27, 2021

Oh, I was surprised to receive a message from @johnsoncodehk. Thanks for checking out my experimental repository. 🙇

If it works correctly without the appRoot setting, it would be helpful if the appRoot setting option could be removed.

Also, if you could publish @volar/vscode-server to "npm", it would make it possible for other editors, including Vim, to install the server smoothly.


On a different note, I would like to talk about HTML tag completion in <templates>.

Currently, I think it may not work without the built-in html-language-features in "Visual Studio Code". (I'm sorry if I'm wrong)

Other editors, such as Vim and Emacs, do not have html-language-features. :(

VLS (Vue Language Server) works comfortably with "HTML tag completion" in <template>.

It would be helpful if you could add HTML tag completion to @volar/vscode-server itself. 🙇

@johnsoncodehk
Copy link
Contributor Author

appRoot config is used to require TS library, I can remove it but we need a new option to pass available TS library path to @volar/vscode-server. In this project you can install typescript and pass extension's node_modules/typescript/lib path to server.

html-language-features is not not necessary, but HTML tag completion is not a part of LSP, so we need to implement it in language client. See:

@yaegassy
Copy link
Owner

Thanks for the explanation. I'll be referring to them!

@yaegassy
Copy link
Owner

@johnsoncodehk

I minimum ported tagNameCase.ts and attrNameCase.ts, and now I can auto complete "HTML tags", "component names", and "directives" in <template>.

coc-volar-demo

(I may have been mistaken about something)

Anyway, thanks for the advice! 🙇

@johnsoncodehk
Copy link
Contributor Author

Sorry I thought you talking about the tag auto-closing feature. 🤣

Currently the language server relies on too many client requests, I will reduce it, and check for share the code of @volar/language-client to a certain extent.

Planned to be updated over the weekend.

@fannheyward
Copy link

do not have html-language-features

@yaegassy does coc-html work for this? cic-html is a almost clone of html-language-features.

@yaegassy
Copy link
Owner

@fannheyward Thank you for the information. 🙇

I confirmed that volar can provide HTML tag completion by itself, but if I run coc-html, the HTML tag completion will be duplicated.

I interpreted html-language-features as being used for the tag-close feature, so I lowered the priority of the tag-close feature and removed the coc-html dependency once and for all.

@johnsoncodehk
Copy link
Contributor Author

johnsoncodehk commented Jul 30, 2021

volar enable html-language-features to resolve microsoft/vscode#98621. vscode 1.58 already fix it so volar will remove html-language-features and css-language-features in next version.

But still require typescript-language-features because it still use setLanguageConfiguration api. See https://github.com/microsoft/vscode/blob/main/extensions/typescript-language-features/src/languageFeatures/languageConfiguration.ts#L103.
Track issue: microsoft/vscode#125748.

I think this extension is not require coc-html, coc-css... at all, because it seem a vscode specific problem.

@johnsoncodehk
Copy link
Contributor Author

johnsoncodehk commented Jul 30, 2021

Please use https://www.npmjs.com/package/@volar/server. All client requests is optional now, but please keep provide GetDocumentVersionRequest because it has a big impact on performance.

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

Successfully merging a pull request may close this issue.

3 participants