diff --git a/init.lua b/init.lua index 047fee94..5f2e18e7 100644 --- a/init.lua +++ b/init.lua @@ -191,6 +191,14 @@ vim.keymap.set('n', '', '', { desc = 'Move focus to the right win vim.keymap.set('n', '', '', { desc = 'Move focus to the lower window' }) vim.keymap.set('n', '', '', { desc = 'Move focus to the upper window' }) +vim.keymap.set('i', '{', '{}ha', { desc = 'Matching { }' }) +vim.keymap.set('i', '[', '[]ha', { desc = 'Matching [ ]' }) +vim.keymap.set('i', "'", "''ha", { desc = 'Matching quotes' }) +vim.keymap.set('i', '"', '""ha', { desc = 'Matching "' }) +vim.keymap.set('i', '(', '()ha', { desc = 'Matching (' }) +vim.keymap.set('i', '±', '~', { desc = 'Complement in ipad.' }) +vim.keymap.set('i', '§', '``ha', { desc = 'Complement in backtick in ipad.' }) + -- [[ Basic Autocommands ]] -- See `:help lua-guide-autocommands` @@ -725,8 +733,8 @@ require('lazy').setup({ [''] = cmp.mapping.select_next_item(), [''] = cmp.mapping.select_prev_item(), - [''] = cmp.mapping.select_next_item(), - [''] = cmp.mapping.select_prev_item(), + --[''] = cmp.mapping.select_next_item(), + --[''] = cmp.mapping.select_prev_item(), -- Scroll the documentation window [b]ack / [f]orward [''] = cmp.mapping.scroll_docs(-4), @@ -735,7 +743,7 @@ require('lazy').setup({ -- Accept ([y]es) the completion. -- This will auto-import if your LSP supports it. -- This will expand snippets if the LSP sent a snippet. - [''] = cmp.mapping.confirm { select = true }, + [''] = cmp.mapping.confirm { select = true }, -- If you prefer more traditional completion keymaps, -- you can uncomment the following lines