From 48524be17d66c06a0d90c471316f11ca17ed2487 Mon Sep 17 00:00:00 2001 From: lew Date: Mon, 3 Nov 2025 12:41:44 +0000 Subject: [PATCH] Update .config/nvim/lazy-lock.json Update .config/nvim/lua/plugin/00_colorscheme.lua Update .config/nvim/lua/plugin/10_hop.lua Update .config/nvim/lua/plugin/20_completion.lua Add .config/nvim/lua/plugin/35_yanky.lua --- private_dot_config/nvim/lazy-lock.json | 5 +- .../nvim/lua/plugin/00_colorscheme.lua | 6 ++ private_dot_config/nvim/lua/plugin/10_hop.lua | 13 +++-- .../nvim/lua/plugin/20_completion.lua | 57 ++++++++++++------- .../nvim/lua/plugin/35_yanky.lua | 21 +++++++ 5 files changed, 77 insertions(+), 25 deletions(-) create mode 100644 private_dot_config/nvim/lua/plugin/35_yanky.lua diff --git a/private_dot_config/nvim/lazy-lock.json b/private_dot_config/nvim/lazy-lock.json index 1b298e6..26474fe 100644 --- a/private_dot_config/nvim/lazy-lock.json +++ b/private_dot_config/nvim/lazy-lock.json @@ -1,6 +1,7 @@ { "blink.cmp": { "branch": "main", "commit": "327fff91fe6af358e990be7be1ec8b78037d2138" }, "conform.nvim": { "branch": "master", "commit": "02736cf359a3235c6d7d601a2f6bdc909e557513" }, + "flash.nvim": { "branch": "main", "commit": "fcea7ff883235d9024dc41e638f164a450c14ca2" }, "friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" }, "fzf-lua": { "branch": "main", "commit": "a8458b79a957a6e3e217d84106a0fd4b9470ff4c" }, "gitsigns.nvim": { "branch": "main", "commit": "20ad4419564d6e22b189f6738116b38871082332" }, @@ -13,6 +14,7 @@ "mini.icons": { "branch": "main", "commit": "284798619aed9f4c1ac1b9417b9a5e3b4b85ef3a" }, "mini.pairs": { "branch": "main", "commit": "b9aada8c0e59f2b938e98fbf4eae0799eba96ad9" }, "mini.snippets": { "branch": "main", "commit": "7610dc3aaf7fb09b9cc428273a8ba15ef8aef495" }, + "neoscroll.nvim": { "branch": "master", "commit": "f957373912e88579e26fdaea4735450ff2ef5c9c" }, "nvim-colorizer.lua": { "branch": "master", "commit": "81e676d3203c9eb6e4c0ccf1eba1679296ef923f" }, "nvim-lspconfig": { "branch": "master", "commit": "a89bfcfd0e44f898341ac8a80ba83ccf6218bef3" }, "nvim-scissors": { "branch": "main", "commit": "9b4fc66427568b2139480fcc645dd7bb91884ade" }, @@ -20,5 +22,6 @@ "nvim-treesitter-context": { "branch": "master", "commit": "ec308c7827b5f8cb2dd0ad303a059c945dd21969" }, "trouble.nvim": { "branch": "main", "commit": "bd67efe408d4816e25e8491cc5ad4088e708a69a" }, "vim-sleuth": { "branch": "master", "commit": "be69bff86754b1aa5adcbb527d7fcd1635a84080" }, - "which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" } + "which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" }, + "yanky.nvim": { "branch": "main", "commit": "04775cc6e10ef038c397c407bc17f00a2f52b378" } } diff --git a/private_dot_config/nvim/lua/plugin/00_colorscheme.lua b/private_dot_config/nvim/lua/plugin/00_colorscheme.lua index 98644bd..e0229fd 100644 --- a/private_dot_config/nvim/lua/plugin/00_colorscheme.lua +++ b/private_dot_config/nvim/lua/plugin/00_colorscheme.lua @@ -11,4 +11,10 @@ return { event = "BufReadPre", opts = {}, }, + { + "karb94/neoscroll.nvim", + opts = { + duration_multiplier = 0.3, + }, + }, } diff --git a/private_dot_config/nvim/lua/plugin/10_hop.lua b/private_dot_config/nvim/lua/plugin/10_hop.lua index 0a5b3af..6a94c80 100644 --- a/private_dot_config/nvim/lua/plugin/10_hop.lua +++ b/private_dot_config/nvim/lua/plugin/10_hop.lua @@ -1,12 +1,17 @@ return { { - 'smoka7/hop.nvim', + "smoka7/hop.nvim", version = "*", opts = { - keys = 'etovxqpdygfblzhckisuran' + keys = "etovxqpdygfblzhckisuran", }, + -- stylua: ignore keys = { - { "gw", "HopWord", mode = { "n", "x" }, desc = "Hop to word" }, + { "gw", "HopWordMW", mode = { "n", "x", "o" }, desc = "hop to word" }, + { "gc", "HopChar1MW", mode = { "n", "x", "o" }, desc = "hop to char" }, + { "gl", "HopLineStartMW", mode = { "n", "x", "o" }, desc = "hop to word" }, + { "gn", "HopNodes", mode = { "n", "x", "o" }, desc = "hop nodes" }, + { "gp", "HopPatternMW", mode = { "n", "x", "o" }, desc = "hop to pattern" }, }, - } + }, } diff --git a/private_dot_config/nvim/lua/plugin/20_completion.lua b/private_dot_config/nvim/lua/plugin/20_completion.lua index 7f5d1de..04ff765 100644 --- a/private_dot_config/nvim/lua/plugin/20_completion.lua +++ b/private_dot_config/nvim/lua/plugin/20_completion.lua @@ -1,37 +1,54 @@ return { - { 'nvim-mini/mini.pairs', opts = {} }, + { "nvim-mini/mini.pairs", opts = {} }, { - 'saghen/blink.cmp', - dependencies = { 'rafamadriz/friendly-snippets' }, - version = '1.*', + "saghen/blink.cmp", + dependencies = { "rafamadriz/friendly-snippets" }, + version = "1.*", opts = { - keymap = { preset = 'super-tab' }, - appearance = { nerd_font_variant = 'mono' }, - completion = { documentation = { auto_show = true, auto_show_delay_ms = 0 } }, - sources = { default = { 'lsp', 'path', 'snippets', 'buffer' } }, + keymap = { preset = "super-tab" }, + appearance = { nerd_font_variant = "mono" }, + completion = { + documentation = { auto_show = true, auto_show_delay_ms = 0 }, + }, + sources = { default = { "lsp", "path", "snippets", "buffer" } }, fuzzy = { implementation = "prefer_rust_with_warning" }, + cmdline = { + keymap = { preset = "inherit" }, + completion = { menu = { auto_show = true } }, + }, }, - opts_extend = { "sources.default"} + opts_extend = { "sources.default" }, }, { - 'nvim-mini/mini.snippets', + "nvim-mini/mini.snippets", opts = function() - local gen_loader = require('mini.snippets').gen_loader + local gen_loader = require("mini.snippets").gen_loader return { snippets = { - gen_loader.from_file(vim.fn.stdpath("config") .. "/snippets/global.json"), - gen_loader.from_lang() - } + gen_loader.from_file( + vim.fn.stdpath("config") .. "/snippets/global.json" + ), + gen_loader.from_lang(), + }, } - end + end, }, { - 'chrisgrieser/nvim-scissors', + "chrisgrieser/nvim-scissors", opts = { snippetDir = vim.fn.stdpath("config") .. "/snippets" }, keys = { - { "sa", "ScissorsAddNewSnippet", mode = { "n", "x" }, desc = "Save selection as snippet" }, - { "se", "ScissorsEditSnippet", mode = { "n", "x" }, desc = "Edit existing snippet" }, + { + "sa", + "ScissorsAddNewSnippet", + mode = { "n", "x" }, + desc = "Save selection as snippet", + }, + { + "se", + "ScissorsEditSnippet", + mode = { "n", "x" }, + desc = "Edit existing snippet", + }, }, - } + }, } - diff --git a/private_dot_config/nvim/lua/plugin/35_yanky.lua b/private_dot_config/nvim/lua/plugin/35_yanky.lua new file mode 100644 index 0000000..1e118c7 --- /dev/null +++ b/private_dot_config/nvim/lua/plugin/35_yanky.lua @@ -0,0 +1,21 @@ +return { + { + "gbprod/yanky.nvim", + keys = { + { "y", "(YankyYank)" }, + { "p", "(YankyPutAfter)", mode = { "n", "x" } }, + { "P", "(YankyPutBefore)", mode = { "n", "x" } }, + { "[p", "(YankyPutIndentBeforeLinewise)", mode = "n" }, + { "]p", "(YankyPutIndentAfterLinewise)", mode = "n" }, + { ">p", "(YankyPutIndentAfterShiftRight)", mode = "n" }, + { ">P", "(YankyPutIndentBeforeShiftRight)", mode = "n" }, + { "(YankyPutIndentAfterShiftLeft)", mode = "n" }, + { "(YankyPutIndentBeforeShiftLeft)", mode = "n" }, + { "", "(YankyPreviousEntry)", mode = "n" }, + { "", "(YankyNextEntry)", mode = "n" }, + }, + opts = { + preserve_cursor_position = { enabled = true }, + }, + }, +}