| Crates.io | cooklang-language-server |
| lib.rs | cooklang-language-server |
| version | 0.1.2 |
| created_at | 2026-01-16 10:37:17.404293+00 |
| updated_at | 2026-01-21 20:26:25.444486+00 |
| description | Language Server Protocol implementation for Cooklang |
| homepage | |
| repository | https://github.com/cooklang/cooklang-language-server |
| max_upload_size | |
| id | 2048399 |
| size | 139,453 |
A Language Server Protocol (LSP) implementation for Cooklang, the markup language for recipes.
This language server provides rich editor support for .cook files, including syntax highlighting, auto-completion, and real-time error checking. It works with any LSP-compatible editor like VS Code, Neovim, Emacs, and Helix.
@), cookware (#), timers (~), and units (%)The Cooklang Language Server is available through the cook command-line tool.
The language server can be invoked via:
cook lsp
This starts the LSP server and communicates over stdin/stdout, which is the standard LSP transport mechanism.
Once you have cook installed, configure your editor to use it as the language server for .cook files.
Install the Cooklang extension from the marketplace or GitHub.
Using nvim-lspconfig:
require'lspconfig'.cooklang.setup{
cmd = { "cook", "lsp" },
filetypes = { "cook" },
root_dir = require'lspconfig'.util.root_pattern(".git"),
}
Add to your ~/.config/helix/languages.toml:
[[language]]
name = "cooklang"
scope = "source.cook"
file-types = ["cook"]
language-servers = ["cooklang-lsp"]
[language-server.cooklang-lsp]
command = "cook"
args = ["lsp"]
Any LSP-compatible editor can use this language server. Configure it to run cook lsp for .cook files.
Get real-time feedback on syntax errors and warnings:
Context-aware suggestions triggered by:
@ - Suggests ingredients from the current recipe and workspace# - Suggests cookware (both used in recipe and common items like "pot", "pan", "oven")~ - Suggests time units (seconds, minutes, hours)% - Suggests measurement units (g, kg, ml, cups, tbsp, etc.)Semantic token-based highlighting for:
@potato{2})#pot)~{25%minutes})-- and [- -])== Preparation ==)This language server is built with:
This repository contains the core LSP implementation. For building from source or contributing:
# Build the project
cargo build --release
# Run tests
cargo test
# The binary will be at target/release/cooklang-lsp
Licensed under the MIT License.