This commit is contained in:
poz 2025-12-24 20:18:54 +03:00 committed by GitHub
commit 703ada6537
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 74 additions and 18 deletions

View file

@ -19,6 +19,8 @@ in {
"<leader>t" = "+NvimTree";
};
visuals.fidget-nvim.setupOpts.notification.window.avoid = ["NvimTree"];
lazy.plugins.nvim-tree-lua = {
package = "nvim-tree-lua";
setupModule = "nvim-tree";

View file

@ -20,10 +20,11 @@
defaultServers = ["hls"];
servers = {
# these are a haskell-tools wrapper over the actual lsp options `:help haskell-tools.lsp.ClientOpts`
# see https://github.com/mrcjkb/haskell-tools.nvim/blob/v6.2.0/lua/haskell-tools/lsp/init.lua#L131-L173
# for the real ones
hls = {
enable = false;
cmd = [(getExe' pkgs.haskellPackages.haskell-language-server "haskell-language-server-wrapper") "--lsp"];
filetypes = ["haskell" "lhaskell"];
on_attach =
mkLuaInline
/*
@ -43,17 +44,6 @@
vim.keymap.set('n', '<localleader>rq', ht.repl.quit, opts)
end
'';
root_dir =
mkLuaInline
/*
lua
*/
''
function(bufnr, on_dir)
local fname = vim.api.nvim_buf_get_name(bufnr)
on_dir(util.root_pattern('hie.yaml', 'stack.yaml', 'cabal.project', '*.cabal', 'package.yaml')(fname))
end
'';
settings = {
haskell = {
formattingProvider = "ormolu";

View file

@ -7,6 +7,7 @@
inherit (lib.options) mkEnableOption mkOption literalExpression;
inherit (lib.strings) toUpper;
inherit (lib.types) int float bool str enum listOf attrsOf oneOf nullOr submodule;
inherit (lib.trivial) warn;
inherit (lib.nvim.types) mkPluginSetupOption luaInline borderType;
inherit (lib.generators) mkLuaInline;
in {
@ -53,6 +54,16 @@ in {
end
'';
};
clear_on_detach = mkOption {
description = "Clear notification group when LSP server detaches";
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
'';
};
ignore = mkOption {
description = "Ignore LSP servers by name";
type = listOf str;
@ -417,6 +428,20 @@ in {
type = bool;
default = true;
};
align = mkOption {
description = "Indent messages longer than a single line";
type = enum ["message" "annote"];
default = "message";
};
reflow = mkOption {
description = ''
Reflow (wrap) messages wider than notification window
The various options determine how wrapping is handled mid-word.
'';
type = enum ["hard" "hyphenate" "ellipsis" "false"];
default = "false";
};
icon_separator = mkOption {
description = "Separator between group name and icon";
type = str;
@ -432,6 +457,16 @@ in {
type = str;
default = "Comment";
};
line_margin = mkOption {
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.
'';
type = int;
default = 1;
};
render_message = mkOption {
description = "How to render notification messages";
type = luaInline;
@ -462,6 +497,15 @@ in {
then config.vim.ui.borders.globalStyle
else "none";
};
border_hl = mkOption {
description = ''
Highlight group for notification window border
Set to empty string to keep your theme's default `FloatBorder` highlight.
'';
type = str;
default = "";
};
zindex = mkOption {
description = "Stacking priority of the notification window";
type = int;
@ -497,6 +541,16 @@ in {
type = enum ["editor" "win"];
default = "editor";
};
tabstop = mkOption {
description = "Width of each tab character in the notification window";
type = int;
default = 8;
};
avoid = mkOption {
description = "Filetypes the notification window should avoid";
type = listOf str;
default = [];
};
};
};
@ -505,17 +559,27 @@ in {
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;
default = false;
visible = false;
apply = warn ''
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`.
'';
};
};
xcodebuild-nvim = {
enable = mkOption {
description = "Integrate with wojciech-kulik/xcodebuild.nvim (if enabled)";
type = bool;
default = true;
default = false;
visible = false;
apply = warn ''
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.
'';
};
};
};