nix-community.nixvim/lib
Stanislav Asunkin 299d0406bb modules/output: refactor config generation
The motivation for this change was to avoid generating empty
config sections like

    vim.cmd([[

    ]])

To make a config generation cleaner several helper functions introduced:

* `hasContent` have been moved to helpers
* `concatNonEmptyLines` joins strings (which has content) separated with
  newlines
* `wrapVimscriptForLua` wraps a lua string for using in Vimscript, but
  only if the string has content, otherwise empty string is returned
* `wrapLuaForVimscript` wraps Vimscript for using in lua, but only if
  the string has content, otherwise empty string is returned

Added tests:

* testing that all possible config sections are present in the final
  generated config
* testing that the config files generated by empty `files` definitions
  don't have any content in it
2024-07-22 23:18:53 +02:00
..
autocmd-helpers.nix treewide: Reformat with nixfmt 2024-05-05 22:00:40 +02:00
builders.nix treewide: Reformat with nixfmt 2024-05-05 22:00:40 +02:00
default.nix treewide: Reformat with nixfmt 2024-05-05 22:00:40 +02:00
deprecation.nix lib/deprecation: add transitionType 2024-07-07 16:02:37 +01:00
helpers.nix wrappers: bootstrap "helpers" directly 2024-07-08 16:24:06 +01:00
keymap-helpers.nix lib/keymaps: refactor mkMapOptionSubmodule again 2024-06-07 15:42:54 +01:00
maintainers.nix maintainers: remove MattSturgeon 2024-07-10 09:18:17 +01:00
neovim-plugin.nix lib/neovim-plugin: allow disabling installPackage 2024-07-06 13:01:07 +01:00
options.nix lib/options: allow rawLua in mkEnum' default 2024-07-08 17:48:00 +01:00
to-lua.nix lib/to-lua: handle derivations as path strings 2024-07-22 13:24:16 +01:00
types.nix lib/types: allow emptyTable as a valid rawLua value 2024-07-08 10:21:49 +02:00
utils.nix modules/output: refactor config generation 2024-07-22 23:18:53 +02:00
vim-plugin.nix lib/vim-plugin: fix + improve settings example 2024-06-29 00:09:43 +01:00