mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-11-11 16:05:30 +00:00
init feature fidget.nvim
This commit is contained in:
parent
812f1f3b06
commit
c559fbf028
6 changed files with 68 additions and 0 deletions
|
|
@ -28,6 +28,10 @@ with lib; {
|
|||
eolChar = mkDefault "↴";
|
||||
showCurrContext = mkDefault true;
|
||||
};
|
||||
|
||||
fidget-nvim = {
|
||||
enable = mkDefault true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -52,6 +52,12 @@ in {
|
|||
};
|
||||
};
|
||||
|
||||
fidget-nvim.enable = {
|
||||
type = types.bool;
|
||||
description = "a UI for nvim-lsp's progress handler";
|
||||
default = true;
|
||||
};
|
||||
|
||||
indentBlankline = {
|
||||
enable = mkOption {
|
||||
type = types.bool;
|
||||
|
|
@ -119,6 +125,11 @@ in {
|
|||
then "cellular-automaton"
|
||||
else null
|
||||
)
|
||||
(
|
||||
if cfg.fidget-nvim.enable
|
||||
then "fidget-nvim"
|
||||
else null
|
||||
)
|
||||
];
|
||||
|
||||
vim.luaConfigRC.visuals = nvim.dag.entryAnywhere ''
|
||||
|
|
@ -210,6 +221,35 @@ in {
|
|||
''
|
||||
else ""
|
||||
}
|
||||
${
|
||||
if cfg.fidget-nvim.enable
|
||||
then ''
|
||||
-- TODO: make those configurable
|
||||
require"fidget".setup{
|
||||
text = {
|
||||
spinner = "pipe", -- animation shown when tasks are ongoing
|
||||
done = "✔", -- character shown when all tasks are complete
|
||||
commenced = "Started", -- message shown when task starts
|
||||
completed = "Completed", -- message shown when task completes
|
||||
},
|
||||
align = {
|
||||
bottom = true, -- align fidgets along bottom edge of buffer
|
||||
right = true, -- align fidgets along right edge of buffer
|
||||
},
|
||||
timer = {
|
||||
spinner_rate = 125, -- frame rate of spinner animation, in ms
|
||||
fidget_decay = 2000, -- how long to keep around empty fidget, in ms
|
||||
task_decay = 1000, -- how long to keep around completed task, in ms
|
||||
},
|
||||
window = {
|
||||
relative = "win", -- where to anchor, either "win" or "editor"
|
||||
blend = 100, -- &winblend for the window
|
||||
zindex = nil, -- the zindex value for the window
|
||||
border = "none", -- style of border for the fidget window
|
||||
},
|
||||
''
|
||||
else ""
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue