Note: This site is currently "Under construction". I'm migrating to a new version of my site building software. Lots of things are in a state of disrepair as a result (for example, footnote links aren't working). It's all part of the process of building in public. Most things should still be readable though.

Setting Individual Initial Modes For Different Neovim Telescope Pickers

I set the default to normal mode:

Code

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.

Code

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):

Code

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