Skip to content

Lenivvenil/zed-likec4

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LikeC4 for Zed

CI License: MIT

LikeC4 language support for the Zed editor.

LikeC4 is an architecture-as-code DSL that lets you describe your software architecture with a simple, human-readable language and visualize it as interactive diagrams.

This extension brings first-class LikeC4 editing experience to Zed with a custom tree-sitter grammar and the official LikeC4 Language Server.

Features

  • Syntax highlighting — rich, tree-sitter-based highlighting for all LikeC4 constructs
  • Code completion — context-aware suggestions for elements, relationships, views, and keywords
  • Diagnostics — real-time validation errors and warnings as you type
  • Hover information — documentation and details on hover
  • Go to Definition — jump to element and relationship definitions
  • Find References — locate all usages of an element across your workspace
  • Rename — safely rename elements with all references updated
  • Code outline — navigate your architecture models with the Outline panel
  • Auto-indentation — smart indentation for all block types
  • Bracket matching — automatic matching of braces

Installation

  1. Open Zed
  2. Open the Extensions panel (Cmd+Shift+X on macOS)
  3. Search for "LikeC4"
  4. Click Install

The extension will automatically download and manage the LikeC4 language server.

Configuration

Language Server Settings

You can pass custom settings to the LikeC4 language server through your Zed settings (Cmd+,):

{
  "lsp": {
    "likec4-language-server": {
      "settings": {},
      "initialization_options": {}
    }
  }
}

Limitations

  • No diagram preview — Zed does not currently support webview panels in extensions, so live diagram visualization is not available. Use the LikeC4 CLI or the VSCode extension for diagram previews.

Development

Prerequisites

  • Rust (installed via rustup)
  • The wasm32-wasip1 target:
    rustup target add wasm32-wasip1

Building

# Lint (mirrors CI)
cargo clippy --target wasm32-wasip1 -- -D warnings

# Build release WASM
cargo build --release --target wasm32-wasip1

Testing locally

  1. Open Zed
  2. Open the Extensions panel
  3. Click Install Dev Extension
  4. Select the root directory of this repository
  5. Open a .likec4 file to verify syntax highlighting and the language server

Resources

Links

License

MIT — see LICENSE for details.

About

LikeC4 architecture-as-code language support for Zed

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors