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

feat(vue support): support Volar 1.7.0+ #140

Merged
merged 8 commits into from
Jul 11, 2023
Merged

Conversation

Ilanaya
Copy link
Collaborator

@Ilanaya Ilanaya commented Jul 5, 2023

Since 1.7+ we can't access ts from plugin context

PR Related changelog refs:

  1. Packages names update
  2. [plugins -> services](volar.config.js plugins option has been renamed to services)

Currently I'm really struggling with how to make plugin work again in the latest version. Definitely gonna investigate soon, but any help is very appreciated

Ilya Golovin and others added 3 commits July 6, 2023 02:11
@zardoy
Copy link
Owner

zardoy commented Jul 11, 2023

@maIIady It turns out it was pretty easy to fix, I pushed working version, but of course versions prior 1.7.0 are no longer supported

Changing settings now require server reload, watcher doesnt work for some reason.

Another thing that is not supported is syntax server features, you can try to add workaround:

const syntaticLanguageService = typescriptService.provide['typescript/syntacticLanguageService']({
        version: 0,
        getText() {
            return ''
        },
        uri: undefined
    })

@Ilanaya
Copy link
Collaborator Author

Ilanaya commented Jul 11, 2023

@maIIady It turns out it was pretty easy to fix, I pushed working version, but of course versions prior 1.7.0 are no longer supported

Changing settings now require server reload, watcher doesnt work for some reason.

Another thing that is not supported is syntax server features, you can try to add workaround:

const syntaticLanguageService = typescriptService.provide['typescript/syntacticLanguageService']({
        version: 0,
        getText() {
            return ''
        },
        uri: undefined
    })

I didn't get at all how to implement your workaround and how it should work :(

I checked that it works and updated the related setting implementation but I won't be able to provide support for mentioned features myself

@Ilanaya Ilanaya marked this pull request as ready for review July 11, 2023 22:38
@zardoy
Copy link
Owner

zardoy commented Jul 11, 2023

I checked that it works and updated the related setting implementation but I won't be able to provide support for mentioned features myself

Not a big deal, we can do it later though we can merge now

@zardoy zardoy changed the title feat(vue support): volar update support feat(vue support): support Volar 1.5.0+ Jul 11, 2023
@zardoy zardoy changed the title feat(vue support): support Volar 1.5.0+ feat(vue support): support Volar 1.7.0+ Jul 11, 2023
@zardoy zardoy merged commit 0de80d2 into develop Jul 11, 2023
1 check passed
@zardoy zardoy deleted the volar-update-support branch July 11, 2023 23:23
@zardoy
Copy link
Owner

zardoy commented Jul 11, 2023

Will release tomorrow. For now you can install & use extension from latest run of this pr: https://github.com/zardoy/typescript-vscode-plugins/actions/runs/5525801559

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.

2 participants