mirror of
https://github.com/laosb/SvelteNova.git
synced 2025-04-30 20:51:10 +00:00
Merge pull request #2 from pierreminik/main
v0.1.5: Restoring syntax fix for javascript and added typescript
This commit is contained in:
commit
916d5a74fc
4 changed files with 248 additions and 83 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -4,3 +4,4 @@ SvelteNova.novaextension/README.md
|
|||
SvelteNova.novaextension/CHANGELOG.md
|
||||
SvelteNova.novaextension/LICENSE
|
||||
SvelteNova.novaextension/Scripts/**/*
|
||||
.DS_Store
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
# v0.1.5
|
||||
|
||||
- Fixed missing syntax highlighting for script tags (added by @pierreminik who copied updates from @tommasongr's [vue extension](https://github.com/tommasongr/nova-vue)).
|
||||
|
||||
# v0.1.4
|
||||
|
||||
- `chmod +x` before try starting server.
|
||||
|
|
|
@ -350,92 +350,252 @@
|
|||
<collections>
|
||||
<!-- Tags -->
|
||||
<collection name="tags">
|
||||
<!-- Script -->
|
||||
<scope name="html.embedded.script" spell-check="false" lookup="documentation">
|
||||
<starts-with>
|
||||
<expression>(?=<(?i:script)\b)</expression>
|
||||
</starts-with>
|
||||
<ends-with>
|
||||
<!-- Typescript -->
|
||||
<scope name="html.embedded.block.script" spell-check="false" lookup="documentation">
|
||||
<starts-with>
|
||||
<expression>(?=<(?i:script)\b)(?=[^>]*lang=('ts'|\"ts\"))(?![^/>]*/>\s*$)</expression>
|
||||
</starts-with>
|
||||
<ends-with />
|
||||
<subscopes anchored="true" skip-whitespace="false">
|
||||
<scope name="html.tag.script.open">
|
||||
<symbol type="tag-script">
|
||||
<display-name>
|
||||
<component variable="name" />
|
||||
<component selector="html.tag.attribute.value.link" prepend=" – " />
|
||||
</display-name>
|
||||
<context behavior="start" group-by-name="true">
|
||||
<auto-close string="</" completion="${name}>" />
|
||||
</context>
|
||||
</symbol>
|
||||
<starts-with>
|
||||
<expression><((?i:script))</expression>
|
||||
<capture number="1" name="html.tag.name" />
|
||||
</starts-with>
|
||||
<ends-with>
|
||||
<expression>/?></expression>
|
||||
</ends-with>
|
||||
<subscopes>
|
||||
<include syntax="html" collection="attributes" />
|
||||
</subscopes>
|
||||
</scope>
|
||||
<scope name="html.embedded.block.script.content">
|
||||
<starts-with>
|
||||
<expression>(?<=>)</expression>
|
||||
</starts-with>
|
||||
<ends-with>
|
||||
<expression>(?=</(?i:script)\b)</expression>
|
||||
</ends-with>
|
||||
<subscopes>
|
||||
<scope name="html.tag.script.open">
|
||||
<symbol type="tag-script">
|
||||
<display-name>
|
||||
<component variable="name" />
|
||||
<component selector="html.tag.attribute.value.link" prepend=" – " />
|
||||
</display-name>
|
||||
<context behavior="start" group-by-name="true">
|
||||
<auto-close string="</" completion="${name}>" />
|
||||
</context>
|
||||
</symbol>
|
||||
<starts-with>
|
||||
<expression><((?i:script))</expression>
|
||||
<capture number="1" name="html.tag.name" />
|
||||
</starts-with>
|
||||
<ends-with>
|
||||
<expression>/?></expression>
|
||||
</ends-with>
|
||||
<subscopes>
|
||||
<include syntax="self" collection="attributes" />
|
||||
</subscopes>
|
||||
</scope>
|
||||
<scope name="html.embedded.script.content">
|
||||
<starts-with>
|
||||
<expression>(?<=>)</expression>
|
||||
</starts-with>
|
||||
<ends-with>
|
||||
<expression>(?=</(?i:script)\b)</expression>
|
||||
</ends-with>
|
||||
<subsyntax name="javascript">
|
||||
<cut-off>
|
||||
<expression>(?=</(?i:script|head|body|div)\b)</expression>
|
||||
</cut-off>
|
||||
</subsyntax>
|
||||
</scope>
|
||||
</subscopes>
|
||||
</ends-with>
|
||||
<subsyntax name="typescript">
|
||||
<cut-off>
|
||||
<expression>(?=</(?i:script)\b)</expression>
|
||||
</cut-off>
|
||||
</subsyntax>
|
||||
</scope>
|
||||
</subscopes>
|
||||
</scope>
|
||||
|
||||
<!-- Style -->
|
||||
<scope name="html.embedded.style" spell-check="false" lookup="documentation">
|
||||
<starts-with>
|
||||
<expression>(?=<(?i:style)\b)</expression>
|
||||
</starts-with>
|
||||
<ends-with>
|
||||
<!-- Javascript -->
|
||||
<scope name="html.embedded.block.script" spell-check="false" lookup="documentation">
|
||||
<starts-with>
|
||||
<expression>(?=<(?i:script)\b)</expression>
|
||||
</starts-with>
|
||||
<ends-with />
|
||||
<subscopes anchored="true" skip-whitespace="false">
|
||||
<scope name="html.tag.script.open">
|
||||
<symbol type="tag-script">
|
||||
<display-name>
|
||||
<component variable="name" />
|
||||
<component selector="html.tag.attribute.value.link" prepend=" – " />
|
||||
</display-name>
|
||||
<context behavior="start" group-by-name="true">
|
||||
<auto-close string="</" completion="${name}>" />
|
||||
</context>
|
||||
</symbol>
|
||||
<starts-with>
|
||||
<expression><((?i:script))</expression>
|
||||
<capture number="1" name="html.tag.name" />
|
||||
</starts-with>
|
||||
<ends-with>
|
||||
<expression>/?></expression>
|
||||
</ends-with>
|
||||
<subscopes>
|
||||
<include syntax="html" collection="attributes" />
|
||||
</subscopes>
|
||||
</scope>
|
||||
<scope name="html.embedded.block.script.content">
|
||||
<starts-with>
|
||||
<expression>(?<=>)</expression>
|
||||
</starts-with>
|
||||
<ends-with>
|
||||
<expression>(?=</(?i:script)\b)</expression>
|
||||
</ends-with>
|
||||
<subsyntax name="javascript">
|
||||
<cut-off>
|
||||
<expression>(?=</(?i:script)\b)</expression>
|
||||
</cut-off>
|
||||
</subsyntax>
|
||||
</scope>
|
||||
</subscopes>
|
||||
</scope>
|
||||
|
||||
<!-- SASS -->
|
||||
<scope name="html.embedded.block.style" spell-check="false" lookup="documentation">
|
||||
<starts-with>
|
||||
<expression>(?=<(?i:style)\b)(?=[^>]*lang=('sass'|\"sass\"))(?![^/>]*/>\s*$)</expression>
|
||||
</starts-with>
|
||||
<ends-with />
|
||||
<subscopes anchored="true" skip-whitespace="false">
|
||||
<scope name="html.tag.style.open">
|
||||
<symbol type="tag-style">
|
||||
<context behavior="start" group-by-name="true">
|
||||
<auto-close string="</" completion="${name}>" />
|
||||
</context>
|
||||
</symbol>
|
||||
<starts-with>
|
||||
<expression><((?i:style))</expression>
|
||||
<capture number="1" name="html.tag.name" />
|
||||
</starts-with>
|
||||
<ends-with>
|
||||
<expression>/?></expression>
|
||||
</ends-with>
|
||||
<subscopes>
|
||||
<include syntax="html" collection="attributes" />
|
||||
</subscopes>
|
||||
</scope>
|
||||
<scope name="html.embedded.block.style.content">
|
||||
<starts-with>
|
||||
<expression>(?<=>)</expression>
|
||||
</starts-with>
|
||||
<ends-with>
|
||||
<expression>(?=</(?i:style)\b)</expression>
|
||||
</ends-with>
|
||||
<subscopes>
|
||||
<scope name="html.tag.style.open">
|
||||
<symbol type="tag-style">
|
||||
<context behavior="start" group-by-name="true">
|
||||
<auto-close string="</" completion="${name}>" />
|
||||
</context>
|
||||
</symbol>
|
||||
<starts-with>
|
||||
<expression><((?i:style))</expression>
|
||||
<capture number="1" name="html.tag.name" />
|
||||
</starts-with>
|
||||
<ends-with>
|
||||
<expression>/?></expression>
|
||||
</ends-with>
|
||||
<subscopes>
|
||||
<include syntax="self" collection="attributes" />
|
||||
</subscopes>
|
||||
</scope>
|
||||
<scope name="html.embedded.style.content">
|
||||
<starts-with>
|
||||
<expression>(?<=>)</expression>
|
||||
</starts-with>
|
||||
<ends-with>
|
||||
<expression>(?=</(?i:style)\b)</expression>
|
||||
</ends-with>
|
||||
<subsyntax name="css">
|
||||
<cut-off>
|
||||
<expression>(?=</(?i:style|head|body|div)\b)</expression>
|
||||
</cut-off>
|
||||
</subsyntax>
|
||||
</scope>
|
||||
</subscopes>
|
||||
</ends-with>
|
||||
<subsyntax name="sass">
|
||||
<cut-off>
|
||||
<expression>(?=</(?i:style)\b)</expression>
|
||||
</cut-off>
|
||||
</subsyntax>
|
||||
</scope>
|
||||
</subscopes>
|
||||
</scope>
|
||||
|
||||
<!-- SCSS -->
|
||||
<scope name="html.embedded.block.style" spell-check="false" lookup="documentation">
|
||||
<starts-with>
|
||||
<expression>(?=<(?i:style)\b)(?=[^>]*lang=('scss'|\"scss\"))(?![^/>]*/>\s*$)</expression>
|
||||
</starts-with>
|
||||
<ends-with />
|
||||
<subscopes anchored="true" skip-whitespace="false">
|
||||
<scope name="html.tag.style.open">
|
||||
<symbol type="tag-style">
|
||||
<context behavior="start" group-by-name="true">
|
||||
<auto-close string="</" completion="${name}>" />
|
||||
</context>
|
||||
</symbol>
|
||||
<starts-with>
|
||||
<expression><((?i:style))</expression>
|
||||
<capture number="1" name="html.tag.name" />
|
||||
</starts-with>
|
||||
<ends-with>
|
||||
<expression>/?></expression>
|
||||
</ends-with>
|
||||
<subscopes>
|
||||
<include syntax="html" collection="attributes" />
|
||||
</subscopes>
|
||||
</scope>
|
||||
<scope name="html.embedded.block.style.content">
|
||||
<starts-with>
|
||||
<expression>(?<=>)</expression>
|
||||
</starts-with>
|
||||
<ends-with>
|
||||
<expression>(?=</(?i:style)\b)</expression>
|
||||
</ends-with>
|
||||
<subsyntax name="scss">
|
||||
<cut-off>
|
||||
<expression>(?=</(?i:style)\b)</expression>
|
||||
</cut-off>
|
||||
</subsyntax>
|
||||
</scope>
|
||||
</subscopes>
|
||||
</scope>
|
||||
|
||||
<!-- LESS -->
|
||||
<scope name="html.embedded.block.style" spell-check="false" lookup="documentation">
|
||||
<starts-with>
|
||||
<expression>(?=<(?i:style)\b)(?=[^>]*lang=('less'|\"less\"))(?![^/>]*/>\s*$)</expression>
|
||||
</starts-with>
|
||||
<ends-with />
|
||||
<subscopes anchored="true" skip-whitespace="false">
|
||||
<scope name="html.tag.style.open">
|
||||
<symbol type="tag-style">
|
||||
<context behavior="start" group-by-name="true">
|
||||
<auto-close string="</" completion="${name}>" />
|
||||
</context>
|
||||
</symbol>
|
||||
<starts-with>
|
||||
<expression><((?i:style))</expression>
|
||||
<capture number="1" name="html.tag.name" />
|
||||
</starts-with>
|
||||
<ends-with>
|
||||
<expression>/?></expression>
|
||||
</ends-with>
|
||||
<subscopes>
|
||||
<include syntax="html" collection="attributes" />
|
||||
</subscopes>
|
||||
</scope>
|
||||
<scope name="html.embedded.block.style.content">
|
||||
<starts-with>
|
||||
<expression>(?<=>)</expression>
|
||||
</starts-with>
|
||||
<ends-with>
|
||||
<expression>(?=</(?i:style)\b)</expression>
|
||||
</ends-with>
|
||||
<subsyntax name="less">
|
||||
<cut-off>
|
||||
<expression>(?=</(?i:style)\b)</expression>
|
||||
</cut-off>
|
||||
</subsyntax>
|
||||
</scope>
|
||||
</subscopes>
|
||||
</scope>
|
||||
|
||||
<!-- CSS -->
|
||||
<scope name="html.embedded.block.style" spell-check="false" lookup="documentation">
|
||||
<starts-with>
|
||||
<expression>(?=<(?i:style)\b)</expression>
|
||||
</starts-with>
|
||||
<ends-with />
|
||||
<subscopes anchored="true" skip-whitespace="false">
|
||||
<scope name="html.tag.style.open">
|
||||
<symbol type="tag-style">
|
||||
<context behavior="start" group-by-name="true">
|
||||
<auto-close string="</" completion="${name}>" />
|
||||
</context>
|
||||
</symbol>
|
||||
<starts-with>
|
||||
<expression><((?i:style))</expression>
|
||||
<capture number="1" name="html.tag.name" />
|
||||
</starts-with>
|
||||
<ends-with>
|
||||
<expression>/?></expression>
|
||||
</ends-with>
|
||||
<subscopes>
|
||||
<include syntax="html" collection="attributes" />
|
||||
</subscopes>
|
||||
</scope>
|
||||
<scope name="html.embedded.block.style.content">
|
||||
<starts-with>
|
||||
<expression>(?<=>)</expression>
|
||||
</starts-with>
|
||||
<ends-with>
|
||||
<expression>(?=</(?i:style)\b)</expression>
|
||||
</ends-with>
|
||||
<subsyntax name="css">
|
||||
<cut-off>
|
||||
<expression>(?=</(?i:style)\b)</expression>
|
||||
</cut-off>
|
||||
</subsyntax>
|
||||
</scope>
|
||||
</subscopes>
|
||||
</scope>
|
||||
|
||||
<!-- Closing Tags -->
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "sveltenova.novaextension",
|
||||
"version": "0.1.4",
|
||||
"version": "0.1.5",
|
||||
"dependencies": {
|
||||
"svelte-language-server": "^0.10.147"
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue