Skip to content

Commit

Permalink
1.2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Nixinova committed Jun 13, 2020
1 parent 552c587 commit 50eb433
Show file tree
Hide file tree
Showing 5 changed files with 73 additions and 19 deletions.
12 changes: 10 additions & 2 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
# Changelog

## 0.2.1
## 1.2.2
- Added syntax highlighting for `@const` and `@endvar` declarations.
- Added syntax highlighting for logical and bitwise operations.
- Changed variable declaration syntax highlighting to allow equals sign notation to be valid.
- Fixed lines being automatically indented.
- Fixed empty comments not having syntax highlighting applied.
- Fixed colons being treated as invalid in variable contents.

## 1.2.1
- Re-added numeric syntax highlighting.
- Added specific syntax highlighting for denoting built-in variables.
- Added `"` and `'` as auto-closing and auto-surrounding pairs.
Expand All @@ -13,7 +21,7 @@
- Fixed CSS at-rule declarators containing hyphens not having proper syntax highlighting applied.
- Fixed single-character strings not being treated as valid.
- Fixed invalid hex colors being treated as valid.
- Fixed general invalid characters now having syntax highlighting applied.
- Fixed general invalid characters not having syntax highlighting applied.

## 1.2.0
- Added argument syntax highlighting.
Expand Down
5 changes: 1 addition & 4 deletions language-configuration.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,5 @@
["{", "}"],
["\"", "\""],
["'", "'"]
],
"indentationRules": {
"decreaseIndentPattern": "^\\s*---\\s*$"
}
]
}
11 changes: 8 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "Syntax highligher for NovaSheet files",
"publisher": "Nixinova",
"repository": "NovaSheets-vscode",
"version": "1.2.1",
"version": "1.2.2",
"engines": {
"vscode": "^1.45.0"
},
Expand Down Expand Up @@ -33,6 +33,11 @@
"scopeName": "source.nss",
"path": "./syntaxes/novasheets.tmLanguage.json"
}
]
],
"configurationDefaults": {
"[novasheets]": {
"editor.autoIndent": "none"
}
}
}
}
}
4 changes: 4 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
[![Latest version](https://img.shields.io/github/v/release/Nixinova/NovaSheets-vscode?label=latest&style=flat-square)](https://github.com/Nixinova/NovaSheets/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/releases)

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

# Features
Expand Down
60 changes: 50 additions & 10 deletions syntaxes/novasheets.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,15 @@
"name": "NovaSheets",
"scopeName": "source.nss",
"patterns": [
{
"include": "#constant"
},
{
"include": "#variable_declaration"
},
{
"include": "#variable_ending"
},
{
"include": "#variable"
},
Expand All @@ -26,23 +32,49 @@
}
],
"repository": {
"variable_declaration": {
"match": "^\\s*(@var)\\s+([^=)\\]]+?)(\\|[^=)\\]]+?)?(\\s//.+|)$",
"constant": {
"match": "^\\s*(@const)\\s+([A-Z_]+)\\s+([0-9]+)(\\s//.*)?$",
"captures": {
"1": {
"name": "keyword.variable.declarator"
},
"2": {
"name": "support.type.variable.default.nss"
},
"3": {
"name": "keyword.control.variable.attribute.nss"
"name": "support.type.constant.nss"
},
"4": {
"name": "comment.inline.nss"
}
}
},
"variable_declaration": {
"patterns": [
{
"match": "(?<=^\\s*@var.+)//.*$",
"name": "comment.inline.nss"
},
{
"match": "^\\s*(@var)\\s+((?:[^|=)\\]](?!\/\/))+)(\\|(?:[^=)\\]](?!\/\/))+)*(=?)(?=.*$)",
"captures": {
"1": {
"name": "keyword.variable.declarator"
},
"2": {
"name": "support.type.variable.default.nss"
},
"3": {
"name": "keyword.control.variable.attribute.nss"
},
"4": {
"name": "keyword.variable.declarator"
}
}
}
]
},
"variable_ending": {
"match": "^\\s*@endvar\\s*$",
"name": "keyword.variable.ending.declarator"
},
"variable": {
"begin": "(\\$\\()",
"beginCaptures": {
Expand All @@ -61,7 +93,7 @@
"match": "(?<=\\()(@)?([^|=)]+)(?=\\)|\\|)",
"captures": {
"1": {
"name" : "keyword.other.unit.variable.default.nss"
"name": "keyword.other.unit.variable.default.nss"
},
"2": {
"name": "support.type.variable.default.nss"
Expand Down Expand Up @@ -117,11 +149,11 @@
"comments": {
"patterns": [
{
"match": "(?<!:)//.+$",
"match": "(?<!:)//.*$",
"name": "comment.inline.nss"
},
{
"match": "/\\*.+\\*/",
"match": "/\\*.*\\*/",
"name": "comment.block.css"
}
]
Expand Down Expand Up @@ -180,7 +212,15 @@
"other": {
"patterns": [
{
"match": "[-;,.+*/!%(){}a-zA-Z]",
"match": "(?<=\\$\\(\\s*@(?:bitwise|logic)[^)]+)(!|not|&|and|nand|or|nor|xor|xnor)",
"name": "support.function.bitwise.nss"
},
{
"match": "\\b(true|false)\\b",
"name": "keyword.constant.logic.nss"
},
{
"match": "[-:;,.+*/!%(){}a-zA-Z]",
"name": "entity.constant.character"
},
{
Expand Down

0 comments on commit 50eb433

Please sign in to comment.