Merge branch 'main' of https://github.com/NotAShelf/nvf into language-overhaul

This commit is contained in:
sjcobb 2025-07-08 09:54:21 +01:00
commit 39da9a874e
88 changed files with 1160 additions and 509 deletions

View file

@ -6,7 +6,7 @@
}: let
inherit (lib.modules) mkIf;
inherit (lib.options) mkOption mkEnableOption mkPackageOption;
inherit (lib.types) nullOr either str listOf submodule;
inherit (lib.types) str submodule;
inherit (lib.attrsets) mapAttrs mapAttrsToList filterAttrs;
cfg = config.vim.clipboard;
in {
@ -20,7 +20,7 @@ in {
'';
registers = mkOption {
type = either str (listOf str);
type = str;
default = "";
example = "unnamedplus";
description = ''
@ -33,8 +33,8 @@ in {
`"+"` ({command}`:h quoteplus`) instead of register `"*"` for all yank, delete,
change and put operations which would normally go to the unnamed register.
When `unnamed` and `unnamedplus` is included simultaneously yank and delete
operations (but not put) will additionally copy the text into register `"*"`.
When `unnamed` and `unnamedplus` is included simultaneously as `"unnamed,unnamedplus"`,
yank and delete operations (but not put) will additionally copy the text into register `"*"`.
Please see {command}`:h clipboard` for more details.

View file

@ -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.
:::
'';
};

View file

@ -3,7 +3,7 @@
lib,
...
}: let
inherit (lib.modules) mkIf mkMerge;
inherit (lib.modules) mkMerge;
inherit (lib.trivial) pipe;
inherit (lib.attrsets) mapAttrsToList;
inherit (lib.lists) flatten;