nuwiki Architecture

Layered architecture showing the Rust LSP backend and editor integration layers

Consumer Layer Editor highlight, HTML export, TOC, etc. AST Layer (nuwiki-core) Document > Block nodes > Inline nodes Parser Layer Syntax-specific (nuwiki-core) Lexer Layer Syntax-specific (nuwiki-core) Raw Text Input nuwiki-ls Binary crate — starts stdio LSP server nuwiki-lsp LSP protocol bridge (tower-lsp) nuwiki-core Parser, AST, Renderer (editor-agnostic) depends on depends on VimL Layer plugin/nuwiki.vim, autoload/ Lua Layer lua/nuwiki/ Vim/Neovim Neovim only LSP Features • textDocument/semanticTokens • textDocument/publishDiagnostics • textDocument/definition • textDocument/references • textDocument/documentSymbol • textDocument/hover • textDocument/completion • workspace/rename • workspace/symbol Crate Dependencies Legend Editor Layers Core Crates Layer Boundaries Data Flow

Editor Integration

  • • VimL layer for universal Vim support
  • • Lua layer for Neovim integration
  • • Zero-logic editor layers (pure wiring only)
  • • Supports vim-lsp and coc.nvim for Vim
  • • Built-in LSP client for Neovim 0.11+

Core Architecture

  • • Strict layer separation (no circular deps)
  • • nuwiki-core is editor-agnostic
  • • LSP bridge uses tower-lsp
  • • Binary crate is intentionally thin
  • • Strict dependency rules enforced

LSP Features

  • • Syntax highlighting (semantic tokens)
  • • Diagnostics (broken links, parse errors)
  • • Go-to-definition and references
  • • Document symbols (TOC/outline)
  • • Hover, completion, workspace symbols
  • • Rename and workspace-wide operations