1
0
Files
dotfiles/nvim/.config/nvim/lua/plugins/basic.lua
2025-02-18 20:50:08 +01:00

89 lines
1.7 KiB
Lua

return {
-- keymap helper
{ "folke/which-key.nvim", opts = {} },
{ -- undo tree
"mbbill/undotree",
opts = {},
keys = {
{ "<Leader>u", vim.cmd.UndotreeToggle, desc = "Toggle undo tree" },
},
},
{ -- minimal and fast autopairs
"echasnovski/mini.pairs",
event = "VeryLazy",
opts = {
modes = { insert = true, command = true, terminal = false },
-- skip autopair when next character is one of these
skip_next = [=[[%w%%%'%[%"%.%`%$]]=],
-- skip autopair when the cursor is inside these treesitter nodes
skip_ts = { "string" },
-- skip autopair when next character is closing pair
-- and there are more closing pairs than opening pairs
skip_unbalanced = true,
-- better deal with markdown code blocks
markdown = true,
},
},
{ -- fugitive
"tpope/vim-fugitive",
keys = {
{ "<Leader>gs", vim.cmd.Git, desc = "Fugitive git command" },
},
},
{
"echasnovski/mini.surround",
version = false,
config = function()
require("mini.surround").setup()
end,
},
{
"folke/flash.nvim",
event = "VeryLazy",
---@type Flash.Config
opts = {},
keys = {
{
"zk",
mode = { "n", "x", "o" },
function()
require("flash").jump()
end,
desc = "Flash",
},
{
"Zk",
mode = { "n", "x", "o" },
function()
require("flash").treesitter()
end,
desc = "Flash Treesitter",
},
{
"r",
mode = "o",
function()
require("flash").remote()
end,
desc = "Remote Flash",
},
{
"R",
mode = { "o", "x" },
function()
require("flash").treesitter_search()
end,
desc = "Treesitter Search",
},
{
"<c-s>",
mode = { "c" },
function()
require("flash").toggle()
end,
desc = "Toggle Flash Search",
},
},
},
}