Giter Site home page Giter Site logo

Comments (3)

d-kimuson avatar d-kimuson commented on September 21, 2024 2

Thanks for the feature request.
Currently, it doesn't support SFC in Vue, not only in takeover mode.

As you guessed, it seems possible to connect in principle, but there is a problem before that.
I am not familiar with the TS connectivity of SFC, but if the first line of the SFC script tag is selected in VSCode, it will be the 10th line, for example, because it is preceded by a template. However, the number of lines expected by tsserver is probably the first line, so there is an incompatibility.

A way to work around this must be provided on the volar side. Or, if not, it is necessary to implement it. The implementation itself is not difficult, since it should be enough to subtract the number of lines from the script tag, but in any case, it will take time.

Also, to support the takeover mode you described, it is necessary to be able to enable ts-type-expand's language-feature-plugin for tsserver from the ts-type-expand extension side.

ref: https://github.com/d-kimuson/ts-type-expand/blob/f00f8900b9d15689ef568bc1e6dab90c7a45aa0c/packages/ts-type-expand/src/extension.ts#L226~L245

If it is possible to simply replace vscode.vue-language-feature and call configurePlugin, it should not be difficult to support, but if this API is not exposed, it will be difficult to support on the ts-type-expand side.

In any case, I understand that there are use cases you want to use in SFC. I will investigate.

from ts-type-expand.

d-kimuson avatar d-kimuson commented on September 21, 2024 1

@brawaru We’ve released a new version with added support for Vue.
https://github.com/d-kimuson/ts-type-expand/releases/tag/v1.2.0

from ts-type-expand.

d-kimuson avatar d-kimuson commented on September 21, 2024

Close.

from ts-type-expand.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.