Nvim: initialize leap in lua script

This commit is contained in:
Robert Kmieć
2023-02-16 10:40:24 +01:00
parent f327679ca9
commit d1dbfe720d
4 changed files with 12 additions and 23 deletions

View File

@@ -1,20 +0,0 @@
local leap = require('leap')
leap.setup {
case_insensitive = true,
-- Leaving the appropriate list empty effectively disables "smart" mode,
-- and forces auto-jump to be on or off.
--safe_labels = { . . . },
--labels = { . . . },
-- These keys are captured directly by the plugin at runtime.
special_keys = {
repeat_search = '<enter>',
next_match = '<enter>',
prev_match = '<tab>',
next_group = '<space>',
prev_group = '<tab>',
eol = '<space>',
},
}
leap.set_default_keymaps()

View File

@@ -69,8 +69,8 @@ vim.opt.shortmess:remove('F')
vim.opt.signcolumn = "auto" vim.opt.signcolumn = "auto"
vim.opt.wildmode = "longest,list,full" vim.opt.wildmode = { "longest", "list", "full" }
vim.opt.completeopt = "menu,menuone,noselect" vim.opt.completeopt = { "menu", "menuone", "noselect" }
vim.opt.mouse = "" vim.opt.mouse = ""

View File

@@ -14,7 +14,6 @@ return {{
-- Files switch, jump and grep-like tools {{{ -- Files switch, jump and grep-like tools {{{
--"inside/vim-search-pulse", --"inside/vim-search-pulse",
"MunifTanjim/nui.nvim", "MunifTanjim/nui.nvim",
"ggandor/leap.nvim",
"nvim-lua/plenary.nvim", "nvim-lua/plenary.nvim",
"nvim-lua/popup.nvim", "nvim-lua/popup.nvim",
"wellle/targets.vim", "wellle/targets.vim",

View File

@@ -0,0 +1,10 @@
return {
'ggandor/leap.nvim',
config = function()
local leap = require('leap')
leap.add_default_mappings()
vim.cmd([[
autocmd ColorScheme * lua require('leap').init_highlight(true)
]])
end
}