nix-community.nixvim/tests/test-sources/modules
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.nix treewide: Reformat with nixfmt 2024-05-05 22:00:40 +02:00
clipboard.nix treewide: Reformat with nixfmt 2024-05-05 22:00:40 +02:00
commands.nix modules/commands: allow commands to be raw lua 2024-05-21 14:27:49 +02:00
diagnostics.nix modules/diagnostics: add test 2024-06-21 16:10:27 +02:00
editorconfig.nix editorconfig: Migrate to builtin plugin (#335) 2023-04-15 15:21:25 +02:00
extra-files.nix modules: refactor extraFiles 2024-07-07 16:42:47 +01:00
files.nix modules/files: fix creating configs of vim type 2024-07-19 14:45:34 +03:00
filetypes.nix modules/filetype: ensure that the module does not set empty settings 2024-07-22 11:33:52 +03:00
highlight.nix tests: fix occurences of deprecated "options" option 2024-03-30 14:21:21 +01:00
keymaps.nix keymaps: remove remaining usages of deprecated lua option 2024-05-27 14:57:40 +02:00
lua-loader.nix modules/lua-loader: make enable option nullable 2024-07-21 17:11:50 +03:00
options.nix tests: fix occurences of deprecated "options" option 2024-03-30 14:21:21 +01:00
output.nix modules/output: refactor config generation 2024-07-22 23:18:53 +02:00