nix-community.nixvim/tests/test-sources
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
..
example-configurations treewide: Reformat with nixfmt 2024-05-05 22:00:40 +02:00
modules modules/output: refactor config generation 2024-07-22 23:18:53 +02:00
plugins modules/lsp/servers/vls: do not add filetype extension if not enabled 2024-07-21 20:17:03 +02:00
examples.nix treewide: Reformat with nixfmt 2024-05-05 22:00:40 +02:00