Skip to content

feat() add @vue/typescript-plugin to volar - #4869

Closed
s-montigny-desautels wants to merge 1 commit into
mason-org:mainfrom
s-montigny-desautels:feat/vue-typescript-plugin
Closed

feat() add @vue/typescript-plugin to volar#4869
s-montigny-desautels wants to merge 1 commit into
mason-org:mainfrom
s-montigny-desautels:feat/vue-typescript-plugin

Conversation

@s-montigny-desautels

Copy link
Copy Markdown
Contributor

Since version 2.0.0 of the @vue/language-server, @vue/typescript-plugin is required for proper TS support.

I'm not sure if it work that way, or if there is a preffered way to do this. Some guidance is welcome!

See vuejs/language-tools#3925 for the issue in @vue/language-server repo.

Version of the @vue/language-server and @vue/typescript-plugin must match and it's a bit of a pain to maintain both version manually.

Since version 2.0.0 of the @vue/language-server,
@vue/typescript-plugin is required for proper TS support.

@mehalter mehalter left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great. I do think that keeping the versions pinned like this makes sense for the vuejs/language-tools development process and release cycle. It looks like they do maintain the typescript-plugin and language-server in the same mono-repo and tag all of the releases at the same time with the same version.

@williamboman

Copy link
Copy Markdown
Member

It's not clear to me what the intended way to use their TypeScript integration is. My interpretation is that it's no longer bundled with the Vue language server anymore but instead is meant to be used as a plugin to tsserver or typescript-language-server separately?

It also seems like it was re-added as a dependency to the language server in vuejs/language-tools#3944, so this would effectively do nothing?

@mehalter

Copy link
Copy Markdown
Member

You use it as a plugin with tsserver it's configured through the language server settings and is expected to be installed globally which makes it a good candidate for Mason. Other tools also support these language server plugins such as typescript-tools which would utilize this package as well

@mehalter

Copy link
Copy Markdown
Member

Oh yeah the linked PR to add the plugin as a dependency for the language server does seem like it should do enough. I can test tomorrow

@s-montigny-desautels

Copy link
Copy Markdown
Contributor Author

Also, they reverted their changes and the TS support is back in the Vue LSP Server (vuejs/language-tools#4119). Now, it is always enabled by default and the user should opt in to be in hybrid mode. I will test this, but I think this PR can be closed.

@thesimonho

Copy link
Copy Markdown

Also, they reverted their changes and the TS support is back in the Vue LSP Server (vuejs/language-tools#4119). Now, it is always enabled by default and the user should opt in to be in hybrid mode. I will test this, but I think this PR can be closed.

personally I think it'd still be useful for mason to manage typescript-plugin. its nice to have a single source manage the versions of both the plugin and volar, given they need to always match

but more than that, after testing out no hybrid mode it doesn't seem to be as usable as releases before v2 (a lot of incorrect diagnostics etc), so itd be nice to at least have the option of using hybrid mode with the plugin

fyi here is the config im currently using that feels subpar compared to hybrid mode or v1.8.7 (you have to manually disable hybrid mode with nvim): mason-org/mason-lspconfig.nvim#371 (comment)

@s-montigny-desautels

Copy link
Copy Markdown
Contributor Author

An update has been made in the language-tools repo and it's clear that we don't need this PR anymore.
It was added here: vuejs/language-tools#4134

I will close this PR, feel free to re-open it if need be.

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 this pull request may close these issues.

4 participants