@@ -293,6 +293,31 @@ require('lazy').setup({
293293 },
294294 },
295295 },
296+ {
297+ " abecodes/tabout.nvim" ,
298+ after = { " nvim-cmp" },
299+ event = " InsertEnter" ,
300+ opts = {
301+ tabkey = ' <Tab>' , -- key to trigger tabout, set to an empty string to disable
302+ backwards_tabkey = ' <S-Tab>' , -- key to trigger backwards tabout, set to an empty string to disable
303+ act_as_tab = true , -- shift content if tab out is not possible
304+ act_as_shift_tab = false , -- reverse shift content if tab out is not possible (if your keyboard/terminal supports <S-Tab>)
305+ default_tab = ' <C-t>' , -- shift default action (only at the beginning of a line, otherwise <TAB> is used)
306+ default_shift_tab = ' <C-d>' , -- reverse shift default action,
307+ enable_backwards = true , -- well ...
308+ -- completion = true, -- if the tabkey is used in a completion pum
309+ tabouts = {
310+ { open = " '" , close = " '" },
311+ { open = ' "' , close = ' "' },
312+ { open = ' `' , close = ' `' },
313+ { open = ' (' , close = ' )' },
314+ { open = ' [' , close = ' ]' },
315+ { open = ' {' , close = ' }' }
316+ },
317+ -- ignore_beginning = true, --[[ if the cursor is at the beginning of a filled element it will rather tab out than shift the content ]]
318+ exclude = {} -- tabout will ignore these filetypes
319+ }
320+ },
296321
297322
298323 -- NOTE: Next Step on Your Neovim Journey: Add/Configure additional "plugins" for kickstart
@@ -371,19 +396,22 @@ vim.keymap.set('n', ']d', vim.diagnostic.goto_next, { desc = 'Go to next diagnos
371396vim .keymap .set (' n' , ' <leader>e' , vim .diagnostic .open_float , { desc = ' Open floating diagnostic message' })
372397vim .keymap .set (' n' , ' <leader>q' , vim .diagnostic .setloclist , { desc = ' Open diagnostics list' })
373398
374- -- [[ substitute ]]
399+ -- substitute
375400
376401vim .keymap .set (" n" , " gr" , require (' substitute' ).operator , { noremap = true })
377402vim .keymap .set (" n" , " grr" , require (' substitute' ).line , { noremap = true })
378403vim .keymap .set (" x" , " gr" , require (' substitute' ).visual , { noremap = true })
379404
380- -- [[ clipboad ]]
405+ -- clipboad
381406vim .keymap .set ({ " n" , " v" }, " <leader>y" , ' "+y' )
382407vim .keymap .set ({ " n" , " v" }, " <leader>p" , ' "+p' )
383408vim .keymap .set ({ " n" , " v" }, " <leader>gr" , function () require (' substitute' ).operator ({ register = " +" }) end ,
384409 { noremap = true })
385410vim .keymap .set ({ " n" , " v" }, " <leader>grr" , function () require (' substitute' ).line ({ register = " +" }) end ,
386411 { noremap = true })
412+ -- replace word under cursor
413+ vim .keymap .set ({ " n" }, " <leader>rr" , ' *``cgn' )
414+
387415
388416-- [[ Highlight on yank ]]
389417-- See `:help vim.highlight.on_yank()`
@@ -482,7 +510,7 @@ vim.keymap.set('n', '<leader>sr', require('telescope.builtin').resume, { desc =
482510vim .defer_fn (function ()
483511 require (' nvim-treesitter.configs' ).setup {
484512 -- Add languages to be installed here that you want installed for treesitter
485- ensure_installed = { ' c' , ' cpp' , ' go' , ' lua' , ' python' , ' rust' , ' tsx' , ' javascript' , ' typescript' , ' vimdoc' , ' vim' , ' bash' },
513+ ensure_installed = { ' c' , ' cpp' , ' go' , ' lua' , ' python' , ' rust' , ' tsx' , ' javascript' , ' typescript' , ' vimdoc' , ' vim' , ' bash' , " haskell " },
486514
487515 -- Autoinstall languages that are not installed. Defaults to false (but you can change for yourself!)
488516 auto_install = false ,
0 commit comments