This commit is contained in:
Juan-Legion-Doan 2025-12-02 11:23:27 +07:00
parent bae7a857b8
commit cae3385a67
1 changed files with 41 additions and 1 deletions

View File

@ -283,7 +283,47 @@ require('lazy').setup({
},
},
},
{
'abecodes/tabout.nvim',
lazy = false,
config = function()
require('tabout').setup {
tabkey = '<Tab>', -- key to trigger tabout, set to an empty string to disable
backwards_tabkey = '<S-Tab>', -- key to trigger backwards tabout, set to an empty string to disable
act_as_tab = true, -- shift content if tab out is not possible
act_as_shift_tab = false, -- reverse shift content if tab out is not possible (if your keyboard/terminal supports <S-Tab>)
default_tab = '<C-t>', -- shift default action (only at the beginning of a line, otherwise <TAB> is used)
default_shift_tab = '<C-d>', -- reverse shift default action,
enable_backwards = true, -- well ...
completion = false, -- if the tabkey is used in a completion pum
tabouts = {
{ open = "'", close = "'" },
{ open = '"', close = '"' },
{ open = '`', close = '`' },
{ open = '(', close = ')' },
{ open = '[', close = ']' },
{ open = '{', close = '}' },
},
ignore_beginning = true, --[[ if the cursor is at the beginning of a filled element it will rather tab out than shift the content ]]
exclude = {}, -- tabout will ignore these filetypes
}
end,
dependencies = { -- These are optional
'nvim-treesitter/nvim-treesitter',
'L3MON4D3/LuaSnip',
'hrsh7th/nvim-cmp',
},
opt = true, -- Set this to true if the plugin is :wqoptional
event = 'InsertCharPre', -- Set the event to 'InsertCharPre' for better compatibility
priority = 1000,
},
{
'L3MON4D3/LuaSnip',
keys = function()
-- Disable default tab keybinding in LuaSnip
return {}
end,
},
-- NOTE: Plugins can also be configured to run Lua code when they are loaded.
--
-- This is often very useful to both group configuration, as well as handle