From a141505ad55e73d489e3cd898ca677b1a2241e7d Mon Sep 17 00:00:00 2001 From: Huip van den Ende Date: Tue, 9 Mar 2021 22:03:51 +0100 Subject: [PATCH 1/3] Add C# specific syntax highlighting --- themes/gruvbox-dark-hard.json | 48 +++++++++++++++++++++++++++++--- themes/gruvbox-dark-medium.json | 48 +++++++++++++++++++++++++++++--- themes/gruvbox-dark-soft.json | 48 +++++++++++++++++++++++++++++--- themes/gruvbox-light-hard.json | 48 +++++++++++++++++++++++++++++--- themes/gruvbox-light-medium.json | 48 +++++++++++++++++++++++++++++--- themes/gruvbox-light-soft.json | 48 +++++++++++++++++++++++++++++--- 6 files changed, 264 insertions(+), 24 deletions(-) diff --git a/themes/gruvbox-dark-hard.json b/themes/gruvbox-dark-hard.json index 2bee770..492f7ef 100644 --- a/themes/gruvbox-dark-hard.json +++ b/themes/gruvbox-dark-hard.json @@ -479,6 +479,40 @@ "foreground": "#fabd2f" } }, + // C# ---------------------------------------- + { + "name": "C# functions & namespace", + "scope": [ + "meta.function.cs", + "entity.name.function.cs", + "entity.name.type.namespace.cs" + ], + "settings": { + "foreground": "#b8bb26" + } + }, + { + "name": "C# Variables", + "scope": [ + "keyword.other.using.cs", + "entity.name.variable.field.cs", + "entity.name.variable.local.cs", + "variable.other.readwrite.cs" + ], + "settings": { + "foreground": "#8ec07c" + } + }, + { + "name": "C# This", + "scope": [ + "keyword.other.this.cs", + "keyword.other.base.cs" + ], + "settings": { + "foreground": "#b16286" + } + }, // MAKEFILE ---------------------------------------- { "scope": "meta.scope.prerequisites", @@ -872,21 +906,27 @@ // POWERSHELL ------------------------------------ { "name": "Powershell member", - "scope": ["source.powershell variable.other.member.powershell"], + "scope": [ + "source.powershell variable.other.member.powershell" + ], "settings": { "foreground": "#fe8019" } }, { "name": "Powershell function", - "scope": ["source.powershell support.function.powershell"], + "scope": [ + "source.powershell support.function.powershell" + ], "settings": { "foreground": "#fabd2f" } }, { "name": "Powershell function attribute", - "scope": ["source.powershell support.function.attribute.powershell"], + "scope": [ + "source.powershell support.function.attribute.powershell" + ], "settings": { "foreground": "#bdae93" } @@ -1120,4 +1160,4 @@ "textLink.activeForeground": "#458588", "debugToolBar.background": "#1d2021" } -} +} \ No newline at end of file diff --git a/themes/gruvbox-dark-medium.json b/themes/gruvbox-dark-medium.json index 7b9f8ed..c109b0f 100644 --- a/themes/gruvbox-dark-medium.json +++ b/themes/gruvbox-dark-medium.json @@ -479,6 +479,40 @@ "foreground": "#fabd2f" } }, + // C# ---------------------------------------- + { + "name": "C# functions & namespace", + "scope": [ + "meta.function.cs", + "entity.name.function.cs", + "entity.name.type.namespace.cs" + ], + "settings": { + "foreground": "#b8bb26" + } + }, + { + "name": "C# Variables", + "scope": [ + "keyword.other.using.cs", + "entity.name.variable.field.cs", + "entity.name.variable.local.cs", + "variable.other.readwrite.cs" + ], + "settings": { + "foreground": "#8ec07c" + } + }, + { + "name": "C# This", + "scope": [ + "keyword.other.this.cs", + "keyword.other.base.cs" + ], + "settings": { + "foreground": "#b16286" + } + }, // MAKEFILE ---------------------------------------- { "scope": "meta.scope.prerequisites", @@ -872,21 +906,27 @@ // POWERSHELL ------------------------------------ { "name": "Powershell member", - "scope": ["source.powershell variable.other.member.powershell"], + "scope": [ + "source.powershell variable.other.member.powershell" + ], "settings": { "foreground": "#fe8019" } }, { "name": "Powershell function", - "scope": ["source.powershell support.function.powershell"], + "scope": [ + "source.powershell support.function.powershell" + ], "settings": { "foreground": "#fabd2f" } }, { "name": "Powershell function attribute", - "scope": ["source.powershell support.function.attribute.powershell"], + "scope": [ + "source.powershell support.function.attribute.powershell" + ], "settings": { "foreground": "#bdae93" } @@ -1120,4 +1160,4 @@ "textLink.activeForeground": "#458588", "debugToolBar.background": "#282828" } -} +} \ No newline at end of file diff --git a/themes/gruvbox-dark-soft.json b/themes/gruvbox-dark-soft.json index 9b00041..8d6ddd0 100644 --- a/themes/gruvbox-dark-soft.json +++ b/themes/gruvbox-dark-soft.json @@ -479,6 +479,40 @@ "foreground": "#fabd2f" } }, + // C# ---------------------------------------- + { + "name": "C# functions & namespace", + "scope": [ + "meta.function.cs", + "entity.name.function.cs", + "entity.name.type.namespace.cs" + ], + "settings": { + "foreground": "#b8bb26" + } + }, + { + "name": "C# Variables", + "scope": [ + "keyword.other.using.cs", + "entity.name.variable.field.cs", + "entity.name.variable.local.cs", + "variable.other.readwrite.cs" + ], + "settings": { + "foreground": "#8ec07c" + } + }, + { + "name": "C# This", + "scope": [ + "keyword.other.this.cs", + "keyword.other.base.cs" + ], + "settings": { + "foreground": "#b16286" + } + }, // MAKEFILE ---------------------------------------- { "scope": "meta.scope.prerequisites", @@ -872,21 +906,27 @@ // POWERSHELL ------------------------------------ { "name": "Powershell member", - "scope": ["source.powershell variable.other.member.powershell"], + "scope": [ + "source.powershell variable.other.member.powershell" + ], "settings": { "foreground": "#fe8019" } }, { "name": "Powershell function", - "scope": ["source.powershell support.function.powershell"], + "scope": [ + "source.powershell support.function.powershell" + ], "settings": { "foreground": "#fabd2f" } }, { "name": "Powershell function attribute", - "scope": ["source.powershell support.function.attribute.powershell"], + "scope": [ + "source.powershell support.function.attribute.powershell" + ], "settings": { "foreground": "#bdae93" } @@ -1120,4 +1160,4 @@ "textLink.activeForeground": "#458588", "debugToolBar.background": "#32302f" } -} +} \ No newline at end of file diff --git a/themes/gruvbox-light-hard.json b/themes/gruvbox-light-hard.json index b1cf6d9..bcf9742 100644 --- a/themes/gruvbox-light-hard.json +++ b/themes/gruvbox-light-hard.json @@ -478,6 +478,40 @@ "foreground": "#b57614" } }, + // C# ---------------------------------------- + { + "name": "C# functions & namespace", + "scope": [ + "meta.function.cs", + "entity.name.function.cs", + "entity.name.type.namespace.cs" + ], + "settings": { + "foreground": "#79740e" + } + }, + { + "name": "C# Variables", + "scope": [ + "keyword.other.using.cs", + "entity.name.variable.field.cs", + "entity.name.variable.local.cs", + "variable.other.readwrite.cs" + ], + "settings": { + "foreground": "#427b58" + } + }, + { + "name": "C# This", + "scope": [ + "keyword.other.this.cs", + "keyword.other.base.cs" + ], + "settings": { + "foreground": "#b16286" + } + }, // MAKEFILE ---------------------------------------- { "scope": "meta.scope.prerequisites", @@ -871,21 +905,27 @@ // POWERSHELL ------------------------------------ { "name": "Powershell member", - "scope": ["source.powershell variable.other.member.powershell"], + "scope": [ + "source.powershell variable.other.member.powershell" + ], "settings": { "foreground": "#af3a03" } }, { "name": "Powershell function", - "scope": ["source.powershell support.function.powershell"], + "scope": [ + "source.powershell support.function.powershell" + ], "settings": { "foreground": "#b57614" } }, { "name": "Powershell function attribute", - "scope": ["source.powershell support.function.attribute.powershell"], + "scope": [ + "source.powershell support.function.attribute.powershell" + ], "settings": { "foreground": "#665c54" } @@ -1119,4 +1159,4 @@ "textLink.activeForeground": "#458588", "debugToolBar.background": "#f9f5d7" } -} +} \ No newline at end of file diff --git a/themes/gruvbox-light-medium.json b/themes/gruvbox-light-medium.json index bbf7f16..1880413 100644 --- a/themes/gruvbox-light-medium.json +++ b/themes/gruvbox-light-medium.json @@ -478,6 +478,40 @@ "foreground": "#b57614" } }, + // C# ---------------------------------------- + { + "name": "C# functions & namespace", + "scope": [ + "meta.function.cs", + "entity.name.function.cs", + "entity.name.type.namespace.cs" + ], + "settings": { + "foreground": "#79740e" + } + }, + { + "name": "C# Variables", + "scope": [ + "keyword.other.using.cs", + "entity.name.variable.field.cs", + "entity.name.variable.local.cs", + "variable.other.readwrite.cs" + ], + "settings": { + "foreground": "#427b58" + } + }, + { + "name": "C# This", + "scope": [ + "keyword.other.this.cs", + "keyword.other.base.cs" + ], + "settings": { + "foreground": "#b16286" + } + }, // MAKEFILE ---------------------------------------- { "scope": "meta.scope.prerequisites", @@ -871,21 +905,27 @@ // POWERSHELL ------------------------------------ { "name": "Powershell member", - "scope": ["source.powershell variable.other.member.powershell"], + "scope": [ + "source.powershell variable.other.member.powershell" + ], "settings": { "foreground": "#af3a03" } }, { "name": "Powershell function", - "scope": ["source.powershell support.function.powershell"], + "scope": [ + "source.powershell support.function.powershell" + ], "settings": { "foreground": "#b57614" } }, { "name": "Powershell function attribute", - "scope": ["source.powershell support.function.attribute.powershell"], + "scope": [ + "source.powershell support.function.attribute.powershell" + ], "settings": { "foreground": "#665c54" } @@ -1119,4 +1159,4 @@ "textLink.activeForeground": "#458588", "debugToolBar.background": "#fbf1c7" } -} +} \ No newline at end of file diff --git a/themes/gruvbox-light-soft.json b/themes/gruvbox-light-soft.json index ff7c171..acf631b 100644 --- a/themes/gruvbox-light-soft.json +++ b/themes/gruvbox-light-soft.json @@ -478,6 +478,40 @@ "foreground": "#b57614" } }, + // C# ---------------------------------------- + { + "name": "C# functions & namespace", + "scope": [ + "meta.function.cs", + "entity.name.function.cs", + "entity.name.type.namespace.cs" + ], + "settings": { + "foreground": "#79740e" + } + }, + { + "name": "C# Variables", + "scope": [ + "keyword.other.using.cs", + "entity.name.variable.field.cs", + "entity.name.variable.local.cs", + "variable.other.readwrite.cs" + ], + "settings": { + "foreground": "#427b58" + } + }, + { + "name": "C# This", + "scope": [ + "keyword.other.this.cs", + "keyword.other.base.cs" + ], + "settings": { + "foreground": "#b16286" + } + }, // MAKEFILE ---------------------------------------- { "scope": "meta.scope.prerequisites", @@ -871,21 +905,27 @@ // POWERSHELL ------------------------------------ { "name": "Powershell member", - "scope": ["source.powershell variable.other.member.powershell"], + "scope": [ + "source.powershell variable.other.member.powershell" + ], "settings": { "foreground": "#af3a03" } }, { "name": "Powershell function", - "scope": ["source.powershell support.function.powershell"], + "scope": [ + "source.powershell support.function.powershell" + ], "settings": { "foreground": "#b57614" } }, { "name": "Powershell function attribute", - "scope": ["source.powershell support.function.attribute.powershell"], + "scope": [ + "source.powershell support.function.attribute.powershell" + ], "settings": { "foreground": "#665c54" } @@ -1119,4 +1159,4 @@ "textLink.activeForeground": "#458588", "debugToolBar.background": "#f2e5bc" } -} +} \ No newline at end of file From c52162c40ba1d506dfe48cc9548e622fd329e35b Mon Sep 17 00:00:00 2001 From: Huip van den Ende Date: Tue, 9 Mar 2021 22:16:39 +0100 Subject: [PATCH 2/3] Add C# code exaample --- code-examples/.cs | 48 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 code-examples/.cs diff --git a/code-examples/.cs b/code-examples/.cs new file mode 100644 index 0000000..922aed4 --- /dev/null +++ b/code-examples/.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc; +using Microsoft.Extensions.Logging; + +namespace API.Controllers +{ + [ApiController] + [Route("[controller]")] + public class WeatherForecastController : ControllerBase + { + private static readonly string[] Summaries = new[] + { + "Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching" + }; + + public ThisShowcase(string name) + { + this.name = name; + } + + private readonly ILogger _logger; + + public WeatherForecastController(ILogger logger) + { + _logger = logger; + } + + [HttpGet] + public IEnumerable Get() + { + var rng = new Random(); + return Enumerable.Range(1, 5).Select(index => new WeatherForecast + { + Date = DateTime.Now.AddDays(index), + TemperatureC = rng.Next(-20, 55), + Summary = Summaries[rng.Next(Summaries.Length)] + }) + .ToArray(); + } + } +} + + + + From c21b2d2fd6c57de14dc9dfeefd9cd7295ceed3a2 Mon Sep 17 00:00:00 2001 From: Huip van den Ende Date: Wed, 28 Apr 2021 14:05:28 +0200 Subject: [PATCH 3/3] Update colors (C# this) --- README.md | 1 + package.json | 3 ++- themes/gruvbox-dark-hard.json | 2 +- themes/gruvbox-dark-medium.json | 2 +- themes/gruvbox-dark-soft.json | 2 +- themes/gruvbox-light-hard.json | 2 +- themes/gruvbox-light-medium.json | 2 +- themes/gruvbox-light-soft.json | 2 +- 8 files changed, 9 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 578f5dd..f69499c 100644 --- a/README.md +++ b/README.md @@ -82,6 +82,7 @@ Special thank to [Pavel Pertsev](https://github.com/morhetz), the creator of [gr - [sedmicha](https://github.com/sedmicha) - [Layo](https://github.com/layoaster) - [Maxim Tsoy](https://github.com/muodov) +- [Huip van den Ende](https://github.com/huipvandenende) Thanks for help to make the Gruvbox theme better. diff --git a/package.json b/package.json index 79dcf91..2c7b49a 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,8 @@ "Michell Stuttgart (https://github.com/mstuttgart)", "sedmicha (https://github.com/sedmicha)", "Layo (https://github.com/layoaster)", - "Maxim Tsoy (https://github.com/muodov)" + "Maxim Tsoy (https://github.com/muodov)", + "Huip van den Ende (https://github.com/huipvandenende)" ], "publisher": "jdinhlife", "engines": { diff --git a/themes/gruvbox-dark-hard.json b/themes/gruvbox-dark-hard.json index 492f7ef..c58018a 100644 --- a/themes/gruvbox-dark-hard.json +++ b/themes/gruvbox-dark-hard.json @@ -510,7 +510,7 @@ "keyword.other.base.cs" ], "settings": { - "foreground": "#b16286" + "foreground": "#d3869b" } }, // MAKEFILE ---------------------------------------- diff --git a/themes/gruvbox-dark-medium.json b/themes/gruvbox-dark-medium.json index c109b0f..6e16ad3 100644 --- a/themes/gruvbox-dark-medium.json +++ b/themes/gruvbox-dark-medium.json @@ -510,7 +510,7 @@ "keyword.other.base.cs" ], "settings": { - "foreground": "#b16286" + "foreground": "#d3869b" } }, // MAKEFILE ---------------------------------------- diff --git a/themes/gruvbox-dark-soft.json b/themes/gruvbox-dark-soft.json index 8d6ddd0..8236f87 100644 --- a/themes/gruvbox-dark-soft.json +++ b/themes/gruvbox-dark-soft.json @@ -510,7 +510,7 @@ "keyword.other.base.cs" ], "settings": { - "foreground": "#b16286" + "foreground": "#d3869b" } }, // MAKEFILE ---------------------------------------- diff --git a/themes/gruvbox-light-hard.json b/themes/gruvbox-light-hard.json index bcf9742..54bff49 100644 --- a/themes/gruvbox-light-hard.json +++ b/themes/gruvbox-light-hard.json @@ -509,7 +509,7 @@ "keyword.other.base.cs" ], "settings": { - "foreground": "#b16286" + "foreground": "#8f3f71" } }, // MAKEFILE ---------------------------------------- diff --git a/themes/gruvbox-light-medium.json b/themes/gruvbox-light-medium.json index 1880413..2490acb 100644 --- a/themes/gruvbox-light-medium.json +++ b/themes/gruvbox-light-medium.json @@ -509,7 +509,7 @@ "keyword.other.base.cs" ], "settings": { - "foreground": "#b16286" + "foreground": "#8f3f71" } }, // MAKEFILE ---------------------------------------- diff --git a/themes/gruvbox-light-soft.json b/themes/gruvbox-light-soft.json index acf631b..4d16c2c 100644 --- a/themes/gruvbox-light-soft.json +++ b/themes/gruvbox-light-soft.json @@ -509,7 +509,7 @@ "keyword.other.base.cs" ], "settings": { - "foreground": "#b16286" + "foreground": "#8f3f71" } }, // MAKEFILE ----------------------------------------