replace hop with leap
This commit is contained in:
parent
e22a0b7248
commit
4baccf1f8b
|
@ -58,43 +58,4 @@ for type, icon in pairs(signs) do
|
||||||
vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = hl })
|
vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = hl })
|
||||||
end
|
end
|
||||||
|
|
||||||
-- null-ls
|
|
||||||
-- @see: https://github.com/jay-babu/mason-null-ls.nvim
|
|
||||||
-- might want to just use mason-null-ls. not yet sure what the advantage is.
|
|
||||||
local null_ls = require("null-ls")
|
|
||||||
null_ls.setup({
|
|
||||||
sources = {
|
|
||||||
null_ls.builtins.formatting.prettierd,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
-- nvim-autopairs + nvim-cmp
|
|
||||||
local cmp_autopairs = require('nvim-autopairs.completion.cmp')
|
|
||||||
local cmp = require('cmp')
|
|
||||||
cmp.event:on(
|
|
||||||
'confirm_done',
|
|
||||||
cmp_autopairs.on_confirm_done()
|
|
||||||
)
|
|
||||||
|
|
||||||
-- neogen
|
|
||||||
vim.keymap.set('n', '<leader>nf', ":Neogen func<CR>", { noremap = true, desc = '[D]ocument [F]unction' })
|
|
||||||
|
|
||||||
-- hop
|
|
||||||
local hop = require('hop')
|
|
||||||
local directions = require('hop.hint').HintDirection
|
|
||||||
|
|
||||||
vim.keymap.set(
|
|
||||||
'',
|
|
||||||
'<leader>h',
|
|
||||||
function() hop.hint_char1({ direction = directions.AFTER_CURSOR }) end,
|
|
||||||
{ remap = true, desc = '[H]opChar1 forwards' }
|
|
||||||
)
|
|
||||||
|
|
||||||
vim.keymap.set(
|
|
||||||
'',
|
|
||||||
'<leader>H',
|
|
||||||
function() hop.hint_char1({ direction = directions.BEFORE_CURSOR }) end,
|
|
||||||
{ remap = true, desc = '[H]opChar1 backwards' }
|
|
||||||
)
|
|
||||||
|
|
||||||
-- vim: ts=2 sts=2 sw=2 et
|
-- vim: ts=2 sts=2 sw=2 et
|
||||||
|
|
2
init.lua
2
init.lua
|
@ -171,7 +171,7 @@ require('lazy').setup({
|
||||||
-- NOTE: Next Step on Your Neovim Journey: Add/Configure additional "plugins" for kickstart
|
-- NOTE: Next Step on Your Neovim Journey: Add/Configure additional "plugins" for kickstart
|
||||||
-- These are some example plugins that I've included in the kickstart repository.
|
-- These are some example plugins that I've included in the kickstart repository.
|
||||||
-- Uncomment any of the lines below to enable them.
|
-- Uncomment any of the lines below to enable them.
|
||||||
require 'kickstart.plugins.autoformat',
|
-- require 'kickstart.plugins.autoformat',
|
||||||
-- require 'kickstart.plugins.debug',
|
-- require 'kickstart.plugins.debug',
|
||||||
|
|
||||||
-- NOTE: The import below automatically adds your own plugins, configuration, etc from `lua/custom/plugins/*.lua`
|
-- NOTE: The import below automatically adds your own plugins, configuration, etc from `lua/custom/plugins/*.lua`
|
||||||
|
|
|
@ -14,13 +14,43 @@ return {
|
||||||
{
|
{
|
||||||
"danymat/neogen",
|
"danymat/neogen",
|
||||||
dependencies = "nvim-treesitter/nvim-treesitter",
|
dependencies = "nvim-treesitter/nvim-treesitter",
|
||||||
config = true,
|
config = function()
|
||||||
|
require('neogen').setup {}
|
||||||
|
vim.keymap.set('n', '<leader>nf', ":Neogen func<CR>", { noremap = true, desc = '[D]ocument [F]unction' })
|
||||||
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
'ggandor/leap.nvim',
|
||||||
|
dependencies = { "tpope/vim-repeat" },
|
||||||
|
config = function()
|
||||||
|
require('leap').add_default_mappings()
|
||||||
|
end
|
||||||
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
'phaazon/hop.nvim',
|
'phaazon/hop.nvim',
|
||||||
|
cond = false,
|
||||||
branch = 'v2',
|
branch = 'v2',
|
||||||
config = function()
|
config = function()
|
||||||
require 'hop'.setup {}
|
local hop = require('hop')
|
||||||
|
local directions = require('hop.hint').HintDirection
|
||||||
|
|
||||||
|
hop.setup {}
|
||||||
|
|
||||||
|
vim.keymap.set(
|
||||||
|
'',
|
||||||
|
'<leader>h',
|
||||||
|
function() hop.hint_char1({ direction = directions.AFTER_CURSOR }) end,
|
||||||
|
{ remap = true, desc = '[H]opChar1 forwards' }
|
||||||
|
)
|
||||||
|
|
||||||
|
vim.keymap.set(
|
||||||
|
'',
|
||||||
|
'<leader>H',
|
||||||
|
function() hop.hint_char1({ direction = directions.BEFORE_CURSOR }) end,
|
||||||
|
{ remap = true, desc = '[H]opChar1 backwards' }
|
||||||
|
)
|
||||||
end
|
end
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -29,6 +59,13 @@ return {
|
||||||
lazy = true,
|
lazy = true,
|
||||||
config = function()
|
config = function()
|
||||||
require("nvim-autopairs").setup {}
|
require("nvim-autopairs").setup {}
|
||||||
|
|
||||||
|
local cmp_autopairs = require('nvim-autopairs.completion.cmp')
|
||||||
|
local cmp = require('cmp')
|
||||||
|
cmp.event:on(
|
||||||
|
'confirm_done',
|
||||||
|
cmp_autopairs.on_confirm_done()
|
||||||
|
)
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -41,5 +78,15 @@ return {
|
||||||
"jose-elias-alvarez/null-ls.nvim",
|
"jose-elias-alvarez/null-ls.nvim",
|
||||||
lazy = true,
|
lazy = true,
|
||||||
dependencies = { "nvim-lua/plenary.nvim" },
|
dependencies = { "nvim-lua/plenary.nvim" },
|
||||||
|
config = function()
|
||||||
|
-- @see: https://github.com/jay-babu/mason-null-ls.nvim
|
||||||
|
-- might want to just use mason-null-ls. not yet sure what the advantage is.
|
||||||
|
local null_ls = require("null-ls")
|
||||||
|
null_ls.setup({
|
||||||
|
sources = {
|
||||||
|
null_ls.builtins.formatting.prettierd,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue