Closed kitten closed 3 months ago
Latest commit: a12809040eaf29e5205ddf8ed5e3291da5089dbf
The changes in this PR will be included in the next version bump.
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
Related: https://github.com/0no-co/gql.tada/pull/232 Related: https://github.com/0no-co/gql.tada/pull/236
Summary
This abstracts our usage of
volar
’s utilities down toVirtualCode
wrappers and abstracts it to have parity with the Svelte file support. The Svelte2TSX compiler has been added to compile Svelte files to TSX as well.Notably, this changes the approach slightly. To risk confusing external files with virtual files, we now create a
SourceFile
of the project file (svelte/vue file) outside of our TypeScript program and don't add it to the project.Redirections to the virtual file and such still function as before. But the biggest change is that all commands will now iterate over the virtual files (e.g.
.vue.ts
and.vue.svelte
) instead of the non-TS project files (.vue
and.svelte
), since those aren't loaded into TypeScript anymore. The output of the logger is hence mapped andgetFilePosition
now uses the position mapper as needed.Set of changes
VirtualCode
project -> virtual
orvirtual -> project
file, so it can be used for both, the GraphQLSP plugin info methods, and the logger outputs