gytis-ivaskevicius / nix2vim

[WIP] Nix to Lua parser meant to be used for configuring neovim
MIT License
53 stars 5 forks source link

Enable use of `rawLua` in arrays #8

Closed Kirens closed 1 year ago

Kirens commented 2 years ago

Previous version of nix2lua only cared about custom types such as rawLua in attrsets. Thus making someModule.attr = {someVar, someOtherVar} impossible to represent.

This was my solution, if you find it suitable.

P.S. Really promising project.

gytis-ivaskevicius commented 2 years ago

Hey, can you add this to the test? If i recall correctly we have simple test which compares definition and parsed result

Kirens commented 2 years ago

I think I managed to include a crude check for this:

https://github.com/gytis-ivaskevicius/nix2vim/blob/cca7b958cd7e190692929a2bcc5d26a2e890b3d8/checks/default.nix#L30-L41

https://github.com/gytis-ivaskevicius/nix2vim/blob/cca7b958cd7e190692929a2bcc5d26a2e890b3d8/checks/default.nix#L66-L68

gytis-ivaskevicius commented 1 year ago

Sorry that it took this long to merge this, it looks great. Thanks!!!