mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-09-06 02:11:33 +00:00
utility/yanky-nvim: init
This commit is contained in:
parent
4242640c98
commit
0fbcf1ca6f
8 changed files with 102 additions and 9 deletions
32
modules/plugins/utility/yanky-nvim/config.nix
Normal file
32
modules/plugins/utility/yanky-nvim/config.nix
Normal file
|
@ -0,0 +1,32 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (lib.lists) optionals concatLists;
|
||||
inherit (lib.nvim.lua) toLuaObject;
|
||||
inherit (lib.nvim.dag) entryAnywhere;
|
||||
|
||||
cfg = config.vim.utility.yanky-nvim;
|
||||
usingSqlite = cfg.setupOpts.ring.storage == "sqlite";
|
||||
in {
|
||||
config = mkIf cfg.enable {
|
||||
vim = {
|
||||
# TODO: this could probably be lazyloaded. I'm not yet sure which event is
|
||||
# ideal, so it's loaded normally for now.
|
||||
startPlugins = concatLists [
|
||||
["yanky-nvim"]
|
||||
|
||||
# If using the sqlite backend, sqlite-lua must be loaded
|
||||
# alongside yanky.
|
||||
(optionals usingSqlite [pkgs.vimPlugins.sqlite-lua])
|
||||
];
|
||||
|
||||
pluginRC.yanky-nvim = entryAnywhere ''
|
||||
require("yanky").setup(${toLuaObject cfg.setupOpts});
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue