58 lines
1.4 KiB
Lua
58 lines
1.4 KiB
Lua
-- ============================================================================
|
|
-- Editor Enhancements - Comment, Surround, etc.
|
|
-- ============================================================================
|
|
|
|
return {
|
|
-- Comment.nvim - gc zum Kommentieren
|
|
{
|
|
'numToStr/Comment.nvim',
|
|
event = 'VeryLazy',
|
|
config = function()
|
|
require('Comment').setup({
|
|
-- LHS of toggle mappings in NORMAL mode
|
|
toggler = {
|
|
line = 'gcc', -- Line-comment toggle
|
|
block = 'gbc', -- Block-comment toggle
|
|
},
|
|
-- LHS of operator-pending mappings in NORMAL and VISUAL mode
|
|
opleader = {
|
|
line = 'gc', -- Line-comment operator
|
|
block = 'gb', -- Block-comment operator
|
|
},
|
|
})
|
|
end,
|
|
},
|
|
|
|
-- Surround - ys/cs/ds für quotes, brackets, etc.
|
|
{
|
|
'kylechui/nvim-surround',
|
|
version = '*',
|
|
event = 'VeryLazy',
|
|
config = function()
|
|
require('nvim-surround').setup()
|
|
end,
|
|
},
|
|
|
|
-- Auto-pairs
|
|
{
|
|
'windwp/nvim-autopairs',
|
|
event = 'InsertEnter',
|
|
config = function()
|
|
require('nvim-autopairs').setup()
|
|
end,
|
|
},
|
|
|
|
-- Undo-tree - Visueller Undo-Verlauf
|
|
{
|
|
'mbbill/undotree',
|
|
cmd = 'UndotreeToggle',
|
|
keys = {
|
|
{ '<leader>u', '<cmd>UndotreeToggle<CR>', desc = 'Toggle Undotree' },
|
|
},
|
|
config = function()
|
|
vim.g.undotree_WindowLayout = 3
|
|
vim.g.undotree_SetFocusWhenToggle = 1
|
|
end,
|
|
},
|
|
}
|