nix-community.nixvim/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
..
misc modules/context: init with isDocs 2024-07-06 11:47:41 +01:00
top-level modules/output: refactor config generation 2024-07-22 23:18:53 +02:00
autocmd.nix modules: use real nix expressions for option examples 2024-06-20 08:07:10 +02:00
clipboard.nix modules/clipboard: use md link in description 2024-06-05 08:04:33 +01:00
colorscheme.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
default.nix modules: refactor extraFiles 2024-07-07 16:42:47 +01:00
diagnostics.nix modules/diagnostics: rename source file 2024-06-21 16:10:27 +02:00
doc.nix treewide: Reformat with nixfmt 2024-05-05 22:00:40 +02:00
editorconfig.nix treewide: Reformat with nixfmt 2024-05-05 22:00:40 +02:00
files.nix modules: refactor extraFiles 2024-07-07 16:42:47 +01:00
filetype.nix modules/filetype: ensure that the module does not set empty settings 2024-07-22 11:33:52 +03:00
highlights.nix modules: use real nix expressions for option examples 2024-06-20 08:07:10 +02:00
keymaps.nix misc: ensure all options have a description 2024-06-11 11:34:10 +02:00
lua-loader.nix modules/lua-loader: make enable option nullable 2024-07-21 17:11:50 +03:00
opts.nix treewide: Reformat with nixfmt 2024-05-05 22:00:40 +02:00
output.nix modules/output: refactor config generation 2024-07-22 23:18:53 +02:00
plugins.nix treewide: Reformat with nixfmt 2024-05-05 22:00:40 +02:00