mirror of
https://github.com/nix-community/nixvim.git
synced 2025-07-14 11:14:36 +02:00
lib/util: move docs from lib/index
to doc-comments
Moved all function-specific docs from `docs/lib/index.md` into RFC145 doc-comments. Added `lib.nixvim.lua.toLuaObject` to hold the public docs and serve as a stable impl of `toLua'` in case we decide to change its defaults.
This commit is contained in:
parent
4a272ca5d7
commit
f4a7447d27
4 changed files with 64 additions and 46 deletions
|
@ -38,6 +38,21 @@ rec {
|
|||
# Whether the value is a lua-inline type
|
||||
isInline = v: v._type or null == "lua-inline";
|
||||
|
||||
/**
|
||||
Serialise a nix value as a lua object.
|
||||
|
||||
Useful for defining your own plugins or structured config.
|
||||
|
||||
# Type
|
||||
|
||||
```
|
||||
toLuaObject :: Any -> String
|
||||
```
|
||||
*/
|
||||
toLuaObject =
|
||||
# toLua' with backwards-compatible options
|
||||
toLua' { };
|
||||
|
||||
# toLua' with default options, aliased as toLuaObject at the top-level
|
||||
toLua = toLua' { };
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue