question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Enable vetur to work with VS Code on the Web

See original GitHub issue

👋 I’m Isidor, a PM from the VS Code team, and we recently announced VS Code for the Web at https://vscode.dev/, which provides a free, zero-install Microsoft Visual Studio Code experience running entirely in your browser. You can learn more here.

We’d like to ensure vetur can run in the web, and we have a guide for enabling extensions for the web here. As a couple of highlights:

  • In VS Code for the Web, both the UI and extension host run inside the browser.
  • A web extension is structured like a regular extension, but with a different main file: it’s defined by the browser property
  • Access to workspace files needs to go through the VS Code file system API accessible at vscode.workspace.fs
  • There are currently three ways to test a web extension

I checked your extension and I see there are quite some node dependencies, so this transition to web might not be trivial. However it would be cool if you could at least contribute grammars for web, and using when clauses disable all other contributions which can not work on the web.

We are also open to helping here. Let us know what you think. Thanks!

@aeschli @octref

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:2
  • Comments:13 (5 by maintainers)

github_iconTop GitHub Comments

5reactions
jriekencommented, Apr 20, 2022

How does the typescript extension solve this problem to support the Web IDE?

This is being worked on. Today, the TypeScript web extension is more or less single file, e.g it doesn’t support cross file features like find references. You correctly pointed out that tsserver is all sync and unfortunately that won’t change. The current plan is to add logic to tsserver to add a virtual, synchronous file system which is updated and initialized by async messages. This is the corresponding issue: https://github.com/microsoft/TypeScript/issues/47600.

3reactions
jriekencommented, Apr 26, 2022

of language server will cause performance issues, it seems not proven in tsserver yet and I have to try.

I do something similar with vscode-anycode and it seems to work. What I do is this: build a glob pattern with all types of files that I support and search for them. I later open them one by one to digest them. There is some tricks and a tad of remote hub knowledge to not get blocked. We are thinking about better API for this but meanwhile that works

Read more comments on GitHub >

github_iconTop Results From Across the Web

Vue JavaScript Tutorial in Visual Studio Code
Vetur is only one of many Vue.js extensions available for VS Code. You can search in the Extensions view (Ctrl+Shift+X) by typing 'vue'....
Read more >
Setup | Vetur - GitHub Pages
Vue tooling for VS Code.
Read more >
VS Code for Vue.js Development Tutorial - Flavio Copes
Vetur provides VS Code the ability to use your favorite snippets in Single File Components. IntelliSense. IntelliSense is also enabled bye Vetur, for...
Read more >
Vue.js VSCode Vetur Emmet and Scaffold Snippets not ...
Yep, it's enabled - when I view the Vetur extension, it says "This extension is enabled globally." – Andrea. May 27, 2020 at...
Read more >
Configure VS Code - Quasar Framework
Then you need to tell VSCode to add a configuration to the debugger. The easiest way to do that is to click on...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found