mirror of
https://github.com/NotAShelf/nvf.git
synced 2024-11-22 13:20:44 +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
57
flake.lock
57
flake.lock
|
@ -48,6 +48,22 @@
|
|||
"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": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
|
@ -128,6 +144,22 @@
|
|||
"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": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
|
@ -497,11 +529,11 @@
|
|||
"nvim-cmp": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1674731450,
|
||||
"narHash": "sha256-53ubj39XyXep+AyWMU7Vxs9uTvIVZkctl6/M9LLpock=",
|
||||
"lastModified": 1675440540,
|
||||
"narHash": "sha256-BgI0dR7ss+pClGIu3EWXV7r5mMpo6Xt3QMVAxeWm++E=",
|
||||
"owner": "hrsh7th",
|
||||
"repo": "nvim-cmp",
|
||||
"rev": "e7e2ef7031db8e0cfad7ad9916ec766ddd9dbb3b",
|
||||
"rev": "cfafe0a1ca8933f7b7968a287d39904156f2c57d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -606,6 +638,22 @@
|
|||
"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": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
|
@ -743,11 +791,13 @@
|
|||
"alpha-nvim": "alpha-nvim",
|
||||
"bufdelete-nvim": "bufdelete-nvim",
|
||||
"catppuccin": "catppuccin",
|
||||
"cinnamon-nvim": "cinnamon-nvim",
|
||||
"cmp-buffer": "cmp-buffer",
|
||||
"cmp-nvim-lsp": "cmp-nvim-lsp",
|
||||
"cmp-path": "cmp-path",
|
||||
"cmp-treesitter": "cmp-treesitter",
|
||||
"cmp-vsnip": "cmp-vsnip",
|
||||
"codewindow-nvim": "codewindow-nvim",
|
||||
"crates-nvim": "crates-nvim",
|
||||
"dashboard-nvim": "dashboard-nvim",
|
||||
"flake-utils": "flake-utils",
|
||||
|
@ -773,6 +823,7 @@
|
|||
"nvim-lightbulb": "nvim-lightbulb",
|
||||
"nvim-lspconfig": "nvim-lspconfig",
|
||||
"nvim-neoclip": "nvim-neoclip",
|
||||
"nvim-notify": "nvim-notify",
|
||||
"nvim-tree-lua": "nvim-tree-lua",
|
||||
"nvim-treesitter-context": "nvim-treesitter-context",
|
||||
"nvim-ts-autotag": "nvim-ts-autotag",
|
||||
|
|
21
flake.nix
21
flake.nix
|
@ -63,6 +63,7 @@
|
|||
enable = true;
|
||||
nvimWebDevicons.enable = true;
|
||||
scrollBar.enable = true;
|
||||
smoothScroll.enable = true;
|
||||
lspkind.enable = true;
|
||||
indentBlankline = {
|
||||
enable = true;
|
||||
|
@ -120,11 +121,15 @@
|
|||
vim.minimap = {
|
||||
# FIXME: this plugin has a dependency that needs to be installed
|
||||
minimap-vim.enable = false;
|
||||
codewindow.enable = true;
|
||||
};
|
||||
vim.dashboard = {
|
||||
dashboard-nvim.enable = false;
|
||||
alpha.enable = true;
|
||||
};
|
||||
vim.notify = {
|
||||
nvim-notify.enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -413,6 +418,11 @@
|
|||
flake = false;
|
||||
};
|
||||
|
||||
cinnamon-nvim = {
|
||||
url = "github:declancm/cinnamon.nvim";
|
||||
flake = false;
|
||||
};
|
||||
|
||||
indent-blankline = {
|
||||
url = "github:lukas-reineke/indent-blankline.nvim";
|
||||
flake = false;
|
||||
|
@ -455,5 +465,16 @@
|
|||
url = "github:wfxr/minimap.vim";
|
||||
flake = false;
|
||||
};
|
||||
|
||||
codewindow-nvim = {
|
||||
url = "github:gorbit99/codewindow.nvim";
|
||||
flake = false;
|
||||
};
|
||||
|
||||
# Notifications
|
||||
nvim-notify = {
|
||||
url = "github:rcarriga/nvim-notify";
|
||||
flake = false;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -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…
Reference in a new issue