Skip to content

Commit

Permalink
Merge pull request #152 from wildpeaks/features/fixtures
Browse files Browse the repository at this point in the history
Fixtures
  • Loading branch information
cecilemuller authored Jun 5, 2021
2 parents dca9112 + b936de8 commit fc4f362
Show file tree
Hide file tree
Showing 104 changed files with 1,139 additions and 50 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,3 @@

# But make sure to ignore these regardless:
WAS *
/test/fixtures
12 changes: 9 additions & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
{
"eslint.validate": [
"typescript"
],
// Disable underlines during screenshots
"typescript.validate.enable": false,
"javascript.validate.enable": false,
"php.validate.enable": false,
"css.validate": false,
"scss.validate": false,
"less.validate": false,
"yaml.validate": false,

"files.exclude": {
"LICENSE": true,
"*.lnk": true,
Expand Down
70 changes: 36 additions & 34 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,40 +4,42 @@

Dark theme for VSCode **focused on readability by reducing visibility of less important elements** (e.g. commas, semicolons, brackets).

| Format | Example screenshot |
| ------------- | ------------- |
| .bat | ![Batch](screenshots/Batch.jpg) |
| .css | ![CSS](screenshots/CSS.jpg) |
| .cypher | ![CSS](screenshots/Cypher_Query_Language.jpg) |
| Dockerfile | ![Dockerfile](screenshots/Dockerfile.jpg) |
| .dot | ![GraphViz](screenshots/GraphViz.jpg) |
| .editorconfig | ![EditorConfig](screenshots/EditorConfig.jpg) |
| .env | ![Environment_Variables](screenshots/Environment_Variables.jpg) |
| .glsl | ![GLSL](screenshots/GLSL.jpg) |
| .hbs | ![Handlebars](screenshots/Handlebars.jpg) |
| .fx, .hlsl | ![HLSL](screenshots/HLSL.jpg) |
| .html | ![HTML](screenshots/HTML.jpg) |
| .ini | ![INI](screenshots/INI.jpg) |
| .js | ![JavaScript](screenshots/JavaScript.jpg) |
| .jsx | ![JavaScript_React](screenshots/JavaScript_React.jpg) |
| .json | ![JSON](screenshots/JSON.jpg) |
| .jsonc | ![JSON_with_Comments](screenshots/JSON_with_Comments.jpg) |
| .md | ![Markdown_1](screenshots/Markdown_1.jpg) |
| .md | ![Markdown_2](screenshots/Markdown_2.jpg) |
| .conf (Nginx) | ![NGINX_Conf](screenshots/NGINX_Conf.jpg) |
| .npmrc | ![NPMRC](screenshots/NPMRC.jpg) |
| .sql (PGSQL) | ![PGSQL](screenshots/PGSQL.jpg) |
| .php | ![PHP](screenshots/PHP.jpg) |
| .ps1 | ![PowerShell](screenshots/PowerShell.jpg) |
| .py | ![Python](screenshots/Python.jpg) |
| .reg | ![REG](screenshots/REG.jpg) |
| .rs | ![Rust](screenshots/Rust.jpg) |
| .scss | ![SCSS](screenshots/SCSS.jpg) |
| .sh | ![Shell](screenshots/Shell.jpg) |
| .ts | ![TypeScript](screenshots/TypeScript.jpg) |
| .tsx | ![TypeScript_React](screenshots/TypeScript_React.jpg) |
| .xml | ![XML](screenshots/XML.jpg) |
| .yml | ![YML](screenshots/YML.jpg) |
| Format | Example screenshot |
| ----------------| --------------------------------------------------------------- |
| `.bat` | ![Batch](screenshots/Batch.png) |
| `.css` | ![CSS](screenshots/CSS.png) |
| `.conf` (Nginx) | ![NGINX_Conf](screenshots/NGINX_Conf.png) |
| `.cypher` | ![Cypher_Query_Language](screenshots/Cypher_Query_Language.png) |
| `.dot` | ![Graphviz](screenshots/Graphviz.png) |
| `Dockerfile` | ![Dockerfile](screenshots/Dockerfile.png) |
| `.editorconfig` | ![EditorConfig](screenshots/EditorConfig.png) |
| `.env` | ![Environment_Variables](screenshots/Environment_Variables.png) |
| `.glsl` | ![GLSL](screenshots/GLSL.png) |
| `.hbs` | ![Handlebars](screenshots/Handlebars.png) |
| `.fx`, `.hlsl` | ![HLSL](screenshots/HLSL.png) |
| `.html` | ![HTML](screenshots/HTML.png) |
| `.ini`, `.toml` | ![Ini](screenshots/Ini.png) |
| `.js`, `.mjs` | ![JavaScript](screenshots/JavaScript.png) |
| `.jsx` | ![JavaScript_React](screenshots/JavaScript_React.png) |
| `.json` | ![JSON](screenshots/JSON.png) |
| `.jsonc` | ![JSON_with_Comments](screenshots/JSON_with_Comments.png) |
| `.md` | ![Markdown](screenshots/Markdown.png) |
| `.ms`, `.mrc` | ![MaxScript](screenshots/MaxScript.png) |
| `.npmrc` | ![Properties](screenshots/Properties.png) |
| `.sql` (PGSQL) | ![pgsql](screenshots/pgsql.png) |
| `.php` | ![PHP](screenshots/PHP.png) |
| `.ps1` | ![PowerShell](screenshots/PowerShell.png) |
| `.py` | ![Python](screenshots/Python.png) |
| `.reg` | ![REG](screenshots/REG.png) |
| `.rs` | ![Rust](screenshots/Rust.png) |
| `.cscc` | ![SCSS](screenshots/SCSS.png) |
| `.sh` | ![Shell_Script](screenshots/Shell_Script.png) |
| `.ts` | ![TypeScript](screenshots/TypeScript.png) |
| `.tsx` | ![TypeScript React](screenshots/TypeScript_React.png) |
| `.vfl` | ![VEX](screenshots/VEX.png) |
| `.xml` | ![XML](screenshots/XML.png) |
| `.yml` | ![YAML](screenshots/YAML.png) |


Some file formats require additional extensions, such as:
- `EditorConfig.editorconfig`
Expand Down
Binary file removed screenshots/Batch.jpg
Binary file not shown.
Binary file added screenshots/Batch.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed screenshots/CSS.jpg
Binary file not shown.
Binary file added screenshots/CSS.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed screenshots/Cypher_Query_Language.jpg
Binary file not shown.
Binary file added screenshots/Cypher_Query_Language.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed screenshots/Dockerfile.jpg
Binary file not shown.
Binary file added screenshots/Dockerfile.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed screenshots/EditorConfig.jpg
Binary file not shown.
Binary file added screenshots/EditorConfig.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed screenshots/Environment_Variables.jpg
Binary file not shown.
Binary file added screenshots/Environment_Variables.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed screenshots/GLSL.jpg
Binary file not shown.
Binary file added screenshots/GLSL.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed screenshots/GraphViz.jpg
Binary file not shown.
Binary file added screenshots/Graphviz.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed screenshots/HLSL.jpg
Binary file not shown.
Binary file added screenshots/HLSL.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed screenshots/HTML.jpg
Binary file not shown.
Binary file added screenshots/HTML.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed screenshots/Handlebars.jpg
Binary file not shown.
Binary file added screenshots/Handlebars.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed screenshots/INI.jpg
Binary file not shown.
Binary file added screenshots/Ini.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed screenshots/JSON.jpg
Binary file not shown.
Binary file added screenshots/JSON.png
Binary file removed screenshots/JSON_with_Comments.jpg
Diff not rendered.
Binary file added screenshots/JSON_with_Comments.png
Binary file removed screenshots/JavaScript.jpg
Diff not rendered.
Binary file added screenshots/JavaScript.png
Binary file removed screenshots/JavaScript_React.jpg
Diff not rendered.
Binary file added screenshots/JavaScript_React.png
Binary file added screenshots/Markdown.png
Binary file removed screenshots/Markdown_1.jpg
Diff not rendered.
Binary file removed screenshots/Markdown_2.jpg
Diff not rendered.
Binary file added screenshots/MaxScript.png
Binary file removed screenshots/NGINX_Conf.jpg
Diff not rendered.
Binary file added screenshots/NGINX_Conf.png
Binary file removed screenshots/NPMRC.jpg
Diff not rendered.
Binary file removed screenshots/PGSQL.jpg
Diff not rendered.
Binary file removed screenshots/PHP.jpg
Diff not rendered.
Binary file added screenshots/PHP.png
Binary file removed screenshots/PowerShell.jpg
Diff not rendered.
Binary file added screenshots/PowerShell.png
Binary file added screenshots/Properties.png
Binary file removed screenshots/Python.jpg
Diff not rendered.
Binary file added screenshots/Python.png
Binary file removed screenshots/REG.jpg
Diff not rendered.
Binary file added screenshots/REG.png
Binary file removed screenshots/Rust.jpg
Diff not rendered.
Binary file added screenshots/Rust.png
Binary file removed screenshots/SCSS.jpg
Diff not rendered.
Binary file added screenshots/SCSS.png
Binary file removed screenshots/Shell.jpg
Diff not rendered.
Binary file added screenshots/Shell_Script.png
Binary file removed screenshots/TypeScript.jpg
Diff not rendered.
Binary file added screenshots/TypeScript.png
Binary file removed screenshots/TypeScript_React.jpg
Diff not rendered.
Binary file added screenshots/TypeScript_React.png
Binary file added screenshots/VEX.png
Binary file removed screenshots/XML.jpg
Diff not rendered.
Binary file added screenshots/XML.png
Binary file added screenshots/YAML.png
Binary file removed screenshots/YML.jpg
Diff not rendered.
Binary file added screenshots/pgsql.png
41 changes: 29 additions & 12 deletions src/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,19 @@ describe("Build", function () {
"text.html.handlebars punctuation.definition.tag",

// Vex
"punctuation.group.vex"
"punctuation.group.vex",

// Maxscript: {}, []
"punctuation.section.parens.mxs",
"punctuation.section.brackets.mxs",

// YML: {}, [], commas
"meta.block-mapping.yaml",
"punctuation.definition.sequence.begin.yaml",
"punctuation.definition.sequence.end.yaml",
"punctuation.definition.mapping.begin.yaml",
"punctuation.definition.mapping.end.yaml",
"punctuation.separator.sequence.yaml"
],
settings: {
foreground: Colors.MUTED
Expand Down Expand Up @@ -295,15 +307,14 @@ describe("Build", function () {
// Regex: +, *
"keyword.operator.quantifier.regexp",

// CSS & SCSS: *
// CSS & SCSS: *, #, .
"punctuation.definition.constant.css",
"punctuation.definition.entity.css",
"entity.name.tag.wildcard",

// CSS & SCSS: tag name
"entity.name.tag.css",

// CSS & SCSS: #
"punctuation.definition.constant.css",

// SCSS: keywords
"source.css.scss keyword.control",

Expand All @@ -313,6 +324,9 @@ describe("Build", function () {
// REG: Delete key
"entity.name.function.section.delete.reg",

// REG: hex
"support.type.dword.reg",

// PHP: <?php, ?>, $, ::, ., if, elseif, else
"punctuation.section.embedded.begin.php",
"punctuation.section.embedded.end.php",
Expand Down Expand Up @@ -398,8 +412,10 @@ describe("Build", function () {
// Editorconfig patterns
"meta.section.header.editorconfig",

// YML: -
// YML: -, <<, &
"punctuation.definition.block.sequence.item.yaml",
"constant.language.merge.yaml",
"punctuation.definition.anchor.yaml",

// Graphviz: ->
"source.dot keyword.operator.dot",
Expand Down Expand Up @@ -541,13 +557,10 @@ describe("Build", function () {
"constant.other.character-class.range.regexp",
"constant.other.character-class.regexp",

// true, false
// true, false, null, NaN, undefined
"constant.language.boolean",

// NaN
"constant.language.null",
"constant.language.nan",

// undefined
"constant.language.undefined",

// CSS & SCSS: variable name
Expand Down Expand Up @@ -719,7 +732,11 @@ describe("Build", function () {
"entity.name.utility.maxscript",

// MS: struct name
"entity.name.struct.maxscript"
"entity.name.struct.maxscript",

// YML: variable name
"entity.name.type.anchor.yaml",
"variable.other.alias.yaml"
],
settings: {
fontStyle: Styles.BOLD
Expand Down
4 changes: 4 additions & 0 deletions test/fixtures/Batch/example.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
@ECHO OFF
ECHO Hello world
example.exe --myflag
PAUSE
24 changes: 24 additions & 0 deletions test/fixtures/CSS/example.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
:root {
--my-color: blue;
}

div, *, *:before, div:before, #myid, .myclass {
color: var(--another-color, blue);
border-top-color: #fafafa;
border-bottom-color: crimson;
font-family: "Open Sans", sans-serif;
font-size: 1em;
-webkit-font-smoothing: subpixel-antialiased;
font-feature-settings: kern, liga, clig, calt, zero, lnum, pnum;
font-family: Lato, serif;
font-weight: 400;
font-size: 4em;
transition: all 100ms;
width: calc(100vw - 80px);
content: attr(data-example);
filter: drop-shadow(0.25rem 0 0.75rem #ef9035);
}

/**
Multiline comment
*/
24 changes: 24 additions & 0 deletions test/fixtures/Cypher Query Language/example.cypher
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
MATCH (n) RETURN n // This is a comment
MATCH (n) WHERE n.property = '//This is NOT a comment' RETURN n
MATCH (n)-->(b) RETURN b
MATCH (n:title) WHERE NOT (n)<-[:CONTAINS]-(:title) RETURN n
MATCH (john { name: 'John Doe' })-[:ACTED_IN*1..3]-(mymovie:Movie) RETURN mymovie.title
MATCH (n:Movie { title: 'Hello World' }) OPTIONAL MATCH (n)-->(x) RETURN x
MATCH (n) RETURN n.name ORDER BY n.name LIMIT toInteger(3 * rand())+ 1

MATCH (n)
RETURN CASE
WHEN n.param1 = 'example' THEN 1
WHEN n.param2 < 10 THEN 2
ELSE 3
END AS result

MATCH (n { name: 'John Doe' })-[r:`TYPE
WITH SPACE`]->()

MERGE (person:Person)
ON MATCH SET person.found = TRUE , person.lastAccessed = timestamp()
RETURN person.name, person.found, person.lastAccessed

LOAD CSV FROM 'https://example.com/data.csv' AS line
CREATE (:MyType { name: line[1], year: toInteger(line[2])})
8 changes: 8 additions & 0 deletions test/fixtures/Dockerfile/example.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM node:lts-alpine
LABEL Name=myimage Version=1.0.0

# This is a comment

RUN npm install -g [email protected]
EXPOSE 80 443
CMD ["my-command", "--param1", "--param2"]
15 changes: 15 additions & 0 deletions test/fixtures/EditorConfig/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
root = true

[*]
indent_style = tab
tab_width = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true

[*.yml]
indent_style = space

[example.txt]
indent_style = space
indent_size = 2
9 changes: 9 additions & 0 deletions test/fixtures/Environment Variables/example.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Comment
export EXAMPLE_INT=123
export EXAMPLE_FLOAT=123.45
export EXAMPLE_UNQUOTED=hello world
export EXAMPLE_QUOTED_TEXT='Hello World'
export EXAMPLE_QUOTED_MULTILINE='Multline
text
example
'
25 changes: 25 additions & 0 deletions test/fixtures/GLSL/example.glsl
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#extension GL_EXAMPLE : enable
#define TEXEL_SIZE 1.0/512.0
#pragma glslify: example1 = require('glsl-example1', iterations=10)
#pragma glslify: example2 = require('glsl-example2')
varying vec2 vUv;
uniform float iGlobalTime;
uniform sampler2D iChannel0;
vec3 sample(vec2 uv);
vec3 sample(vec2 uv) {
return texture2D(iChannel0, uv).rgb;
}
void main() {
var1 = var3;
var2 = var3.xyz;
vec3 var4 = vNorm * 0.5 + 0.5;
float dist = length(vUv - 0.5);
float falloff = smoothstep(0.3, 0.7, dist);
gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);
gl_FragColor.rgb = mix(colorA, colorB, blend);
gl_FragColor.a = 1.0;
}
// Single line
/*
Multiple lines
*/
14 changes: 14 additions & 0 deletions test/fixtures/Graphviz/example.dot
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Comment 1
# Comment 2

digraph g {
node [style=filled,color=white,shape=box];

subgraph cluster_a {
style=filled;
color=green;
aaa [label="Application"];
}

aaa -> bbb -> ccc
}
58 changes: 58 additions & 0 deletions test/fixtures/HLSL/example.fx
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
float opacityValue = 1.0;
float3 albedoColor = {1.0, 1.0, 1.0};

texture exampleMap1;
sampler2D exampleSampler1 = sampler_state {
Texture = <exampleMap1>;
MinFilter = Linear;
MagFilter = Linear;
MipFilter = Point;
AddressU = Wrap;
AddressV = Wrap;
};

texture exampleMap2: ENVIRONMENT;
samplerCUBE exampleSampler2 = sampler_state {
Texture = <exampleMap2>;
MinFilter = Linear;
MagFilter = Linear;
MipFilter = Linear;
};

// Single line comment
float4x4 WorldInverseTranspose: WORLDINVERSETRANSPOSE;
float4x4 WorldViewProjection: WORLDVIEWPROJECTION;
float4x4 World: WORLD;
float4x4 ViewInverse: VIEWINVERSE;

/**
* Multiple lines
*/
struct MY_STRUCT {
float4 position: POSITION;
float2 texcoord: TEXCOORD0;
};

VS_OUTPUT VS(VS_INPUT In) {
VS_OUTPUT Out = (VS_OUTPUT)0;
Out.position = mul(In.position, WorldViewProjection);
Out.texcoord = In.texcoord;
return Out;
}

float4 PS(VS_OUTPUT In): COLOR {
float3 myColor = tex2D(albedoSampler, In.texcoord).rgb;
float opacityValue = tex2D(opacitySampler, In.texcoord).r;
float4 resultColor = float4(albedoColor, opacityValue);
return resultColor;
}

technique t0 {
pass p0 {
CullMode = CW;
Lighting = false;
AlphaBlendEnable = (opacityValue > 0);
VertexShader = compile vs_2_0 VS();
PixelShader = compile ps_2_0 PS();
}
}
Loading

0 comments on commit fc4f362

Please sign in to comment.