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

Bug: vim-lsp fails to parse headers sent from volar when using @volar/vue-language-server with --stdio flag #1043

Closed
tsukkee opened this issue Mar 15, 2022 · 3 comments · Fixed by #1046
Labels
bug Something isn't working

Comments

@tsukkee
Copy link
Contributor

tsukkee commented Mar 15, 2022

For example, when the user don't set volar.config.js, volar v0.33.0 or later calls console.log for logging. But, when using volar with --stdio, texts output from console.log also included to messages sent to vim-lsp. Then, it breaks parsing function in vim-lsp and I cannnot use volar... After I replaced console.log to console.warn, which means the message goes to stderr, both volar and vim-lsp look work fine.
https://github.com/johnsoncodehk/volar/blob/3852ee85c8d7a8e20e0bca084d2b73cf11491f93/packages/vue-language-service/src/languageService.ts#L519

Also, following code could cause same problem.
https://github.com/johnsoncodehk/volar/blob/271cdc7c3ad9f93725b422ce7e4086775b09929b/packages/shared/src/ts.ts#L142

@johnsoncodehk johnsoncodehk added the bug Something isn't working label Mar 15, 2022
@johnsoncodehk
Copy link
Member

Thanks for the report! Don't know that logging had big impact. 😅

@tsukkee
Copy link
Contributor Author

tsukkee commented Mar 15, 2022

@johnsoncodehk If just replacing console.log to console.warn is good solution for this project, I'll make pull request for this. Does it look good to you? If no, I'll just wait for the fix.
Anyway, I'm very happy since now I could share the problem with you 😄 Thank you!

@johnsoncodehk
Copy link
Member

Of course, nice to have a PR for this. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants