move some keymaps to the corresponding plugin configs

This commit is contained in:
Oliver Hartmann
2022-12-05 14:44:29 +01:00
parent e111deabc9
commit bce0373dfb
4 changed files with 138 additions and 114 deletions

View File

@@ -53,3 +53,74 @@ require('telescope').setup({
})
require('telescope').load_extension('fzf')
Project_files = function()
local opts = {} -- define here if you want to define something
local ok = pcall(require "telescope.builtin".git_files, opts)
if not ok then require "telescope.builtin".find_files(opts) end
end
require('legendary').keymaps(
{
{
'<space>p',
':Telescope projects<CR>',
description = 'Select project',
},
{
'<leader>f',
':lua require("telescope.builtin").find_files({no_ignore=true})<CR>',
description = 'Find file',
},
{
'<leader>g',
':lua Project_files()<CR>',
description = 'Find git files',
},
{
'<leader>o',
':Telescope oldfiles<CR>',
description = 'Find old files',
},
{
'<leader>h',
':Telescope command_history<CR>',
description = 'Open command history',
},
{
'<leader>b',
':Telescope buffers<CR>',
description = 'Select buffer',
},
{
'<leader>q',
':Telescope quickfix<CR>',
description = 'Quickfix list with telescope',
},
{
'<leader>l',
':Telescope live_grep<CR>',
description = 'Search in project',
},
{
'<C-y>',
':Telescope neoclip<CR>',
description = 'Open clipboard history',
},
{
'<leader>j',
':Telescope jumplist<CR>',
description = 'Open jumplist',
},
{
'<c-f>',
':Telescope current_buffer_fuzzy_find<CR>',
description = 'Find in buffer',
},
{
'<leader>d',
':Telescope grep_string<CR>',
description = 'Find in workspace',
}
}
)