mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-09-05 18:01:32 +00:00
feat(visuals): cinnamon smooth scrolling
This commit is contained in:
parent
e9bb4a3658
commit
1ac4dd7d98
7 changed files with 122 additions and 4 deletions
|
@ -23,6 +23,7 @@
|
|||
./git
|
||||
./minimap
|
||||
./dashboard
|
||||
./notifications
|
||||
];
|
||||
|
||||
pkgsModule = {config, ...}: {
|
||||
|
|
5
modules/notifications/default.nix
Normal file
5
modules/notifications/default.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
_: {
|
||||
imports = [
|
||||
./nvim-notify.nix
|
||||
];
|
||||
}
|
23
modules/notifications/nvim-notify.nix
Normal file
23
modules/notifications/nvim-notify.nix
Normal file
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
with builtins; let
|
||||
cfg = config.vim.notify.nvim-notify;
|
||||
in {
|
||||
options.vim.notify.nvim-notify = {
|
||||
enable = mkOption {
|
||||
type = types.bool;
|
||||
description = "Enable animated notifications";
|
||||
};
|
||||
};
|
||||
|
||||
config =
|
||||
mkIf cfg.enable
|
||||
{
|
||||
vim.startPlugins = ["nvim-notify"];
|
||||
};
|
||||
}
|
|
@ -54,7 +54,8 @@ in {
|
|||
);
|
||||
|
||||
vim.luaConfigRC.telescope = nvim.dag.entryAnywhere ''
|
||||
require("telescope").setup {
|
||||
local telescope = require('telescope')
|
||||
telescope.setup {
|
||||
defaults = {
|
||||
vimgrep_arguments = {
|
||||
"${pkgs.ripgrep}/bin/rg",
|
||||
|
@ -72,6 +73,7 @@ in {
|
|||
},
|
||||
}
|
||||
}
|
||||
telescope.load_extension('notify')
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
|
@ -29,6 +29,11 @@ in {
|
|||
description = "enable scrollbar [scrollbar.nvim]";
|
||||
};
|
||||
|
||||
smoothScroll.enable = mkOption {
|
||||
type = types.bool;
|
||||
description = "enable smooth scrolling [cinnamon-nvim]";
|
||||
};
|
||||
|
||||
cursorWordline = {
|
||||
enable = mkOption {
|
||||
type = types.bool;
|
||||
|
@ -98,6 +103,11 @@ in {
|
|||
then "scrollbar-nvim"
|
||||
else null
|
||||
)
|
||||
(
|
||||
if cfg.smoothScroll.enable
|
||||
then "cinnamon-nvim"
|
||||
else null
|
||||
)
|
||||
];
|
||||
|
||||
vim.luaConfigRC.visuals = nvim.dag.entryAnywhere ''
|
||||
|
@ -154,6 +164,11 @@ in {
|
|||
}"
|
||||
else ""
|
||||
}
|
||||
${
|
||||
if cfg.smoothScroll.enable
|
||||
then "require('cinnamon').setup()"
|
||||
else ""
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue