# `hue-md.nvim`: Hue MD for Neovim A Lua plugin for [Hue Markdown](https://spingras.github.io/hue-md/) in `.hue.md` and `.md` buffers: - Colors spans, diff spans, key caps, progress bars, task markers, box borders and ` ```hue ` fences, with the Hue palette for `background=light` and `background=dark`. Other code stays plain. - `` inside a box starts the next line with `| `. `` on an empty `| ` line closes the box. - `:HueBox [info|ok|note|warn|!|split]` inserts a box. ## Install Extract [`hue-md-nvim.zip`](https://github.com/spingras/hue-md/releases/latest/download/hue-md-nvim.zip) to `~/.config/nvim/pack/hue-md/start/hue-md.nvim` (Windows: `%LOCALAPPDATA%\nvim\pack\hue-md\start\hue-md.nvim`). It loads by itself. With `lazy.nvim`: ```lua { "spingras/hue-md", config = function(plugin) vim.opt.rtp:append(plugin.dir .. "/packages/nvim-hue") require("hue-md").setup() end, } ``` ## Development `lua/hue-md/parse.lua` follows the rules of the Hue parser (`src/core.js`). `npm test` at the repo root runs it in fengari (Lua in JavaScript) with a stand-in for the Neovim API. The manual check below covers real Neovim. ## Manual check 1. From the repo root, start Neovim without your config: ```bash nvim --clean --cmd "set rtp^=packages/nvim-hue" --cmd "runtime plugin/hue-md.lua" demo/demo.hue.md ``` 2. Check: - [ ] `passing` green, `71%` orange, `blocked` red; the yellow, blue-on-gray and `#c0ffee` spans colored; `{ok: ` and `}` dimmed; `{a: 1}` plain - [ ] the five box borders, side bars and titles in blue, green, purple, orange, red - [ ] the two side-by-side boxes at the end: left column green, right column orange - [ ] `[x]` green, `[-]` blue, `[!]` red, `[?]` purple, `[ ]` gray - [ ] `[[Ctrl+Shift+V]]` and `[[Esc]]` as key caps; the 80% bar blue, the 100% bar green - [ ] the Changelog line: green added text, red struck-through removed text 3. `:set background=light` and `:set background=dark`: the colors switch. 4. In insert mode on a `| ` line inside a box, press ``: the next line starts with `| `. Press `` on an empty `| `: the box closes with `+--`. 5. `:HueBox split` inserts two boxes side by side.