-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrate to Volar #294
base: main
Are you sure you want to change the base?
Migrate to Volar #294
Conversation
|
// template literal without any interpolations | ||
/^`(?:[^`\\$]+|\\.|\$(?!\{))*`$/.test(value) | ||
// /^`(?:[^`\\$]+|\\.|\$(?!\{))*`$/.test(value) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couldn't figure out why this regex causes hanging in the Volar version but doesn't hang in the non-Volar version...
if (!prettier) { | ||
// Fallback to the built-in version of prettier. | ||
prettier = prettierBuiltIn; | ||
} | ||
|
||
if (!prettierPlugin) { | ||
// Fallback to the built-in version of prettier-plugin-marko. | ||
prettierPlugin = markoPrettier; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IIRC, this is a change to the existing tools. We use the version from the workspace if it exists and fallback to the one built into the plugin if there isn't one in the workspace.
@AngusMorton I appreciate your work and exploration on this and I think it looks good. Right now our biggest priority is getting Marko 6 into a good/usable state and I wan't to avoid spending too much time on tooling related stuff until we get there. I think it would be very good if you maintained this as a fork (and separately published extension) for some time until we can get back to it and review/consider it more seriously. I'm thinking some time in the new year we could work to bring this in and adopt Volar. |
Sounds good! :) I've published it as an extension and will aim to keep it in sync with this repo. Let me know if I can contribute if/when you decide to adopt Volar, I'm more than happy to help however I can. |
This is a proof of concept that shows what it might look like if the Marko Language Tools migrated to Volar as a base. If it's a direction you're interested in, I'm happy to contribute as it resolves some issues we've been having. Otherwise, I'll likely attempt to maintain it as a fork for us to use internally.
This proof-of-concept is roughly complete for our purposes, I've been using it for about a week in our codebase with no real issues.
Motivation and Context
Migrating to Volar resolves the issues we've had with the VSCode plugin on Windows (#240), and it improves the responsiveness of the plugin on Windows.
Why Volar?
MarkoFile
->MarkoVirtualCode
Plugin
->LanguageServicePlugin
TODO
This is fairly untested, I mostly hacked it up so it works with our project.