feat(visuals): cinnamon smooth scrolling

This commit is contained in:
NotAShelf 2023-02-04 00:20:20 +03:00
commit 1ac4dd7d98
No known key found for this signature in database
GPG key ID: 5B5C8895F28445F1
7 changed files with 122 additions and 4 deletions

View file

@ -23,6 +23,7 @@
./git
./minimap
./dashboard
./notifications
];
pkgsModule = {config, ...}: {

View file

@ -0,0 +1,5 @@
_: {
imports = [
./nvim-notify.nix
];
}

View 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"];
};
}

View file

@ -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')
'';
};
}

View file

@ -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 ""
}
'';
};
}