Ambystech.Elaris.UI.CodeEditor.Plugins
0.2.0-alpha0027
This is a prerelease version of Ambystech.Elaris.UI.CodeEditor.Plugins.
dotnet add package Ambystech.Elaris.UI.CodeEditor.Plugins --version 0.2.0-alpha0027
NuGet\Install-Package Ambystech.Elaris.UI.CodeEditor.Plugins -Version 0.2.0-alpha0027
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Ambystech.Elaris.UI.CodeEditor.Plugins" Version="0.2.0-alpha0027" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Ambystech.Elaris.UI.CodeEditor.Plugins" Version="0.2.0-alpha0027" />
<PackageReference Include="Ambystech.Elaris.UI.CodeEditor.Plugins" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Ambystech.Elaris.UI.CodeEditor.Plugins --version 0.2.0-alpha0027
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Ambystech.Elaris.UI.CodeEditor.Plugins, 0.2.0-alpha0027"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Ambystech.Elaris.UI.CodeEditor.Plugins@0.2.0-alpha0027
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Ambystech.Elaris.UI.CodeEditor.Plugins&version=0.2.0-alpha0027&prerelease
#tool nuget:?package=Ambystech.Elaris.UI.CodeEditor.Plugins&version=0.2.0-alpha0027&prerelease
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Ambystech.Elaris.UI.CodeEditor.Plugins
File-based syntax highlighting plugins for Elaris.UI CodeEditor.
Installation
dotnet add package Ambystech.Elaris.UI.CodeEditor.Plugins
Usage
Initializing Plugins
using Ambystech.Elaris.UI.CodeEditor.Plugins;
// Initialize plugins from directories
PluginInitializer.Initialize(
syntaxRulesDirectory: "path/to/syntax/rules",
themesDirectory: "path/to/themes"
);
Creating Syntax Rule Files
Create JSON files for each language you want to support:
Example: rust.json
{
"language": "rust",
"keywords": ["fn", "let", "mut", "pub", "struct", "enum"],
"stringDelimiters": ["\"", "r#\""],
"commentPatterns": ["//.*", "/\\*.*?\\*/"],
"numberPattern": "\\b\\d+(\\.\\d+)?\\b",
"bracketPairs": {
"(": ")",
"[": "]",
"{": "}"
}
}
Creating Theme Files
Create JSON files for each theme:
Example: monokai.json
{
"name": "monokai",
"displayName": "Monokai",
"colors": {
"Keyword": { "r": 249, "g": 38, "b": 114 },
"String": { "r": 230, "g": 219, "b": 116 },
"Comment": { "r": 117, "g": 113, "b": 94 },
"Number": { "r": 174, "g": 129, "b": 255 },
"Operator": { "r": 248, "g": 248, "b": 242 },
"Identifier": { "r": 248, "g": 248, "b": 242 }
}
}
Using Plugins in CodeEditor
var codeEditor = new CodeEditor
{
Language = "rust", // Uses plugin-provided rules
Theme = "monokai" // Uses plugin-provided theme
};
Plugin Directory Structure
plugins/
├── syntax/
│ ├── rust.json
│ ├── go.json
│ └── ...
└── themes/
├── monokai.json
├── solarized.json
└── ...
Features
- Lazy Loading: Plugins are loaded only when needed
- Caching: Loaded rules and themes are cached in memory
- Fallback: Falls back to built-in providers if plugin not found
- Thread-Safe: Safe for concurrent access
Token Types
Keyword: Language keywordsString: String literalsComment: CommentsNumber: Numeric literalsOperator: Operators and punctuationIdentifier: Identifiers and variable names
License
MIT
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- Ambystech.Elaris.UI (>= 0.1.0-alpha)
-
net8.0
- Ambystech.Elaris.UI (>= 0.1.0-alpha)
-
net9.0
- Ambystech.Elaris.UI (>= 0.1.0-alpha)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.2.0-alpha0027 | 91 | 4/20/2026 |
| 0.2.0-alpha0025 | 84 | 4/20/2026 |
| 0.2.0-alpha0023 | 85 | 4/19/2026 |
| 0.1.8 | 97 | 4/20/2026 |
| 0.1.7 | 93 | 4/20/2026 |