nvim/lua/plugs/edit-plugs.lua

112 lines
2.6 KiB
Lua
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

return {
'vijaymarupudi/nvim-fzf', -- fzf
{
-- surround 和 wildfire 配合有神奇的效果
'tpope/vim-surround',
'gcmt/wildfire.vim',
-- 括号箭头
'yaocccc/nvim-hlchunk',
},
-- 多光标
{
'terryma/vim-multiple-cursors',
},
--格式整理
{
'junegunn/vim-easy-align',
config = function()
G.map({
{ "v", "ga", ":EasyAlign<CR>", { noremap = true } },
{ "v", "=", ":EasyAlign<CR>", { noremap = true } },
})
end
},
-- 注释插件neovim 0.12 内置 gc用 treesitter先注释测试
-- {
-- 'tpope/vim-commentary',
-- },
{
'github/copilot.vim', -- github copilot
event = "InsertEnter",
},
{
'windwp/nvim-autopairs',
event = "InsertEnter",
config = function()
require('nvim-autopairs').setup({
disable_filetype = { "vim" },
})
end
},
{
'kevinhwang91/nvim-ufo',
dependencies = {
'kevinhwang91/promise-async'
},
config = function()
vim.opt.foldcolumn = '0'
vim.opt.foldlevel = 99
vim.opt.foldlevelstart = 99
vim.opt.foldenable = true
require("ufo").setup({
provider_selector = function(bufnr, filetype, buftype)
return { 'treesitter', 'indent' }
end
})
end
},
{
-- hop
"phaazon/hop.nvim",
branch = "v2",
keys = {
"f", "F", "t", "T",
"<c-f>"
},
config = function()
require("hop").setup { keys = 'asdfghjkl;' }
local hop = require('hop')
local directions = require('hop.hint').HintDirection
G.map({
{ "n", "<c-f>", ":HopChar2MW<CR>", { noremap = true } },
{ "n", "f",
function()
hop.hint_char1({
direction = directions.AFTER_CURSOR,
current_line_only = true
})
end, { noremap = true }
},
{ "n", "F",
function()
hop.hint_char1({
direction = directions.BEFORE_CURSOR,
current_line_only = true
})
end, { noremap = true }
},
{ "n", "t",
function()
hop.hint_char1({
direction = directions.AFTER_CURSOR,
current_line_only = true,
hint_offset = -1
})
end, { noremap = true }
},
{ "n", "T",
function()
hop.hint_char1({
direction = directions.BEFORE_CURSOR,
current_line_only = true,
hint_offset = -1
})
end, { noremap = true }
},
})
end
}
}