Skip to content

Commit

Permalink
1.2.4
Browse files Browse the repository at this point in the history
- Update to 0.5.x
- Add syntax highlighting for argument defaults, units, and URLs
  • Loading branch information
Nixinova committed Jul 14, 2020
1 parent 3d484ed commit 4e7e662
Show file tree
Hide file tree
Showing 5 changed files with 71 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .vscodeignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.vscode/**
.vscode-test/**
.git/**
.gitignore
colors.txt
8 changes: 8 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 1.2.4
- Added syntax highlighting for static comments (`/*/ text /*/`) and parsed comments (`/*[ ]*/`).
- Added syntax highlighting for loop indentifiers `$i`, `$v`, and `$v[n]`.
- Added syntax highlighting for default argument content.
- Added syntax highlighting for CSS units.
- Added syntax highlighting for all numeric types.
- Added syntax highlighting for URLs.

## 1.2.3
- Changed syntax highlighting rules to always apply to `@var`, `@endvar`, and `@const` anywhere in a line
- Changed syntax highlighting of `@const` declarations to allow boolean values and to apply syntax highlighting to the value of the constant.
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "novasheets",
"displayName": "NovaSheets",
"description": "Syntax highligher for NovaSheet files",
"description": "Syntax highlighter for NovaSheets files",
"publisher": "Nixinova",
"repository": "NovaSheets-vscode",
"version": "1.2.3",
"version": "1.2.4",
"engines": {
"vscode": "^1.45.0"
},
Expand Down
4 changes: 3 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
[![Latest version](https://img.shields.io/github/v/release/Nixinova/NovaSheets-vscode?label=latest&style=flat-square)](https://github.com/Nixinova/NovaSheets-vscode/releases)
[![Marketplace version](https://img.shields.io/visual-studio-marketplace/v/Nixinova.novasheets?label=marketplace&style=flat-square)](https://marketplace.visualstudio.com/items/Nixinova.novasheets)
[![Last updated](https://img.shields.io/github/release-date/Nixinova/NovaSheets-vscode?label=updated&style=flat-square)](https://github.com/Nixinova/NovaSheets-vscode/releases)
[![Downloads](https://img.shields.io/visual-studio-marketplace/d/Nixinova.novasheets?style=flat-square)](https://marketplace.visualstudio.com/items/Nixinova.novasheets)
[![Installs](https://img.shields.io/visual-studio-marketplace/i/Nixinova.novasheets?style=flat-square)](https://marketplace.visualstudio.com/items/Nixinova.novasheets)

This is a [VSCode](https://github.com/microsoft/vscode) extension for [NovaSheets](https://github.com/Nixinova/NovaSheets).
This is a [VSCode](https://github.com/microsoft/vscode) extension for [NovaSheets](https://github.com/Nixinova/NovaSheets) syntax highlighting.

# Features
This extension includes syntax highlighting for NovaSheet syntax, including NovaSheets variables and comments, as well as regular CSS content.
Expand Down
70 changes: 57 additions & 13 deletions syntaxes/novasheets.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@
{
"include": "#separator"
},
{
"include": "#loop_identifier"
},
{
"include": "#comments"
},
Expand Down Expand Up @@ -79,13 +82,13 @@
"begin": "(\\$\\()",
"beginCaptures": {
"1": {
"name": "keyword.variable.substitutor.nss"
"name": "constant.character.nss"
}
},
"end": "(\\))",
"endCaptures": {
"1": {
"name": "keyword.variable.substitutor.nss"
"name": "constant.character.nss"
}
},
"patterns": [
Expand All @@ -106,7 +109,7 @@
},
{
"match": "\\|+|(?<!@.*|=)=",
"name": "keyword.variable.substitutor.nss"
"name": "constant.character.nss"
},
{
"include": "#variable"
Expand All @@ -123,31 +126,60 @@
]
},
"parameter": {
"match": "(\\$\\[)(.+?)(\\|.*?)?(?:(\\s//.+$)|(\\]))",
"match": "(\\$\\[)(.+?)(\\|(.*?))?(?:(\\s//.+$)|(\\]))",
"captures": {
"1": {
"name": "keyword.variable.substitutor.nss"
"name": "constant.character.nss"
},
"2": {
"name": "keyword.control.variable.attribute.nss"
},
"3": {
"name": "invalid.illegal.nss"
"name": "constant.character.nss"
},
"4": {
"name": "comment.inline.nss"
"name": "constant.character.escape.default_argument.nss"
},
"5": {
"name": "keyword.variable.substitutor.nss"
"name": "comment.inline.nss"
},
"6": {
"name": "constant.character.nss"
}
}
},
"loop_identifier": {
"match": "\\$i|\\$v\\[?|(?<=\\$v\\[[^\\]]*?)\\]",
"name": "keyword.variable.identifier.loop.nss"
},
"comments": {
"patterns": [
{
"match": "(?<!:)//.*$",
"match": "##!.*",
"name": "comment.block.documentation"
},
{
"match": "(?<![a-z]+:)//.*$",
"name": "comment.inline.nss"
},
{
"match": "(/\\*/)(.*?)(/\\*/)",
"captures": {
"1": {
"name": "comment.static.nss"
},
"2": {
"name": "markup.italic.content.nss"
},
"3": {
"name": "comment.static.nss"
}
}
},
{
"match": "(/\\*\\[|\\]\\*/)",
"name": "comment.block.css"
},
{
"match": "/\\*.*?\\*/",
"name": "comment.block.css"
Expand All @@ -156,6 +188,10 @@
},
"css": {
"patterns": [
{
"match": "[a-z]+://\\w+(\\.\\w+)+(/\\S+?)?(?!\\))",
"name": "markup.underline.link"
},
{
"match": "([^@{}]*){",
"captures": {
Expand Down Expand Up @@ -201,7 +237,7 @@
},
{
"match": "!\\s*important",
"name": "string.regexp"
"name": "string.regexp.important.css"
}
]
},
Expand All @@ -216,12 +252,20 @@
"name": "keyword.constant.logic.nss"
},
{
"match": "[-:;,.+~^*/!%(){}a-zA-Z]",
"name": "entity.constant.character"
"match": "(?<=\\d\\s*)(em|rem|en|ex|px|pt|pc|cm|mm|m|ft|in|%)\\b",
"name": "constant.numeric.unit.css"
},
{
"match": "\\d+e\\d+",
"name": "constant.numeric.css"
},
{
"match": "[0-9]",
"match": "0x[0-9a-f]*\\.?[0-9a-f]+|0b[01]*\\.?[01]+|0o[0-7]*\\.?[0-7]+|[0-9]*\\.?[0-9]+",
"name": "constant.numeric.css"
},
{
"match": "[-:;,.+~^*/!%(){}a-zA-Z]",
"name": "entity.constant.character"
}
]
}
Expand Down

0 comments on commit 4e7e662

Please sign in to comment.