Skip to content

Commit

Permalink
Clean up PR #26
Browse files Browse the repository at this point in the history
  • Loading branch information
bricelam committed Nov 17, 2024
1 parent 7b42cd2 commit 6bdc123
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 29 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ Options

You can customize the colors under **Tools > Options > Environment > Fonts and Colors**.

Display item | Default
----------------- | -------
Display item | Default (Light)
----------------- | ---------------
T4 Argument | Red
T4 Argument Value | Blue
T4 Delimiter | Yellow (background)
Expand Down
5 changes: 0 additions & 5 deletions T4Language/Classifications.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ static class Classifications
[UserVisible(true)]
class ArgumentFormat : ClassificationFormatDefinition
{
public ArgumentFormat() { }
}

[Export(typeof(EditorFormatDefinition))]
Expand All @@ -43,7 +42,6 @@ public ArgumentFormat() { }
[UserVisible(true)]
class ArgumentValueFormat : ClassificationFormatDefinition
{
public ArgumentValueFormat() { }
}

[Export(typeof(EditorFormatDefinition))]
Expand All @@ -52,7 +50,6 @@ public ArgumentValueFormat() { }
[UserVisible(true)]
class DelimiterFormat : ClassificationFormatDefinition
{
public DelimiterFormat() { }
}

[Export(typeof(EditorFormatDefinition))]
Expand All @@ -61,7 +58,6 @@ public DelimiterFormat() { }
[UserVisible(true)]
class DirectiveFormat : ClassificationFormatDefinition
{
public DirectiveFormat() { }
}

[Export(typeof(EditorFormatDefinition))]
Expand All @@ -70,6 +66,5 @@ public DirectiveFormat() { }
[UserVisible(true)]
class OperatorFormat : ClassificationFormatDefinition
{
public OperatorFormat() { }
}
}
5 changes: 0 additions & 5 deletions T4Language/T4Colors.pkgdef

This file was deleted.

5 changes: 3 additions & 2 deletions T4Language/T4Language.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,11 @@
<DependentUpon>assembly.tmSnippet.yml</DependentUpon>
<IncludeInVSIX>true</IncludeInVSIX>
</Content>
<Content Include="T4Colors.pkgdef">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
<Content Include="Themes.pkgdef">
<DependentUpon>Themes.xml</DependentUpon>
<IncludeInVSIX>true</IncludeInVSIX>
</Content>
<Content Include="Themes.xml" />
<None Include="Snippets\assembly.tmSnippet.yml" />
<Content Include="Snippets\import.tmSnippet">
<DependentUpon>import.tmSnippet.yml</DependentUpon>
Expand Down
5 changes: 5 additions & 0 deletions T4Language/Themes.pkgdef
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[$RootKey$\Themes\{de3dbbcd-f642-433c-8353-8f1df4370aba}\Text Editor]
"Data"=hex:95,00,00,00,0b,00,00,00,01,00,00,00,85,56,a0,75,a8,00,ed,4d,ba,e5,e7,a5,0b,fa,92,9a,05,00,00,00,0b,00,00,00,54,34,20,41,72,67,75,6d,65,6e,74,00,01,ff,00,00,ff,11,00,00,00,54,34,20,41,72,67,75,6d,65,6e,74,20,56,61,6c,75,65,00,01,00,00,ff,ff,0c,00,00,00,54,34,20,44,65,6c,69,6d,69,74,65,72,01,ff,ff,00,ff,01,00,00,00,ff,0c,00,00,00,54,34,20,44,69,72,65,63,74,69,76,65,00,01,80,00,00,ff,0b,00,00,00,54,34,20,4f,70,65,72,61,74,6f,72,00,01,00,00,ff,ff

[$RootKey$\Themes\{1ded0138-47ce-435e-84ef-9ec1f439b749}\Text Editor]
"Data"=hex:95,00,00,00,0b,00,00,00,01,00,00,00,85,56,a0,75,a8,00,ed,4d,ba,e5,e7,a5,0b,fa,92,9a,05,00,00,00,0b,00,00,00,54,34,20,41,72,67,75,6d,65,6e,74,00,01,9c,dc,fe,ff,11,00,00,00,54,34,20,41,72,67,75,6d,65,6e,74,20,56,61,6c,75,65,00,01,c8,c8,c8,ff,0c,00,00,00,54,34,20,44,65,6c,69,6d,69,74,65,72,01,ff,ff,b3,ff,01,00,00,00,ff,0c,00,00,00,54,34,20,44,69,72,65,63,74,69,76,65,00,01,56,9c,d6,ff,0b,00,00,00,54,34,20,4f,70,65,72,61,74,6f,72,00,01,b4,b4,b4,ff
34 changes: 20 additions & 14 deletions T4Language/T4Theme.xml → T4Language/Themes.xml
Original file line number Diff line number Diff line change
@@ -1,36 +1,42 @@
<Themes>
<Theme Name="Light" GUID="{de3dbbcd-f642-433c-8353-8f1df4370aba}">
<Category Name="Text Editor" GUID="{75a05685-00a8-4ded-bae5-e7a50bfa929a}">
<Color Name="T4 Directive">
<Foreground Type="CT_RAW" Source="FFAF00DB" />
<Color Name="T4 Argument">
<Foreground Type="CT_RAW" Source="FFFF0000" />
</Color>
<Color Name="T4 Argument Value">
<Foreground Type="CT_RAW" Source="FF0000FF" />
</Color>
<Color Name="T4 Delimiter">
<Background Type="CT_RAW" Source="FFDDDD76" />
<Background Type="CT_RAW" Source="FFFFFF00" />
<Foreground Type="CT_RAW" Source="FF000000" />
</Color>
<Color Name="T4 Argument">
<Foreground Type="CT_RAW" Source="FFE50000" />
<Color Name="T4 Directive">
<Foreground Type="CT_RAW" Source="FF800000" />
</Color>
<Color Name="T4 Argument Value">
<Color Name="T4 Operator">
<Foreground Type="CT_RAW" Source="FF0000FF" />
</Color>
</Category>
</Theme>
<Theme Name="Dark" GUID="{1ded0138-47ce-435e-84ef-9ec1f439b749}">
<Category Name="Text Editor" GUID="{75a05685-00a8-4ded-bae5-e7a50bfa929a}">
<Color Name="T4 Directive">
<Foreground Type="CT_RAW" Source="FFC586C0" />
<Color Name="T4 Argument">
<Foreground Type="CT_RAW" Source="FF9CDCFE" />
</Color>
<Color Name="T4 Argument Value">
<Foreground Type="CT_RAW" Source="FFC8C8C8" />
</Color>
<Color Name="T4 Delimiter">
<Background Type="CT_RAW" Source="FF8F8F1A" />
<Background Type="CT_RAW" Source="FFFFFFB3" />
<Foreground Type="CT_RAW" Source="FF000000" />
</Color>
<Color Name="T4 Argument">
<Foreground Type="CT_RAW" Source="FF9CDCFE" />
<Color Name="T4 Directive">
<Foreground Type="CT_RAW" Source="FF569CD6" />
</Color>
<Color Name="T4 Argument Value">
<Foreground Type="CT_RAW" Source="FFCE9178" />
<Color Name="T4 Operator">
<Foreground Type="CT_RAW" Source="FFB4B4B4" />
</Color>
</Category>
</Theme>
</Themes>
</Themes>
1 change: 0 additions & 1 deletion T4Language/source.extension.vsixmanifest
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
</Prerequisites>
<Assets>
<Asset Type="Microsoft.VisualStudio.VsPackage" d:Source="File" Path="Grammars.pkgdef" />
<Asset Type="Microsoft.VisualStudio.VsPackage" d:Source="File" Path="T4Colors.pkgdef" />
<Asset Type="Microsoft.VisualStudio.MefComponent" d:Source="Project" d:ProjectName="%CurrentProject%" Path="|%CurrentProject%|" />
</Assets>
</PackageManifest>
7 changes: 7 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ const fs = require("fs");
const gulp = require("gulp");
const js_yaml = require("js-yaml");
const plist = require("plist");
const execSync = require("child_process").execSync;

gulp.task("default", done => {
fs.writeFileSync(
Expand All @@ -27,5 +28,11 @@ gulp.task("default", done => {
fs.writeFileSync(
"T4Language/Syntaxes/t4.tmTheme",
plist.build(js_yaml.load(fs.readFileSync("T4Language/Syntaxes/t4.tmTheme.yml"))));

const vsInstallDir = execSync(`"${process.env['ProgramFiles(x86)']}/Microsoft Visual Studio/Installer/vswhere.exe" -property installationPath`)
.toString()
.trim();
execSync(`"${vsInstallDir}/VSSDK/VisualStudioIntegration/Tools/Bin/VsixColorCompiler.exe" T4Language/Themes.xml`);

done();
});

0 comments on commit 6bdc123

Please sign in to comment.