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", { noremap = true } }, { "v", "=", ":EasyAlign", { noremap = true } }, }) end }, -- 注释插件:Neovim 0.12 内置 treesitter gc/gcc 注释切换,暂注释掉此插件测试 -- { -- 'tpope/vim-commentary', -- }, { '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 快速跳转:用 f/F/t/T 做行内单字符跳转, 做双字符跳转 -- 注意:这会覆盖 Vim 原生的 f/F/t/T "phaazon/hop.nvim", branch = "v2", keys = { "f", "F", "t", "T", "" }, config = function() require("hop").setup { keys = 'asdfghjkl;' } local hop = require('hop') local directions = require('hop.hint').HintDirection G.map({ { "n", "", ":HopChar2MW", { 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 } }