File tree Expand file tree Collapse file tree 8 files changed +110
-17
lines changed
Expand file tree Collapse file tree 8 files changed +110
-17
lines changed Original file line number Diff line number Diff line change @@ -175,6 +175,7 @@ isMaximal: {
175175 icon-picker . enable = isMaximal ;
176176 surround . enable = isMaximal ;
177177 diffview-nvim . enable = true ;
178+ yanky-nvim . enable = false ;
178179 motion = {
179180 hop . enable = true ;
180181 leap . enable = true ;
Original file line number Diff line number Diff line change 44
55[ typst-preview.nvim ] : https://github.com/chomosuke/typst-preview.nvim
66[ render-markdown.nvim ] : https://github.com/MeanderingProgrammer/render-markdown.nvim
7+ [ yanky.nvim ] : https://github.com/gbprod/yanky.nvim
78
89- Add [ typst-preview.nvim] under
910 ` languages.typst.extensions.typst-preview-nvim ` .
3334
3435- Add [ ] ( #opt-vim.lsp.lightbulb.autocmd.enable ) for manually managing the
3536 previously managed lightbulb autocommand.
37+
3638 - A warning will occur if [ ] ( #opt-vim.lsp.lightbulb.autocmd.enable ) and
3739 ` vim.lsp.lightbulb.setupOpts.autocmd.enabled ` are both set at the same time.
3840 Pick only one.
3941
42+ - Add [ yanky.nvim] to available plugins, under ` vim.utility.yanky-nvim ` .
43+
4044[ amadaluzia] ( https://github.com/amadaluzia ) :
4145
4246[ haskell-tools.nvim ] : https://github.com/MrcJkb/haskell-tools.nvim
Original file line number Diff line number Diff line change 590590 flake = false ;
591591 } ;
592592
593+ plugin-yanky-nvim = {
594+ url = "github:gbprod/yanky.nvim" ;
595+ flake = false ;
596+ } ;
597+
593598 # Note-taking
594599 plugin-obsidian-nvim = {
595600 url = "github:epwalsh/obsidian.nvim" ;
640645 } ;
641646
642647 plugin-nvim-colorizer-lua = {
643- url = "github:NvChad /nvim-colorizer.lua" ;
648+ url = "github:catgoose /nvim-colorizer.lua" ;
644649 flake = false ;
645650 } ;
646651
Original file line number Diff line number Diff line change 11{
22 imports = [
3- ./outline
43 ./binds
54 ./ccc
5+ ./diffview
6+ ./fzf-lua
67 ./gestures
7- ./motion
8- ./new-file-template
9- ./telescope
108 ./icon-picker
119 ./images
10+ ./motion
11+ ./new-file-template
12+ ./outline
13+ ./preview
14+ ./surround
1215 ./telescope
13- ./diffview
1416 ./wakatime
15- ./surround
16- ./preview
17- ./fzf-lua
17+ ./yanky-nvim
1818 ] ;
1919}
Original file line number Diff line number Diff line change 1+ {
2+ config ,
3+ pkgs ,
4+ lib ,
5+ ...
6+ } : let
7+ inherit ( lib . modules ) mkIf ;
8+ inherit ( lib . lists ) optionals concatLists ;
9+ inherit ( lib . nvim . lua ) toLuaObject ;
10+ inherit ( lib . nvim . dag ) entryAnywhere ;
11+
12+ cfg = config . vim . utility . yanky-nvim ;
13+ usingSqlite = cfg . setupOpts . ring . storage == "sqlite" ;
14+ in {
15+ config = mkIf cfg . enable {
16+ vim = {
17+ # TODO: this could probably be lazyloaded. I'm not yet sure which event is
18+ # ideal, so it's loaded normally for now.
19+ startPlugins = concatLists [
20+ [ "yanky-nvim" ]
21+
22+ # If using the sqlite backend, sqlite-lua must be loaded
23+ # alongside yanky.
24+ ( optionals usingSqlite [ pkgs . vimPlugins . sqlite-lua ] )
25+ ] ;
26+
27+ pluginRC . yanky-nvim = entryAnywhere ''
28+ require("yanky").setup(${ toLuaObject cfg . setupOpts } );
29+ '' ;
30+ } ;
31+ } ;
32+ }
Original file line number Diff line number Diff line change 1+ {
2+ imports = [
3+ ./config.nix
4+ ./yanky-nvim.nix
5+ ] ;
6+ }
Original file line number Diff line number Diff line change 1+ { lib , ...} : let
2+ inherit ( lib . options ) mkEnableOption mkOption ;
3+ inherit ( lib . types ) enum ;
4+ in {
5+ options . vim . utility . yanky-nvim = {
6+ enable = mkEnableOption ''
7+ improved Yank and Put functionalities for Neovim [yanky-nvim]
8+ '' ;
9+
10+ setupOpts = {
11+ ring . storage = mkOption {
12+ type = enum [ "shada" "sqlite" "memory" ] ;
13+ default = "shada" ;
14+ example = "sqlite" ;
15+ description = ''
16+ storage mode for ring values.
17+
18+ - shada: this will save pesistantly using Neovim ShaDa feature.
19+ This means that history will be persisted between each session of Neovim.
20+ - memory: each Neovim instance will have his own history and it will be
21+ lost between sessions.
22+ - sqlite: more reliable than `shada`, requires `sqlite.lua` as a dependency.
23+ nvf will add this dependency to `PATH` automatically.
24+ '' ;
25+ } ;
26+ } ;
27+ } ;
28+ }
You can’t perform that action at this time.
0 commit comments