doc: fix typo
This commit is contained in:
parent
e42d73e3ff
commit
0102c7e7ab
1 changed files with 11 additions and 11 deletions
22
README.md
22
README.md
|
@ -1,14 +1,14 @@
|
|||
# nix2lua
|
||||
|
||||
This is a small but functional library that converts your nix configurations
|
||||
into lua format.
|
||||
into Lua format.
|
||||
|
||||
This library was initially designed for my personal
|
||||
[neovim flake](https://git.pleshevski.ru/mynix/neovim).
|
||||
[Neovim flake](https://git.pleshevski.ru/mynix/neovim).
|
||||
|
||||
# Installation
|
||||
|
||||
Add nix2lua as input to your flake.nix
|
||||
Add `nix2lua` as input to your `flake.nix`
|
||||
|
||||
```nix
|
||||
{
|
||||
|
@ -36,22 +36,22 @@ Add nix2lua as input to your flake.nix
|
|||
`toLua expr`
|
||||
|
||||
> Returns a string containing Lua representation of `expr`. Strings, integers,
|
||||
> floats, booleans, lists and sets are mapped to their Lua equivalents.
|
||||
> floats, boolean, lists and sets are mapped to their Lua equivalents.
|
||||
>
|
||||
> Null will be skipped. This is useful when you want to use an optional value.
|
||||
> To render `nil` you should use the `mkLuaNil` function.
|
||||
> To render `nil` you should use the `LuaNil` function.
|
||||
>
|
||||
> ```nix
|
||||
> toLua { foo = "bar"; }
|
||||
> toLua [ 10 "foo" [ "bar" ] ]
|
||||
> ```
|
||||
|
||||
`mkLuaNil expr`
|
||||
`LuaNil`
|
||||
|
||||
> Creates a type that will mapped by the `toLua` as `nil`
|
||||
> Creates a type that will be mapped by the `toLua` as `nil`
|
||||
>
|
||||
> ```nix
|
||||
> toLua mkLuaNil
|
||||
> toLua LuaNil
|
||||
> ```
|
||||
|
||||
`LuaRaw expr`
|
||||
|
@ -65,10 +65,10 @@ Add nix2lua as input to your flake.nix
|
|||
|
||||
`mkNamedField name expr`
|
||||
|
||||
> Creates a type that represents a named field in the lua table. This type
|
||||
> cannot exist outside of a list or set.
|
||||
> Creates a type that represents a named field in the Lua table. This type
|
||||
> cannot exist outside a list or set.
|
||||
>
|
||||
> This is usefull to create table with some named fields.
|
||||
> This is useful to create table with some named fields.
|
||||
>
|
||||
> ```nix
|
||||
> toLua [
|
||||
|
|
Loading…
Reference in a new issue