Skip to content

Commit

Permalink
1.2.3
Browse files Browse the repository at this point in the history
- Update to 0.4.x NovaSheets syntax
- Bug fixes
  • Loading branch information
Nixinova committed Jun 27, 2020
1 parent 50eb433 commit 3d484ed
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 26 deletions.
6 changes: 1 addition & 5 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
// A launch configuration that launches the extension inside a new window
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
{
"version": "0.2.0",
"version": "0.2.0",
"configurations": [
{
"name": "Extension",
Expand Down
9 changes: 9 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog

## 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.
- Removed syntax highlighting for the removed front matter separator `---`.
- Removed syntax highlighting for invalid characters as it has too many false positives.
- Removed syntax highlighting for parameters names in built-in variables.
- Fixed syntax highlighting of block comments extending the boundary of the comment.
- Fixed empty arguments and empty parameters not being treated as valid.

## 1.2.2
- Added syntax highlighting for `@const` and `@endvar` declarations.
- Added syntax highlighting for logical and bitwise operations.
Expand Down
2 changes: 1 addition & 1 deletion 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.2",
"version": "1.2.3",
"engines": {
"vscode": "^1.45.0"
},
Expand Down
4 changes: 2 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[![Latest version](https://img.shields.io/github/v/release/Nixinova/NovaSheets-vscode?label=latest&style=flat-square)](https://github.com/Nixinova/NovaSheets/releases)
[![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/releases)
[![Last updated](https://img.shields.io/github/release-date/Nixinova/NovaSheets-vscode?label=updated&style=flat-square)](https://github.com/Nixinova/NovaSheets-vscode/releases)

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

Expand Down
28 changes: 10 additions & 18 deletions syntaxes/novasheets.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,16 @@
],
"repository": {
"constant": {
"match": "^\\s*(@const)\\s+([A-Z_]+)\\s+([0-9]+)(\\s//.*)?$",
"match": "(@const)(?:(\\s+[A-Z_]+)(\\s+(?:[0-9]+|true|false)))?",
"captures": {
"1": {
"name": "keyword.variable.declarator"
},
"2": {
"name": "support.type.constant.nss"
},
"4": {
"name": "comment.inline.nss"
"3": {
"name": "keyword.control.constant.value.nss"
}
}
},
Expand All @@ -53,7 +53,7 @@
"name": "comment.inline.nss"
},
{
"match": "^\\s*(@var)\\s+((?:[^|=)\\]](?!\/\/))+)(\\|(?:[^=)\\]](?!\/\/))+)*(=?)(?=.*$)",
"match": "(@var)\\s+((?:[^|=)\\]](?!\/\/))+)(\\|(?:[^=)\\]](?!\/\/))+)*(=?)",
"captures": {
"1": {
"name": "keyword.variable.declarator"
Expand All @@ -72,7 +72,7 @@
]
},
"variable_ending": {
"match": "^\\s*@endvar\\s*$",
"match": "@endvar",
"name": "keyword.variable.ending.declarator"
},
"variable": {
Expand Down Expand Up @@ -101,11 +101,11 @@
}
},
{
"match": "[^|=]+?(?==)",
"match": "(?<!@.*)[^|=]+?(?==)",
"name": "keyword.control.variable.attribute.nss"
},
{
"match": "(?<!\\||=)(?:\\||=)",
"match": "\\|+|(?<!@.*|=)=",
"name": "keyword.variable.substitutor.nss"
},
{
Expand Down Expand Up @@ -142,18 +142,14 @@
}
}
},
"separator": {
"match": "^\\s*---\\s*$",
"name": "header.separator.nss"
},
"comments": {
"patterns": [
{
"match": "(?<!:)//.*$",
"name": "comment.inline.nss"
},
{
"match": "/\\*.*\\*/",
"match": "/\\*.*?\\*/",
"name": "comment.block.css"
}
]
Expand Down Expand Up @@ -212,24 +208,20 @@
"other": {
"patterns": [
{
"match": "(?<=\\$\\(\\s*@(?:bitwise|logic)[^)]+)(!|not|&|and|nand|or|nor|xor|xnor)",
"match": "(?<=\\$\\(\\s*@(?:bitwise|boolean|if)[^)]+)(&|\\||!|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]",
"match": "[-:;,.+~^*/!%(){}a-zA-Z]",
"name": "entity.constant.character"
},
{
"match": "[0-9]",
"name": "constant.numeric.css"
},
{
"match": ".",
"name": "invalid"
}
]
}
Expand Down

0 comments on commit 3d484ed

Please sign in to comment.