mirror of
https://github.com/NotAShelf/nvf.git
synced 2026-05-21 22:36:32 +00:00
visuals/fidget-nvim: update setupOpts to match upstream
This commit is contained in:
parent
e86a92e4b2
commit
7931d08f5a
3 changed files with 102 additions and 18 deletions
|
|
@ -475,6 +475,7 @@ https://github.com/gorbit99/codewindow.nvim
|
||||||
- Add CMake support with [neocmakelsp].
|
- Add CMake support with [neocmakelsp].
|
||||||
- Add Arduino support with [arduino-language-server].
|
- Add Arduino support with [arduino-language-server].
|
||||||
- Add GLSL support with [glsl_analyzer].
|
- Add GLSL support with [glsl_analyzer].
|
||||||
|
- Update fidget-nvim setupOpts and fix NvimTree issue.
|
||||||
|
|
||||||
[itscrystalline](https://github.com/itscrystalline):
|
[itscrystalline](https://github.com/itscrystalline):
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,8 @@ in {
|
||||||
"<leader>t" = "+NvimTree";
|
"<leader>t" = "+NvimTree";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
visuals.fidget-nvim.setupOpts.notification.window.avoid = ["NvimTree"];
|
||||||
|
|
||||||
lazy.plugins.nvim-tree-lua = {
|
lazy.plugins.nvim-tree-lua = {
|
||||||
package = "nvim-tree-lua";
|
package = "nvim-tree-lua";
|
||||||
setupModule = "nvim-tree";
|
setupModule = "nvim-tree";
|
||||||
|
|
|
||||||
|
|
@ -53,6 +53,24 @@ in {
|
||||||
end
|
end
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
clear_on_detach = mkOption {
|
||||||
|
type = nullOr luaInline;
|
||||||
|
default = mkLuaInline ''
|
||||||
|
function(client_id)
|
||||||
|
local client = vim.lsp.get_client_by_id(client_id)
|
||||||
|
return client and client.name or nil
|
||||||
|
end
|
||||||
|
'';
|
||||||
|
defaultText = literalExpression ''
|
||||||
|
default = mkLuaInline '''
|
||||||
|
function(client_id)
|
||||||
|
local client = vim.lsp.get_client_by_id(client_id)
|
||||||
|
return client and client.name or nil
|
||||||
|
end
|
||||||
|
''';
|
||||||
|
'';
|
||||||
|
description = "Clear notification group when LSP server detaches";
|
||||||
|
};
|
||||||
ignore = mkOption {
|
ignore = mkOption {
|
||||||
description = "Ignore LSP servers by name";
|
description = "Ignore LSP servers by name";
|
||||||
type = listOf str;
|
type = listOf str;
|
||||||
|
|
@ -417,6 +435,20 @@ in {
|
||||||
type = bool;
|
type = bool;
|
||||||
default = true;
|
default = true;
|
||||||
};
|
};
|
||||||
|
align = mkOption {
|
||||||
|
type = enum ["message" "annote"];
|
||||||
|
default = "message";
|
||||||
|
description = "Indent messages longer than a single line";
|
||||||
|
};
|
||||||
|
reflow = mkOption {
|
||||||
|
type = enum ["hard" "hyphenate" "ellipsis" "false"];
|
||||||
|
default = "false";
|
||||||
|
description = ''
|
||||||
|
Reflow (wrap) messages wider than notification window
|
||||||
|
|
||||||
|
The various options determine how wrapping is handled mid-word.
|
||||||
|
'';
|
||||||
|
};
|
||||||
icon_separator = mkOption {
|
icon_separator = mkOption {
|
||||||
description = "Separator between group name and icon";
|
description = "Separator between group name and icon";
|
||||||
type = str;
|
type = str;
|
||||||
|
|
@ -432,6 +464,16 @@ in {
|
||||||
type = str;
|
type = str;
|
||||||
default = "Comment";
|
default = "Comment";
|
||||||
};
|
};
|
||||||
|
line_margin = mkOption {
|
||||||
|
type = int;
|
||||||
|
default = 1;
|
||||||
|
description = ''
|
||||||
|
Spaces to pad both sides of each non-empty line
|
||||||
|
|
||||||
|
Useful for adding a visual gap between notification text
|
||||||
|
and any buffer it may overlap with.
|
||||||
|
'';
|
||||||
|
};
|
||||||
render_message = mkOption {
|
render_message = mkOption {
|
||||||
description = "How to render notification messages";
|
description = "How to render notification messages";
|
||||||
type = luaInline;
|
type = luaInline;
|
||||||
|
|
@ -462,6 +504,15 @@ in {
|
||||||
then config.vim.ui.borders.globalStyle
|
then config.vim.ui.borders.globalStyle
|
||||||
else "none";
|
else "none";
|
||||||
};
|
};
|
||||||
|
border_hl = mkOption {
|
||||||
|
type = str;
|
||||||
|
default = "";
|
||||||
|
description = ''
|
||||||
|
Highlight group for notification window border
|
||||||
|
|
||||||
|
Set to empty string to keep your theme's default `FloatBorder` highlight.
|
||||||
|
'';
|
||||||
|
};
|
||||||
zindex = mkOption {
|
zindex = mkOption {
|
||||||
description = "Stacking priority of the notification window";
|
description = "Stacking priority of the notification window";
|
||||||
type = int;
|
type = int;
|
||||||
|
|
@ -497,25 +548,15 @@ in {
|
||||||
type = enum ["editor" "win"];
|
type = enum ["editor" "win"];
|
||||||
default = "editor";
|
default = "editor";
|
||||||
};
|
};
|
||||||
};
|
tabstop = mkOption {
|
||||||
};
|
type = int;
|
||||||
|
default = 8;
|
||||||
integration = {
|
description = "Width of each tab character in the notification window";
|
||||||
nvim-tree = {
|
|
||||||
enable = mkOption {
|
|
||||||
description = "Integrate with nvim-tree/nvim-tree.lua (if enabled)";
|
|
||||||
type = bool;
|
|
||||||
default =
|
|
||||||
if config.vim.filetree.nvimTree.enable
|
|
||||||
then true
|
|
||||||
else false;
|
|
||||||
};
|
};
|
||||||
};
|
avoid = mkOption {
|
||||||
xcodebuild-nvim = {
|
type = listOf str;
|
||||||
enable = mkOption {
|
default = [];
|
||||||
description = "Integrate with wojciech-kulik/xcodebuild.nvim (if enabled)";
|
description = "Filetypes the notification window should avoid";
|
||||||
type = bool;
|
|
||||||
default = true;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
@ -545,6 +586,46 @@ in {
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# removed, see below
|
||||||
|
integration = {
|
||||||
|
nvim-tree.enable = mkOption {
|
||||||
|
default = null;
|
||||||
|
visible = false;
|
||||||
|
};
|
||||||
|
xcodebuild-nvim.enable = mkOption {
|
||||||
|
default = null;
|
||||||
|
visible = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# this can't be done better, I tried
|
||||||
|
# mostly mostly caused by the deprecated options being inside a submodule
|
||||||
|
# try improving this if you don't care about your sanity
|
||||||
|
# ~ poz
|
||||||
|
config = {
|
||||||
|
assertions = let
|
||||||
|
inherit (config.vim.visuals.fidget-nvim.setupOpts) integration;
|
||||||
|
in [
|
||||||
|
{
|
||||||
|
assertion = integration.nvim-tree.enable == null;
|
||||||
|
message = ''
|
||||||
|
Option `vim.visuals.fidget-nvim.setupOpts.integration.nvim-tree.enable`
|
||||||
|
has been deprecated upstream. Use
|
||||||
|
`vim.visuals.fidget-nvim.setupOpts.notification.window.avoid = ["NvimTree"]` instead.
|
||||||
|
This is already set if `vim.filetree.nvimTree.enable == true`.
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
{
|
||||||
|
assertion = integration.xcodebuild-nvim.enable == null;
|
||||||
|
message = ''
|
||||||
|
Option `vim.visuals.fidget-nvim.setupOpts.integration.xcodebuild-nvim.enable`
|
||||||
|
has been deprecated upstream. Use
|
||||||
|
`vim.visuals.fidget-nvim.setupOpts.notification.window.avoid = ["TestExplorer"]` instead.
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue