From 5e7a7defb6ee85c8d4fdb6c4834574e8b5774e28 Mon Sep 17 00:00:00 2001 From: Lucas Hoffmann Date: Thu, 16 May 2024 22:12:18 +0200 Subject: [PATCH] Add a ldoc config file --- config.ld | 16 ++++++++++++++++ flake.nix | 5 ++++- 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 config.ld diff --git a/config.ld b/config.ld new file mode 100644 index 0000000..4bf8b6b --- /dev/null +++ b/config.ld @@ -0,0 +1,16 @@ +-- Config file for ldoc, see +-- https://stevedonovan.github.io/ldoc/manual/doc.md.html +-- vim: filetype=lua + +project = "nvimpager" +file = { + "lua", + "test", + exclude = { + "test/diff_test.lua", + "test/meta_test.lua", + "test/no_map_test.lua", + }} +all = true +readme = "README.md" +format = "markdown" diff --git a/flake.nix b/flake.nix index 02b047f..b9b2b47 100644 --- a/flake.nix +++ b/flake.nix @@ -49,12 +49,15 @@ }; } // (eachDefaultSystem (system: let - callPackage = (import nixpkgs { inherit system; }).callPackage nvimpager; + pkgs = import nixpkgs { inherit system; }; + callPackage = pkgs.callPackage nvimpager; neovim-nightly = neovim.packages.${system}.default; default = callPackage {}; nightly = callPackage { neovim = neovim-nightly; }; in { apps.default = flake-utils.lib.mkApp { drv = default; }; packages = { inherit default nightly; }; + packages.ldoc = pkgs.runCommandLocal "nvimpager-api-docs" {} + "cd ${self} && ${pkgs.luaPackages.ldoc}/bin/ldoc . --dir $out"; }))); }