Skip to content

Commit 2d8d031

Browse files
committed
visuals/fidget-nvim: update setupOpts to match upstream
1 parent 7dc5b79 commit 2d8d031

File tree

2 files changed

+71
-5
lines changed

2 files changed

+71
-5
lines changed

modules/plugins/filetree/nvimtree/config.nix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ in {
1919
"<leader>t" = "+NvimTree";
2020
};
2121

22+
visuals.fidget-nvim.setupOpts.notification.window.avoid = ["NvimTree"];
23+
2224
lazy.plugins.nvim-tree-lua = {
2325
package = "nvim-tree-lua";
2426
setupModule = "nvim-tree";

modules/plugins/visuals/fidget-nvim/fidget.nix

Lines changed: 69 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
inherit (lib.options) mkEnableOption mkOption literalExpression;
88
inherit (lib.strings) toUpper;
99
inherit (lib.types) int float bool str enum listOf attrsOf oneOf nullOr submodule;
10+
inherit (lib.trivial) warn;
1011
inherit (lib.nvim.types) mkPluginSetupOption luaInline borderType;
1112
inherit (lib.generators) mkLuaInline;
1213
in {
@@ -53,6 +54,16 @@ in {
5354
end
5455
'';
5556
};
57+
clear_on_detach = mkOption {
58+
description = "Clear notification group when LSP server detaches";
59+
type = nullOr luaInline;
60+
default = mkLuaInline ''
61+
function(client_id)
62+
local client = vim.lsp.get_client_by_id(client_id)
63+
return client and client.name or nil
64+
end
65+
'';
66+
};
5667
ignore = mkOption {
5768
description = "Ignore LSP servers by name";
5869
type = listOf str;
@@ -417,6 +428,20 @@ in {
417428
type = bool;
418429
default = true;
419430
};
431+
align = mkOption {
432+
description = "Indent messages longer than a single line";
433+
type = enum ["message" "annote"];
434+
default = "message";
435+
};
436+
reflow = mkOption {
437+
description = ''
438+
Reflow (wrap) messages wider than notification window
439+
440+
The various options determine how wrapping is handled mid-word.
441+
'';
442+
type = enum ["hard" "hyphenate" "ellipsis" "false"];
443+
default = "false";
444+
};
420445
icon_separator = mkOption {
421446
description = "Separator between group name and icon";
422447
type = str;
@@ -432,6 +457,16 @@ in {
432457
type = str;
433458
default = "Comment";
434459
};
460+
line_margin = mkOption {
461+
description = ''
462+
Spaces to pad both sides of each non-empty line
463+
464+
Useful for adding a visual gap between notification text
465+
and any buffer it may overlap with.
466+
'';
467+
type = int;
468+
default = 1;
469+
};
435470
render_message = mkOption {
436471
description = "How to render notification messages";
437472
type = luaInline;
@@ -462,6 +497,15 @@ in {
462497
then config.vim.ui.borders.globalStyle
463498
else "none";
464499
};
500+
border_hl = mkOption {
501+
description = ''
502+
Highlight group for notification window border
503+
504+
Set to empty string to keep your theme's default `FloatBorder` highlight.
505+
'';
506+
type = str;
507+
default = "";
508+
};
465509
zindex = mkOption {
466510
description = "Stacking priority of the notification window";
467511
type = int;
@@ -497,6 +541,16 @@ in {
497541
type = enum ["editor" "win"];
498542
default = "editor";
499543
};
544+
tabstop = mkOption {
545+
description = "Width of each tab character in the notification window";
546+
type = int;
547+
default = 8;
548+
};
549+
avoid = mkOption {
550+
description = "Filetypes the notification window should avoid";
551+
type = listOf str;
552+
default = [];
553+
};
500554
};
501555
};
502556

@@ -505,17 +559,27 @@ in {
505559
enable = mkOption {
506560
description = "Integrate with nvim-tree/nvim-tree.lua (if enabled)";
507561
type = bool;
508-
default =
509-
if config.vim.filetree.nvimTree.enable
510-
then true
511-
else false;
562+
default = false;
563+
visible = false;
564+
apply = warn ''
565+
Option `vim.visuals.fidget-nvim.setupOpts.integration.nvim-tree.enable`
566+
has been deprecated upstream. Use
567+
`vim.visuals.fidget-nvim.setupOpts.notification.window.avoid = ["NvimTree"]` instead.
568+
This is already set if `vim.filetree.nvimTree.enable == true`.
569+
'';
512570
};
513571
};
514572
xcodebuild-nvim = {
515573
enable = mkOption {
516574
description = "Integrate with wojciech-kulik/xcodebuild.nvim (if enabled)";
517575
type = bool;
518-
default = true;
576+
default = false;
577+
visible = false;
578+
apply = warn ''
579+
Option `vim.visuals.fidget-nvim.setupOpts.integration.xcodebuild-nvim.enable`
580+
has been deprecated upstream. Use
581+
`vim.visuals.fidget-nvim.setupOpts.notification.window.avoid = ["TestExplorer"]` instead.
582+
'';
519583
};
520584
};
521585
};

0 commit comments

Comments
 (0)