feat(visuals): cinnamon smooth scrolling

This commit is contained in:
NotAShelf 2023-02-04 00:20:20 +03:00
parent e9bb4a3658
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

@ -48,6 +48,22 @@
"type": "github" "type": "github"
} }
}, },
"cinnamon-nvim": {
"flake": false,
"locked": {
"lastModified": 1670143364,
"narHash": "sha256-JglXQhoPgN9sQ3yuv0+VQxmKMvoQTu5lbGLSRaQkytI=",
"owner": "declancm",
"repo": "cinnamon.nvim",
"rev": "c406ffda3a0302f32c23b24ab756ea20467d6578",
"type": "github"
},
"original": {
"owner": "declancm",
"repo": "cinnamon.nvim",
"type": "github"
}
},
"cmp-buffer": { "cmp-buffer": {
"flake": false, "flake": false,
"locked": { "locked": {
@ -128,6 +144,22 @@
"type": "github" "type": "github"
} }
}, },
"codewindow-nvim": {
"flake": false,
"locked": {
"lastModified": 1674040274,
"narHash": "sha256-TBoMpFD5MQHZwv/6TxbMNrVp2m2ATw8hbD1mDzU4Nf8=",
"owner": "gorbit99",
"repo": "codewindow.nvim",
"rev": "94d84e1a15b94248f205b854e70cb95f0b615b38",
"type": "github"
},
"original": {
"owner": "gorbit99",
"repo": "codewindow.nvim",
"type": "github"
}
},
"crates-nvim": { "crates-nvim": {
"flake": false, "flake": false,
"locked": { "locked": {
@ -497,11 +529,11 @@
"nvim-cmp": { "nvim-cmp": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1674731450, "lastModified": 1675440540,
"narHash": "sha256-53ubj39XyXep+AyWMU7Vxs9uTvIVZkctl6/M9LLpock=", "narHash": "sha256-BgI0dR7ss+pClGIu3EWXV7r5mMpo6Xt3QMVAxeWm++E=",
"owner": "hrsh7th", "owner": "hrsh7th",
"repo": "nvim-cmp", "repo": "nvim-cmp",
"rev": "e7e2ef7031db8e0cfad7ad9916ec766ddd9dbb3b", "rev": "cfafe0a1ca8933f7b7968a287d39904156f2c57d",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -606,6 +638,22 @@
"type": "github" "type": "github"
} }
}, },
"nvim-notify": {
"flake": false,
"locked": {
"lastModified": 1674034105,
"narHash": "sha256-zPSlenKjuZ8Xygu/KuU9+bSf5uUjSDK9HOTWnpUk1jo=",
"owner": "rcarriga",
"repo": "nvim-notify",
"rev": "bdd647f61a05c9b8a57c83b78341a0690e9c29d7",
"type": "github"
},
"original": {
"owner": "rcarriga",
"repo": "nvim-notify",
"type": "github"
}
},
"nvim-tree-lua": { "nvim-tree-lua": {
"flake": false, "flake": false,
"locked": { "locked": {
@ -743,11 +791,13 @@
"alpha-nvim": "alpha-nvim", "alpha-nvim": "alpha-nvim",
"bufdelete-nvim": "bufdelete-nvim", "bufdelete-nvim": "bufdelete-nvim",
"catppuccin": "catppuccin", "catppuccin": "catppuccin",
"cinnamon-nvim": "cinnamon-nvim",
"cmp-buffer": "cmp-buffer", "cmp-buffer": "cmp-buffer",
"cmp-nvim-lsp": "cmp-nvim-lsp", "cmp-nvim-lsp": "cmp-nvim-lsp",
"cmp-path": "cmp-path", "cmp-path": "cmp-path",
"cmp-treesitter": "cmp-treesitter", "cmp-treesitter": "cmp-treesitter",
"cmp-vsnip": "cmp-vsnip", "cmp-vsnip": "cmp-vsnip",
"codewindow-nvim": "codewindow-nvim",
"crates-nvim": "crates-nvim", "crates-nvim": "crates-nvim",
"dashboard-nvim": "dashboard-nvim", "dashboard-nvim": "dashboard-nvim",
"flake-utils": "flake-utils", "flake-utils": "flake-utils",
@ -773,6 +823,7 @@
"nvim-lightbulb": "nvim-lightbulb", "nvim-lightbulb": "nvim-lightbulb",
"nvim-lspconfig": "nvim-lspconfig", "nvim-lspconfig": "nvim-lspconfig",
"nvim-neoclip": "nvim-neoclip", "nvim-neoclip": "nvim-neoclip",
"nvim-notify": "nvim-notify",
"nvim-tree-lua": "nvim-tree-lua", "nvim-tree-lua": "nvim-tree-lua",
"nvim-treesitter-context": "nvim-treesitter-context", "nvim-treesitter-context": "nvim-treesitter-context",
"nvim-ts-autotag": "nvim-ts-autotag", "nvim-ts-autotag": "nvim-ts-autotag",

View file

@ -63,6 +63,7 @@
enable = true; enable = true;
nvimWebDevicons.enable = true; nvimWebDevicons.enable = true;
scrollBar.enable = true; scrollBar.enable = true;
smoothScroll.enable = true;
lspkind.enable = true; lspkind.enable = true;
indentBlankline = { indentBlankline = {
enable = true; enable = true;
@ -120,11 +121,15 @@
vim.minimap = { vim.minimap = {
# FIXME: this plugin has a dependency that needs to be installed # FIXME: this plugin has a dependency that needs to be installed
minimap-vim.enable = false; minimap-vim.enable = false;
codewindow.enable = true;
}; };
vim.dashboard = { vim.dashboard = {
dashboard-nvim.enable = false; dashboard-nvim.enable = false;
alpha.enable = true; alpha.enable = true;
}; };
vim.notify = {
nvim-notify.enable = true;
};
}; };
}; };
@ -413,6 +418,11 @@
flake = false; flake = false;
}; };
cinnamon-nvim = {
url = "github:declancm/cinnamon.nvim";
flake = false;
};
indent-blankline = { indent-blankline = {
url = "github:lukas-reineke/indent-blankline.nvim"; url = "github:lukas-reineke/indent-blankline.nvim";
flake = false; flake = false;
@ -455,5 +465,16 @@
url = "github:wfxr/minimap.vim"; url = "github:wfxr/minimap.vim";
flake = false; flake = false;
}; };
codewindow-nvim = {
url = "github:gorbit99/codewindow.nvim";
flake = false;
};
# Notifications
nvim-notify = {
url = "github:rcarriga/nvim-notify";
flake = false;
};
}; };
} }

View file

@ -23,6 +23,7 @@
./git ./git
./minimap ./minimap
./dashboard ./dashboard
./notifications
]; ];
pkgsModule = {config, ...}: { 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 '' vim.luaConfigRC.telescope = nvim.dag.entryAnywhere ''
require("telescope").setup { local telescope = require('telescope')
telescope.setup {
defaults = { defaults = {
vimgrep_arguments = { vimgrep_arguments = {
"${pkgs.ripgrep}/bin/rg", "${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]"; description = "enable scrollbar [scrollbar.nvim]";
}; };
smoothScroll.enable = mkOption {
type = types.bool;
description = "enable smooth scrolling [cinnamon-nvim]";
};
cursorWordline = { cursorWordline = {
enable = mkOption { enable = mkOption {
type = types.bool; type = types.bool;
@ -98,6 +103,11 @@ in {
then "scrollbar-nvim" then "scrollbar-nvim"
else null else null
) )
(
if cfg.smoothScroll.enable
then "cinnamon-nvim"
else null
)
]; ];
vim.luaConfigRC.visuals = nvim.dag.entryAnywhere '' vim.luaConfigRC.visuals = nvim.dag.entryAnywhere ''
@ -154,6 +164,11 @@ in {
}" }"
else "" else ""
} }
${
if cfg.smoothScroll.enable
then "require('cinnamon').setup()"
else ""
}
''; '';
}; };
} }