nvim/lua/plugs/edit-plugs.lua

108 lines
2.3 KiB
Lua
Raw Normal View History

2023-10-08 23:27:05 +08:00
return {
2024-01-20 00:48:15 +08:00
'vijaymarupudi/nvim-fzf', -- fzf
2023-10-08 23:27:05 +08:00
{
-- surround 和 wildfire 配合有神奇的效果
'tpope/vim-surround',
'gcmt/wildfire.vim',
2023-11-18 23:21:18 +08:00
2023-11-24 12:59:48 +08:00
-- 括号箭头
'yaocccc/nvim-hlchunk',
},
-- 多光标
{
2023-11-18 23:21:18 +08:00
'terryma/vim-multiple-cursors',
2023-10-08 23:27:05 +08:00
},
{
2023-12-15 12:15:39 +08:00
--格式整理
2023-10-08 23:27:05 +08:00
{
2023-11-24 12:59:48 +08:00
'junegunn/vim-easy-align',
2023-12-15 12:15:39 +08:00
config = function()
G.map({
{ "v", "ga", ":EasyAlign<CR>", { noremap = true } },
})
end
2023-10-08 23:27:05 +08:00
},
2023-10-09 16:14:40 +08:00
},
{
2023-11-24 12:59:48 +08:00
-- 注释插件
{
2023-11-19 07:56:01 +08:00
'tpope/vim-commentary',
2023-11-24 12:59:48 +08:00
}
2023-10-10 18:14:47 +08:00
},
2023-11-26 18:15:09 +08:00
{
2023-12-15 12:15:39 +08:00
'github/copilot.vim', -- github copilot
2023-11-27 18:11:11 +08:00
},
{
2023-11-27 23:08:28 +08:00
'windwp/nvim-autopairs',
event = "InsertEnter",
2023-12-15 12:15:39 +08:00
opts = {}, -- this is equalent to setup({}) function
config = function()
2023-11-27 23:08:28 +08:00
require('nvim-autopairs').setup({
disable_filetype = { "vim" },
})
end
},
2023-12-16 12:07:36 +08:00
-- {
-- "askfiy/nvim-picgo",
-- config = function()
-- G.map({
-- { 'n', '<leader>pp', ':UploadClipboard<CR>' }
-- })
-- require("nvim-picgo").setup()
-- end
-- },
2023-12-15 12:15:39 +08:00
{
2024-01-16 20:16:19 +08:00
-- hop
2024-01-20 00:48:15 +08:00
"phaazon/hop.nvim",
branch = "v2",
keys = {
"f", "F", "t", "T",
"<c-f>"
},
lazy = true,
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
2023-12-10 12:16:25 +08:00
}
2023-10-08 23:27:05 +08:00
}