A lightweight .NET library family for building language-server-powered editors: a StreamJsonRpc LSP client, generic editor IntelliSense contracts, and a Lua provider backed by LuaLS.
This repository is a small, focused collection of .NET libraries that make it easy to add language-server-powered IntelliSense to a text editor. Instead of coupling an editor to a single language server, the family is split into three layers:
| Package | Purpose |
|---|---|
Nickelony.LanguageServer.Abstractions |
Dependency-free editor IntelliSense contracts - the stable seam between an editor and any language provider. |
Nickelony.LanguageServer.Client |
A lightweight LSP client built on StreamJsonRpc: spawns a language-server process and speaks LSP over stdio. |
Nickelony.LanguageServer.Lua |
A ready-to-use Lua provider that implements the editor contracts on top of the client and drives the real LuaLS executable. |
It powers Lua IntelliSense in Tomb Editor (TombIDE.ScriptingStudio).
- Editor-first contracts - completion, hover, definition, references, rename, formatting, signature help, diagnostics, and (for Lua) semantic tokens, expressed as plain editor types with zero dependency on any LSP implementation.
- Real LSP transport - process hosting,
initializehandshake, capability negotiation, JSON-RPC over stdio via StreamJsonRpc. - Robust lifecycle - automatic server restart on crash, transport versioning, graceful shutdown, and workspace re-sync after restart.
- Document tracking - full and incremental text-document synchronization, plus a workspace file watcher that forwards file changes to the server.
- Plug-and-play Lua provider - point it at a
lua-language-serverexecutable and get IntelliSense, diagnostics, and semantic coloring in your editor.
The fastest way to get going is to reference the Lua package and host
LuaLanguageServerIntelliSenseProvider in your editor:
<PackageReference Include="Nickelony.LanguageServer.Lua" Version="1.0.0-preview.1" />using Nickelony.LanguageServer.Lua;
var provider = new LuaLanguageServerIntelliSenseProvider(
workspaceRootDirectoryPath: @"C:\my\workspace",
serverExecutablePath: @"C:\tools\lua-language-server\lua-language-server.exe");
provider.DiagnosticsUpdated += (filePath, diagnostics) =>
{
// Diagnostics arrive on a background thread - marshal to your UI thread here.
// Show them in your editor's error list / squiggles.
};
provider.OpenDocument(@"C:\my\workspace\main.lua", sourceText);
var completions = await provider.GetCompletionItemsAsync(
@"C:\my\workspace\main.lua", sourceText, line, column);See the Lua package README for the full example, or the Client and Abstractions READMEs for the lower layers. The consumer integration guide documents construction, disposal, event marshaling, document references, and cancellation behavior.
┌───────────────────────────────┐
│ Your editor │
└───────────────┬───────────────┘
│ uses
┌───────────────▼───────────────┐
│ Nickelony.LanguageServer │ Lua provider (ILuaIntelliSenseProvider)
│ .Lua │
└───────┬───────────────┬───────┘
│ │
┌───────▼───────┐ ┌─────▼───────────────┐
│ Abstractions │ │ Client │ LSP over stdio (StreamJsonRpc)
│ (contracts) │ │ (process + RPC) │
└───────────────┘ └──────┬──────────────┘
│ stdio (JSON-RPC)
┌───────▼──────────────┐
│ Language server │ e.g. LuaLS (lua-language-server)
└──────────────────────┘
Abstractionshas zero package dependencies - it is a pure leaf any editor or provider can reference safely.Clientdepends onAbstractions,StreamJsonRpc, andMicrosoft.Extensions.Logging.Abstractions.Luadepends onAbstractions+Clientand shells out to an external server executable.
- .NET 8 (all packages target
net8.0, cross-platform). - The Lua package additionally needs the
lua-language-serverexecutable at runtime (download from the LuaLS releases).
dotnet build Nickelony.LanguageServer.slnx
dotnet test Nickelony.LanguageServer.slnxThe test suite covers the client and Lua provider, plus four opt-in integration tests that
require a local LuaLS bundle. Run dotnet test for the current counts.
Nickelony.LanguageServer.Abstractions/ editor contracts (zero dependencies)
Nickelony.LanguageServer.Client/ LSP client + protocol machinery
Nickelony.LanguageServer.Lua/ Lua provider backed by LuaLS
Tests/
Nickelony.LanguageServer.Client.Tests/
Nickelony.LanguageServer.Lua.Tests/
TestSupport/ shared test logger
MIT © 2026 Kewin Kupilas.