i have plugins for now, i need sleep

This commit is contained in:
Christoph J. Scherr 2024-01-20 06:05:07 +01:00
parent 4e2e019d92
commit 3a524bc43d
Signed by: PlexSheep
GPG Key ID: 7CDD0B14851A08EF
2 changed files with 63 additions and 0 deletions

View File

@ -419,4 +419,52 @@ M.ui = {
},
}
M.goto_preview = {
plugin = true,
n = {
["gpd"] = {
function()
require("goto-preview").goto_preview_definition()
end,
"go to definition preview",
noremap = true,
},
["gpD"] = {
function()
require("goto-preview").goto_preview_declaration()
end,
"go to declaration preview",
noremap = true,
},
["gpi"] = {
function()
require("goto-preview").goto_preview_implementation()
end,
"go to implementation preview",
noremap = true,
},
["gpt"] = {
function()
require("goto-preview").goto_preview_type_definition()
end,
"go to type preview",
noremap = true,
},
["gpr"] = {
function()
require("goto-preview").goto_preview_type_references()
end,
"go to references preview",
noremap = true,
},
["gpc"] = {
function()
require("goto-preview").close_all_win()
end,
"close previews",
noremap = true,
},
},
}
return M

View File

@ -443,6 +443,21 @@ local plugins = {
"Bekaboo/deadcolumn.nvim",
event = { "BufReadPre", "BufNewFile" },
},
{
"rmagatti/goto-preview",
event = "FileType",
config = function()
require("core.utils").load_mappings "goto_preview"
require("goto-preview").setup {}
end,
dependencies = "nvim-telescope/telescope.nvim",
opts = {
width = 78,
height = 15,
default_mappings = false,
opacity = 10,
},
},
}
return plugins