Skip to content

dermrvn-code/doc-lang

Repository files navigation

DocLang

A modern document language for structured content generation

Transform .dlang files into rich output using a powerful language server, CLI, and browser-based editor.


TypeScript Langium VS Code License


OverviewStudioQuick StartVS CodeCLI


✨ Overview

DocLang is a domain-specific language for creating structured documents with a modern authoring experience.


Features

  • ⚡ Langium-powered language infrastructure
  • 🖥️ Browser-based editor (DocLang Studio)
  • 🧩 VS Code extension with LSP support
  • ⚙️ CLI tooling for automation
  • ✅ Validation, diagnostics, and code intelligence

📸 DocLang Studio

Write, validate, and render .dlang documents directly in your browser.


DocLang Studio



🚀 Quick Start

Start the Web Editor

npm run dev

The editor is available at:

http://localhost:20002

Build the Project

npm run langium:generate
npm run build

🧩 VS Code Extension

Package the extension:

cd packages/extension
vsce package --allow-missing-repository

Install it:

code --install-extension ./vscode-doc-lang-0.0.1.vsix

⚡ CLI

Install globally:

cd packages/cli
npm link

Generate output:

doc-lang generate examples/first-example.dlang

Run without installation:

node packages/cli/bin/cli.js generate examples/first-example.dlang

📝 Examples

For examples, also including source code, from which the .dlang files are derived, see the examples folder.


📦 Project Structure

packages/
├── cli/
├── extension/
├── language/
└── web/

🏗️ Technology Stack

  • Langium
  • TypeScript
  • Node.js
  • Vite
  • VS Code Language Server Protocol

About

A modern document language for structured content generation

Topics

Resources

License

Stars

Watchers

Forks

Contributors