mdt_lsp 0.9.0

LSP server for mdt — editor diagnostics, completions, and code actions for markdown templates
Documentation

mdt_lsp

language server for mdt (manage markdown templates)

[![Crate][crate-image]][crate-link] [![Docs][docs-image]][docs-link] [![Status][ci-status-image]][ci-status-link] [![Coverage][coverage-image]][coverage-link] [![Unlicense][unlicense-image]][unlicense-link]

mdt_lsp is a Language Server Protocol implementation for the mdt template engine. It provides real-time editor integration for managing markdown template blocks.

Capabilities

  • Diagnostics — reports stale target blocks, missing sources (with name suggestions), duplicate sources, unclosed blocks, unknown transformers, invalid arguments, unused sources, and source blocks in non-template files.
  • Completions — suggests block names after {=, {~, {@, and {/ tags, and transformer names after |.
  • Hover — shows provider source, rendered content, transformer chain, and consumer count when hovering over a block tag.
  • Go to definition — navigates from a target block to its provider, or from a source to all of its consumers.
  • References — finds all source, target, and inline blocks sharing the same name.
  • Rename — renames a block across all provider and target tags (both opening and closing) in the workspace.
  • Document symbols — lists source, target, and inline blocks in the outline/symbol view.
  • Code actions — offers a quick-fix to update stale target blocks in place.

Usage

Start the language server via the CLI:

mdt lsp

The server communicates over stdin/stdout using the Language Server Protocol.

Installation

[dependencies]
mdt_lsp = "0.9.0"

[crate-image]: https://img.shields.io/crates/v/mdt_lsp.svg [crate-link]: https://crates.io/crates/mdt_lsp [docs-image]: https://docs.rs/mdt_lsp/badge.svg [docs-link]: https://docs.rs/mdt_lsp/ [ci-status-image]: https://github.com/ifiokjr/mdt/workflows/ci/badge.svg [ci-status-link]: https://github.com/ifiokjr/mdt/actions?query=workflow:ci [coverage-image]: https://codecov.io/gh/ifiokjr/mdt/branch/main/graph/badge.svg [coverage-link]: https://codecov.io/gh/ifiokjr/mdt [unlicense-image]: https://img.shields.io/badge/license-Unlicence-blue.svg [unlicense-link]: https://opensource.org/license/unlicense