diff --git a/modules/coding/editor/neovim/nvim/lua/plugins/plugins-setup.lua b/modules/coding/editor/neovim/nvim/lua/plugins/plugins-setup.lua index cd0a97c..da35ab1 100644 --- a/modules/coding/editor/neovim/nvim/lua/plugins/plugins-setup.lua +++ b/modules/coding/editor/neovim/nvim/lua/plugins/plugins-setup.lua @@ -179,6 +179,23 @@ local plugins = { require("telescope").setup(require("plugins.telescope")) end, }, + { + "ggandor/leap.nvim", + dependencies = { "tpope/vim-repeat" }, + config = function() + require("leap").set_default_mappings() + -- Exclude whitespace and the middle of alphabetic words from preview: + -- foobar[baaz] = quux + -- ^----^^^--^^-^-^--^ + require('leap').opts.preview_filter = function(ch0, ch1, ch2) + return not ( + ch1:match('%s') or + ch0:match('%a') and ch1:match('%a') and ch2:match('%a') + ) + end + require('leap.user').set_repeat_keys('', '') + end + }, { "alexghergh/nvim-tmux-navigation", event = "VeryLazy", @@ -189,6 +206,7 @@ local plugins = { { "MeanderingProgrammer/render-markdown.nvim", dependencies = { "nvim-treesitter/nvim-treesitter", "nvim-tree/nvim-web-devicons" }, + event = "BufEnter *.md", opts = {}, }, {