diff --git a/modules/neovim/init/diagnostics.nix b/modules/neovim/init/diagnostics.nix index 18717edf..8a8e7b38 100644 --- a/modules/neovim/init/diagnostics.nix +++ b/modules/neovim/init/diagnostics.nix @@ -57,14 +57,21 @@ signs = mkOption { type = diagnosticType; default = false; - example = { - signs.text = { - "vim.diagnostic.severity.ERROR" = "󰅚 "; - "vim.diagnostic.severity.WARN" = "󰀪 "; - }; - }; + example = literalExpression '' + signs.text = lib.generators.mkLuaInline ''' + { + [vim.diagnostic.severity.ERROR] = "󰅚 ", + [vim.diagnostic.severity.WARN] = "󰀪 ", + } + '''; + ''; description = '' Use signs for diagnostics. See {command}`:help diagnostic-signs`. + + :::{.note} + The code presented in that example section uses Lua expressions as object keys which + only translate well if you use `lib.generators.mkLuaInline` as in the example. + ::: ''; };