Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

visuals/fidget: migrate to new configuration #211

Merged
merged 6 commits into from
Feb 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion docs/release-notes/rl-0.6.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ Release notes for release 0.6

- Added rose-pine theme

[frothymarrow](https://github.com/frothymarrow)
[frothymarrow](https://github.com/frothymarrow):

- Added option `vim.luaPackages` to wrap neovim with extra Lua packages.

- Rewrote the entire `fidget.nvim` module to include extensive configuration options. Option `vim.fidget-nvim.align.bottom` has
been removed in favor of [vim.fidget-nvim.notification.window.align](vim.fidget-nvim.notification.window.align), which now supports
`top` and `bottom` values. `vim.fidget-nvim.align.right` has no longer any equivalent and also has been removed.
7 changes: 3 additions & 4 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@
};

fidget-nvim = {
url = "github:j-hui/fidget.nvim?ref=legacy";
url = "github:j-hui/fidget.nvim";
flake = false;
};

Expand Down
17 changes: 1 addition & 16 deletions modules/visuals/config.nix
Original file line number Diff line number Diff line change
Expand Up @@ -113,24 +113,9 @@ in {
'';
})

(mkIf cfg.fidget-nvim.enable {
vim.startPlugins = ["fidget-nvim"];
vim.luaConfigRC.fidget-nvim = nvim.dag.entryAnywhere ''
require"fidget".setup{
align = {
bottom = ${boolToString cfg.fidget-nvim.align.bottom},
right = ${boolToString cfg.fidget-nvim.align.right},
},
window = {
blend = 0,
},
}
'';
})

(mkIf cfg.highlight-undo.enable {
vim.startPlugins = ["highlight-undo"];
vim.luaConfigRC.fidget-nvim = nvim.dag.entryAnywhere ''
vim.luaConfigRC.highlight-undo = nvim.dag.entryAnywhere ''
require('highlight-undo').setup({
duration = ${toString cfg.highlight-undo.duration},
highlight_for_count = ${boolToString cfg.highlight-undo.highlightForCount},
Expand Down
1 change: 1 addition & 0 deletions modules/visuals/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
imports = [
./config.nix
./visuals.nix
./fidget
];
}
16 changes: 16 additions & 0 deletions modules/visuals/fidget/config.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
config,
lib,
...
}: let
inherit (lib) mkIf nvim;
cfg = config.vim.visuals.fidget-nvim;
in {
config = mkIf cfg.enable {
vim.startPlugins = ["fidget-nvim"];

vim.luaConfigRC.fidget-nvim = nvim.dag.entryAnywhere ''
require'fidget'.setup(${nvim.lua.toLuaObject cfg.setupOpts})
'';
};
}
6 changes: 6 additions & 0 deletions modules/visuals/fidget/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
imports = [
./config.nix
./fidget.nix
];
}
Loading
Loading