Contribution is welcome! There are many ways you could help Vetur's development:
- Writing Code
- Improving Doc
- Managing Issues
Comment on feature requests that you'd like to contribute before sending PR.
- Prettier with 120 print-width
Code Dev Guide
Vetur consists of 2 parts
- Language Client as a normal VS Code extension
- Vue Language Server
The language client launches Vue Language Server on port 6005 whenever a Vue file is opened.
yarn cd server && yarn && cd .. yarn compile # or yarn watch
- The extension has 2 configurations for debugging i.e client and server.
- Run the client configuration first.
- As the client launches the language server lazily, open any .vue file so that the server is started.
- Run the server configuration which binds the server code to port 6005 to enable debugging.
- At this point breakpoints in both server and client code should work.
- Alternatively, you can run the 'all' compound debug config too. You need to make sure to open a .vue file within 10 seconds so the server can be started and attached to
It should look like this:
You can use this setting to make Vetur load a development version of
vue-language-server. Some use cases:
- You fixed a bug in Vetur, but the PR is pending and won't be published anytime soon.
- You want to use TS 3.1, but Vetur bundles TS 2.8.
- You are contributing to Vetur, and would run alpha/beta/RC versions in your daily development to provide feedback and find bugs.
Two ways of using it:
yarn global add vue-language-serverand point the setting to
yarn global dir+
- Clone this repo, build it and point it to the ABSOLUTE path of
Grammar Dev Guide
- Open the yaml files in
- After editing use either
npm run build:grammarto build the json files
- If you changed the
vue.yamlfile, be sure to run the
vetur.generateGrammarcommand from the vscode command palette
Tip: In VS Code, use F1 -> Inspect TM Scopes to view language scopes to debug the grammar:
PR that fixes grammar & typo or clarify & illustrate usage is welcome.
- Answer other people's questions
- Make & ask for repro cases