I haven’t watched Vetur in a while. Problems and PR are piling up. I just categorized all the issues, but I expect it to take about two months to review all the PR and fix most of the bugs. Therefore, I decided to write this article to provide you with some updates and transparency.
This article is divided into four parts:
- Status: How is the project going?
- Development: I plan to continue working on Vetur.
- Sponsorship: I am starting to sponsor to keep my work sustainable.
- Direction: What are the current development priorities
- One last bit of contemplation.
The status quo
Vetur now has 4.8 million downloads on VS Code Marketplace. VLS, Vue language server, is being used in Vim/NeoVim, Emacs, Atom, Sublime Text and CodeSandbox. Sometimes I am surprised by the popularity of Vetur.
At the same time, there were about 200 questions and about 40 PR. Assuming an average of one hour per error, it would take about 16 weeks to fix them. Sometimes @ktsn and @YoYO930021 can help me with sorting issues and sending bug fixes, but I’m still mostly responsible for making fixes and checking PR.
Vetur becomes quite complex in three ways:
It needs to support all the languages that are allowed in.vue files. Vetur now offers syntax highlighting and language features HTML/CSS/SCSS/less/ stylus/ js/ TS, but only syntax highlighting pug/ haML/SLM/PostCSS/sass/ coffee. People are interested in the language features of pug/ postCSS/sass, but I don’t have the time. It needs to implement all Language functionality in the Language Server Protocol. These include autocomplete, diagnose errors, hover information, sign help, collapse, jump to definition, rename, format, and more. Now multiply that by the number of languages above. It needs to integrate well with many other libraries. TypeScript is the one that requires the most effort, because sometimes I need to dig deep to solve language functionality or performance problems. Other libraries such as Emmet, language services, formatters and Linters also need time. Although I aim to provide a fast, smooth development experience for Vue users, managing all of these aspects is difficult. Developing a language server for a language has become a full-time job. Implementing TypeScript support in VS Code used to be my full-time job. Sometimes work can be overwhelming.
The large surface area does make this work challenging, but it also provides opportunities for innovation. Vue interpolation language capabilities and the Vetur terminal interface are some examples. In overseeing all of these aspects, I have many ideas for pushing the boundaries of development experience. Now that I have more time, I will start experimenting with these ideas.
Vetur can now help shape the Vue ecosystem. Vetur’s framework support is now available with nine popular Vue libraries. For example, when you install Nuxt or Quasar, these frameworks include automatically generated JSON metadata files in their NPM packages. Vetur then selects them and gives you auto-complete and hover information in the editor. I want to standardize and drive adoption of the format so that people can learn and use new Vue based libraries in the future just as easily as they can learn and use JS libraries today by installing the @Types package.
Supporting Vue has always been a focus of Vetur, but I’m glad to see Vetur being used in the wider Web community, both for VUe-related development and for unrelated projects. For example, VScode-Weex uses Vetur support weeX and SvelteJS/language tools built on Vetur to support slim.
Overall, I think with some bug fixes and PR, Vetur will be in good shape again and provide a mature foundation for innovation in the Web development experience. I’ll talk about how I plan to move forward.
The development course
I quit my job at Microsoft and am now doing independent study/research in Shanghai. I’ve been busy transitioning, but now I’m settled and ready to be developed again. Given my other commitments, I spend about 15 hours a week contributing to open source. I plan to spend most of my money on Vetur.
With so many functions, I think it’s no longer feasible for me to solve all problems by myself. Many others wanted to help, but I didn’t make it easy for Vetur to contribute. Here’s my plan to make contributions flow more smoothly:
There are clear problem templates and standards. Strictly close all non-compliance questions. Isolate feature areas that can be developed independently. Establish clear interfaces between Vetur and these separate areas. Check pr in time (I didn’t). Write more documentation to contribute to each area. For example, how do you add new framework support? How to debug and fix TextMate syntax problems? How are performance issues tracked? Here are some of my personal projects:
Build my personal project using Vue + TypeScript. Write everything down. On the one hand, I can eat Vetur and make improvements when I meet problems. On the other hand, I haven’t seen an exhaustive guide to using Vue + TS, so I think I’ll write one. Spend some time each week on research and experimentation based on the Vetur Foundation to improve the Vue/Web development experience. Write down what I found. Don’t worry about perfection and production quality. To be honest, maintaining an open source project is not fun. Sometimes I don’t want to see all the notifications. But now I realize I should have taken a firmer stand. I won’t let the money or the urgency of the problem take the fun out of the project. I don’t spend 40 hours a week fixing mysterious bugs. Having some fun isn’t optional, it’s essential:
I think it’s important to keep computing fun in computer science. When it started, it was so much fun. Of course, paying customers get into trouble from time to time, and after a while we start taking their complaints seriously. We began to feel that we were really responsible for the successful use of these machines, the error-free use of these machines. I don’t think we are. I think we have a responsibility to stretch them, to take them in new directions, and to keep it fun indoors. I hope the field of computer science never loses its sense of fun. Above all, I hope we don’t become missionaries. Don’t feel like a bible salesman. There are already too many in the world. You’ll learn what others know about computing. Don’t feel like the key to successful computing is in your hands. What’s in your hand
— Ellen J. Perlis
sponsors
I’m launching a GitHub sponsorship campaign to keep work sustainable. If Vetur helps you, please consider sponsoring me.
During my four years in Vetur, money was not my purpose or focus. I am studying Vetur out of concern, curiosity and love. In terms of rewards, I get the occasional thank-you email from a stranger. They warm my heart.
But after I quit, I couldn’t ignore money anymore. On the one hand, my savings will run out within a day, and I need to plan for that. On the other hand, maintaining Vetur took a lot of my time doing personal research/learning while I quit my high paying job.
Even though money is something I can’t ignore right now, I don’t look for certain options. Some language extensions charge for advanced features. I will never change the OSS license or charge you for any use of Vetur.
If Vetur simplifies the process of using Vue for you, consider offering a small sponsorship, such as a latte per month.
If you use Vetur to develop commercial products, or embed Vetur in a commercial online IDE, consider expanding your sponsorship.
Thank you for removing money from my list of concerns so I can focus on making Vetur better and contributing to the Vue ecosystem.
The direction of
Here’s what I’ll be focusing on in the near term:
Ensure that both Vue 3 and Vue 2 are supported. Improve TypeScript integration to bring TypeScript functionality to Vue files (automatic imports, refactoring, organizational imports, and so on). Accommodate more complex project setups. Finalize the exchange format that describes the shapes of Vue components. The framework should generate data in this format and feed it to Vetur. The VLS should generate data in this format on the fly for the user component. This data is then used for language functions such as autocomplete and error checking. Improve the VTI. Improve performance. Create performance test suites and investigate performance issues. Compare Windows support to macOS/Linux support. Improved pretty/pretty support. This list will take at least 2 months. I will keep the roadmap updated.
meditation
In the past, learning Vue, or any framework, tended to be a decentralized process. You read the API. Copy and adapt. Write some code. Find errors. Go back to the reading API. Resolve errors. A lot of back and forth. Vetur blurs the lines between processes. You can learn and write Vue in a loop. Vetur speeds you up and gives you confidence.
Sometimes I feel like the process of learning Vue is not that different from traveling somewhere, because you don’t know a language and a culture. The sense of uncertainty is similar. You worry about using the wrong phrase. You desperately want to find a good restaurant Google. My hope for Vetur is that, as a tour guide, he will always be with you, teaching you the language, taking you to local restaurants, and then fading into the background to give you the joy of discovery. I hope Vetur can help you play Vue and have fun. I hope Vetur also helps you build large applications with confidence. It’s a lot of work, but it’s my goal, and your generosity will help me get there.