Problem: PlantUML (`.puml`) diagrams have no built-in preview support, and Neovim lacks filetype detection for PlantUML files. Solution: Add a `plantuml` preset that compiles to SVG via `plantuml -tsvg`, with an error parser for `Error line N` diagnostics. Register `.puml` and `.pu` extensions via `vim.filetype.add` when the preset is configured. Add `plantuml` to the nix dev shell.
40 lines
886 B
Nix
40 lines
886 B
Nix
{
|
|
description = "preview.nvim — async document compilation for Neovim";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
|
systems.url = "github:nix-systems/default";
|
|
};
|
|
|
|
outputs =
|
|
{
|
|
nixpkgs,
|
|
systems,
|
|
...
|
|
}:
|
|
let
|
|
forEachSystem =
|
|
f: nixpkgs.lib.genAttrs (import systems) (system: f nixpkgs.legacyPackages.${system});
|
|
in
|
|
{
|
|
formatter = forEachSystem (pkgs: pkgs.nixfmt-tree);
|
|
|
|
devShells = forEachSystem (pkgs: {
|
|
default = pkgs.mkShell {
|
|
packages = [
|
|
(pkgs.luajit.withPackages (
|
|
ps: with ps; [
|
|
busted
|
|
nlua
|
|
]
|
|
))
|
|
pkgs.prettier
|
|
pkgs.stylua
|
|
pkgs.selene
|
|
pkgs.lua-language-server
|
|
pkgs.plantuml
|
|
];
|
|
};
|
|
});
|
|
};
|
|
}
|