Recommended resources to reference before we release the documentation #53
johnsoncodehk
started this conversation in
General
Replies: 1 comment
-
Additional: I also highly recommend using Volar.js Labs for debugging. Implement reference: |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I get many requests for documentation, but since the API design is still unstable, it doesn't make much sense to write documentation at the moment, as it will most likely be outdated very quickly.
Instead I suggest you refer to the implementation examples in the community.
This is a very simplified diagram of how the modules work together in the current version (v1.8).
Common Misconceptions
The current version number is 1.x, which does not mean it is stable, because the version number actually inherits from
vuejs/language-tools
. The real first stable release will be 2.0.Volar.js is described as a framework for implementing embedded language, but in actuality Volar.js implementation is both conventional regular language and embedded language, and it works with any language other than meta-frameworks. Even if you don't need embedded language support, you can still take advantage of Volar.js' infrastructure of LSP, Monaco, CLI integration, and more.
Getting Started
I suggest you start from https://github.com/volarjs/starter, try to compile, run it and look at the code, you should be able to understand the concept of Volar.js, especially how to create VirtualFile and handle mapping. This is the basis for all integrations.
LSP server + VSCode extension
Integration reference:
LSP server for Web (github.dev, vscode.dev)
LSP clients other than VSCode
Integration reference:
@volar/typescript
for TS plugin (tsserver plugin)For an introduction to TS plugin, please refer to the official documentation: https://github.com/microsoft/TypeScript/wiki/Writing-a-Language-Service-Plugin
Integration reference:
typescript-vue-plugin
: https://github.com/vuejs/language-tools/blob/master/packages/vue-typescript/src/index.ts@astrojs/ts-plugin
: https://github.com/withastro/language-tools/blob/main/packages/ts-plugin/src/index.tstypescript-plugin-asset
: https://github.com/mizdra/typescript-plugin-asset@volar/typescript
for tscIntegration reference:
vue-tsc
: https://github.com/vuejs/language-tools/tree/master/packages/vue-tscMonaco
Integration reference:
Services API
Integration reference:
volar-service-*
: https://github.com/volarjs/servicesScripts API (
@volar/kit
)Introduction: https://blog.vuejs.org/posts/volar-a-new-beginning
Integration reference:
Beta Was this translation helpful? Give feedback.
All reactions