-
Notifications
You must be signed in to change notification settings - Fork 8
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
Adapt to typescript-plugin approach #221
Comments
Is there any ETA when can we expect this? It seems like issue with changes in related files is fixed with TS plugin approach. |
I don't have time to work on that at the moment. Maybe in few months. But my current thinking is that it should:
|
It seems like Volar 2.0 has reached stable state: https://gist.github.com/johnsoncodehk/62580d04cb86e576e0e8d6bf1cb44e73 I’m currently using fork where I’ve updated dependencies and am using following configuration for LSP-typesript and it seems to be working: {
"initializationOptions": {
"plugins": [{
"name": "@vue/typescript-plugin",
"location": "{path to Volar dependecies}/node_modules/@vue/typescript-plugin",
"languages": ["vue"]
}]
},
"selector": "source.js, source.jsx, source.ts, source.tsx, text.html.vue"
} |
As far as I understand, the plugin only handles standalone So I'm not sure how we should go about it. Whether LSP-volar should configure LSP-typescript plugin behind the scenes or should we put that responsibility on the user by editing |
Yes, that is correct. Both LSPs need to be active for Vue files, hence the
Completely automatic feels magical if it means that user-specific LSP-typescript settings get changed, I just think it would look weird if users settings get changed without any information (maybe some comment inside settings which explain why the change is there). If it can be done without user knowing that initialization options are changed then I think it’s good. Otherwise, helper seems okay approach, and even instructions in documentation are OK, but it’s definitely something power users know. Are there any similar examples of these kind of changes? |
I'm trying @niksy fork and have it working with by using the snippet above. However... is it just me or does getting that path to that node_modules dir really suck? I've ended up with an absolute path that includes a version number. If users had to fix that every time the plugin updated that would be painful.
|
btw i started looking because Vue 3.5's |
Yes, unfortunately, you need to use absolute path to plugin. This could definitely be solved at LSP client level as mentioned by @rchl:
Other than that: @dten, do you find it working properly for you? I’m asking because I haven’t seen others using this approach and we could all benefit from real world usage so we know what needs to be changed in official client. |
I've only been using it a few hours but everything seems fine so far |
https://github.com/sublimelsp/LSP-vue now runs on latest version of Vue Language Server so I would consider this resolved even if it's currently not using the plugin approach. I intend to get the plugin approach (hybrid mode) support but currently it's a bit trickly for few reason listed in sublimelsp/LSP-vue#130 |
New version of Vue Language Tools is implemented using a typescript plugin rather than standalone server. We should support that approach.
(We shouldn't need to rush since it will take some time for it to iron out new issues)
Some ways of handling it:
The text was updated successfully, but these errors were encountered: