-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Support Vue SFC syntax #1665
Comments
Would love support for this |
I really love this library and would be great to have Vue SFC support |
I actually think this may be supportable without a custom syntax. If you load JavaScript & CSS then markup, you should be able to render Vue SFCs in the |
@mAAdhaTTah That won't work. Ignoring the templating syntax, there still is the issue that the |
…it web browsing view PrismJS, the library Tuleap uses to do the syntax highlighting, does not a have a support for the Vue SFC syntax [0] but marking Vue SFC file as "markup" seems to lead to a better highlighting at least in common cases. [0] PrismJS/prism#1665 Change-Id: I88543b9fd6c41bf660c4c94567a9e51690b49f67
|
Prism doesn't have Vue SFC syntax highlighting (PrismJS/prism#1665) so we should alias it to the `html` syntax for the near future
Prism doesn't have Vue SFC syntax highlighting (PrismJS/prism#1665) so we should alias it to the `html` syntax for the near future
Driving by with a +1 for this issue. I'm very happy with Prism on https://codeapprove.com but this is one of the main sticking points. |
+1 for Vue syntax highlighting |
typescript in vue3 work failed such as: <template>{{ num }}</template>
<script lang="ts" setup>
const num: number = 123;
</script>
|
Most likely v2, since v1 is feature frozen. |
The [Vue docs](https://electric-sql.com/docs/integrations/frontend/vue) were using the `vue` syntax highlighting language, which is [not supported by Prism](https://prismjs.com/#supported-languages). There's open issues to support SFC syntax (see PrismJS/prism#1665) but until then using `html` syntax highlighting seems to do a relatively decent job as a workaround. before and after pics: <img width="500" alt="Screenshot 2024-02-28 at 17 29 12" src="https://github.com/electric-sql/electric/assets/12274098/be726ef6-dd83-493c-b459-7b4081094f2e"> <img width="500" alt="Screenshot 2024-02-28 at 17 29 00" src="https://github.com/electric-sql/electric/assets/12274098/dec91b38-cef8-4ea3-9af5-ca362f394905">
Currently, it doesn't seem like Prism (or any other syntax highlighting library) supports the Vue Single File Components syntax.
I'd like to request support for this syntax.
The text was updated successfully, but these errors were encountered: