home ~ projects ~ socials

Setting Individual Initial Modes For Different Neovim Telescope Pickers

I set the default to normal mode:

require('telescope').setup {
  defaults = {
      initial_mode = 'normal',
  },
}

Then I call the pickers I want to start up with insert mode like this (using help_tags) as an example.

vim.keymap.set('n', '<leader>sh', function() 
  require('telescope.builtin').help_tags({
    initial_mode = 'insert',
  })
end, { desc = '[S]earct [H]elp'})

And as a reference, here's what the calls look like for the ones I use the default setting with this (using file_files as the example):

vim.keymap.set('n', '<leader>sf', 
  require('telescope.builtin').find_files, 
  { desc = '[S]earch [F]iles' }
)
-- end of line --