Filetype detection, Vim-regex syntax highlighting, and LSP diagnostics for
.zpp files. Pure Lua, no external plugin dependencies. Requires Neovim
0.10+ for the modern vim.lsp.start API.
-
Build the
zppbinary from the repo root:cd ../.. zig buildThis produces
zig-out/bin/zpp. -
Make sure
zppis on your$PATH, or pass an explicitcmdtosetup. -
Add the plugin to your runtimepath. Either symlink this directory:
ln -s "$(pwd)" ~/.config/nvim/pack/zigpp/start/zigpp
Or use a plugin manager. Example lazy.nvim spec:
{ dir = "/absolute/path/to/zigpp/editors/neovim", name = "zigpp", ft = "zigpp", config = function() require("zigpp").setup({ -- cmd = { "/absolute/path/to/zig-out/bin/zpp", "lsp" }, }) end, }
.zppfiles are recognized as filetypezigpp.- Syntax highlighting (Vim regex, no Tree-sitter required).
- The built-in
vim.lspclient auto-attaches tozpp lspon first.zppbuffer. Diagnostics are pulled by Neovim viatextDocument/diagnostic(E0001, E0002, E0003, E0004, E0010).
require("zigpp").setup({ ... }) accepts:
| Option | Default | Description |
|---|---|---|
cmd |
{ "zpp", "lsp" } |
Command launched by vim.lsp.start. |
root_markers |
{ "build.zig.zon", "build.zig", ".git" } |
Project-root markers, walked up from the file. |
Research-stage. The syntax file is heuristic; the LSP server only implements pull diagnostics — no completions, no formatting, no go-to-definition yet.