" Find files using Telescope command-line sugar.
"nnoremap <leader>f <cmd>Telescope find_files<cr>
"nnoremap <leader>g <cmd>Telescope live_grep<cr>
"nnoremap <leader>b <cmd>Telescope buffers<cr>
"nnoremap <leader>fh <cmd>Telescope help_tags<cr>

lua << EOF

require('telescope').load_extension('ultisnips')

EOF

" Using Lua functions
nnoremap <leader>f <cmd>lua require('telescope.builtin').find_files()<cr>
nnoremap <leader>a <cmd>lua require('telescope.builtin').live_grep()<cr>
nnoremap <leader>b <cmd>lua require('telescope.builtin').buffers()<cr>
nnoremap <leader>r <cmd>lua require('telescope.builtin').resume()<cr>
"nnoremap <leader>fh <cmd>lua require('telescope.builtin').help_tags()<cr>
nnoremap <leader>tc <cmd>lua require('telescope.builtin').commands()<cr>
nnoremap <leader>t: <cmd>lua require('telescope.builtin').command_history()<cr>
nnoremap <leader>t/ <cmd>lua require('telescope.builtin').search_history()<cr>
nnoremap <leader>tr <cmd>lua require('telescope.builtin').registers()<cr>

" Neovim lsp pickers
nnoremap <leader>tr <cmd>lua require('telescope.builtin').lsp_references()<cr>
nnoremap <leader>td <cmd>lua require('telescope.builtin').lsp_definitions()<cr>

" git pickers
nnoremap <leader>gc <cmd>lua require('telescope.builtin').git_commits()<cr>
nnoremap <leader>gC <cmd>lua require('telescope.builtin').git_bcommits()<cr>
nnoremap <leader>gb <cmd>lua require('telescope.builtin').git_branches()<cr>

nnoremap <leader>s <cmd>lua require('telescope').extensions.ultisnips.ultisnips()<cr>
