# Editor support The binding language has no render errors. An unknown path renders as empty, never as the path itself and never as `undefined`, so a typo ships silently and is found by a shopper looking at a blank element. `mercemur theme check` catches that at commit time. The language server catches it at keystroke time, which is where it is cheapest to fix. ## What it does | | | |---|---| | **Completion** | Only the objects **this** template kind is bound with. A product template offers `product`, not `shop`, because `shop.*` there renders empty | | **Diagnostics** | A path that is not in the contract, an object the page was never given, an amount without the money filter | | **Hover** | What a property holds, and whether it is an amount in minor units | Completing an amount inserts the filter with it: choosing `price` writes `price | money`. Rendering `1999` at a shopper is the most common binding mistake, and completion is the one moment a tool can prevent it rather than report it. ## VS Code There is no marketplace extension yet. Point any generic LSP client at the binary. With [vscode-glspc](https://marketplace.visualstudio.com/items?itemName=llllvvuu.vscode-glspc): ```json settings.json { "glspc.languageId": "html", "glspc.serverCommand": "mercemur", "glspc.serverCommandArguments": ["language-server"], "glspc.documentSelector": ["**/templates/*.liquid"] } ``` ## Neovim ```lua init.lua vim.api.nvim_create_autocmd("FileType", { pattern = "liquid", callback = function() vim.lsp.start({ name = "mercemur", cmd = { "mercemur", "language-server" }, root_dir = vim.fs.dirname(vim.fs.find({ "online-store.json" }, { upward = true })[1]), }) end, }) ``` ## Zed ```json settings.json { "lsp": { "mercemur": { "binary": { "path": "mercemur", "arguments": ["language-server"] } } } } ``` ## Working offline The server fetches the contract once at startup, on a short timeout, and never fails if it cannot. Without a store or a key it still runs and still reports the rules that need no schema, because an editor that fails to start is worse than one that knows less. A laptop on a plane is a normal place to edit a template. The same applies to `theme check`: it says so explicitly when paths were not checked, rather than reporting "nothing to report" and letting that read as "every path is real". ```bash mercemur theme check --offline # skip the fetch deliberately ``` `mercemur language-server` is not run by hand. An editor starts it and speaks LSP over stdin and stdout; stdout is the protocol channel, so the command prints nothing of its own.