home/dot_config/nvim/lua/plugins/telescope.lua
2021-06-01 15:03:36 +02:00

24 lines
930 B
Lua

require('telescope').load_extension('session-lens')
require('telescope').load_extension('heading')
local set_keymap = require('../common').set_keymap
set_keymap('n', '<leader>ff', '<cmd>Telescope find_files<cr>')
set_keymap('n', '<leader>p', '<cmd>Telescope find_files<cr>') -- alternative cuz im used to it from vscode
set_keymap('n', '<leader>fd', '<cmd>Telescope git_files<cr>')
set_keymap('n', '<leader>fg', '<cmd>Telescope live_grep<cr>')
set_keymap('n', '<leader>fb', '<cmd>Telescope buffers')
set_keymap('n', '<leader>fh', '<cmd>Telescope help_tags<cr>')
set_keymap('n', '<leader>fl', '<cmd>Telescope lsp_document_symbols<cr>')
set_keymap('n', '<leader>fk', '<cmd>Telescope keymaps<cr>')
set_keymap('n', '<leader>fm', '<cmd>Telescope heading<cr>')
local actions = require('telescope.actions')
require('telescope').setup{
defaults = {
mappings = {
i = {
['<esc>'] = actions.close
},
},
}
}