Commit graph

6 commits

Author SHA1 Message Date
Matt Sturgeon
511a328aa3
wrappers: add our lib to the host's _module.args
Make our "extended" lib available to host modules as `_module.args.nixvimLib`.

We didn't do this before because `helpers` was too generic of a name,
but `nixvimLib` should be ok.

    { nixvimLib, ... }: {
        programs.nixvim.someOption = nixvimLib.nixvim.mkRaw "print('Hi')";
    }
2024-08-22 13:19:59 +01:00
Matt Sturgeon
e555ba13b1
docs/helpers: document the "extended" lib 2024-08-22 13:19:59 +01:00
Matt Sturgeon
216d64c158
wrappers: make helpers available via lib option
NixOS, HM, & Darwin provide a `lib` option, not to be confused with the
`lib` module arg.

This option is intended for modules to define custom functions without
having to extend nixpkgs lib.

The old option is renamed, if it is accessed it will print:

    trace: Obsolete option `nixvim.helpers' is used. It was renamed to `lib.nixvim'.
2024-07-24 22:02:56 +01:00
Matt Sturgeon
8c44124a1f
docs/user-guide: fix blurb on accessing helpers
Fixes #1220
2024-07-08 16:24:07 +01:00
Gaetan Lepage
0ba2ea5416 helpers: add rawKeysAttrs 2024-05-31 21:53:40 +02:00
traxys
ad8aa72490
docs: Introduce an user guide (#1121) 2024-02-18 15:56:18 +01:00
Renamed from docs/helpers.md (Browse further)