go to preview keys

This commit is contained in:
Christoph J. Scherr 2024-07-04 15:39:41 +02:00
parent f49f09d8af
commit d86b137eb5
1 changed files with 44 additions and 1 deletions

View File

@ -300,8 +300,51 @@ return {
{
'rmagatti/goto-preview',
event = 'FileType',
keys = {
{
'gpd',
function()
require('goto-preview').goto_preview_definition()
end,
desc = 'Go to definition preview',
},
{
'gpD',
function()
require('goto-preview').goto_preview_declaration()
end,
desc = 'Go to declaration preview',
},
{
'gpi',
function()
require('goto-preview').goto_preview_implementation()
end,
desc = 'Go to implementaion preview',
},
{
'gpt',
function()
require('goto-preview').goto_preview_type_definition()
end,
desc = 'Go to type preview',
},
{
'gpt',
function()
require('goto-preview').goto_preview_type_references()
end,
desc = 'Preview references',
},
{
'gpc',
function()
require('goto-preview').close_all_win()
end,
desc = 'Close all preview windows',
},
},
config = function()
require('core.utils').load_mappings 'goto_preview'
require('goto-preview').setup {}
end,
dependencies = 'nvim-telescope/telescope.nvim',