nix-community.nixvim/plugins/by-name/goto-preview/default.nix
osbm a41559f093
Some checks are pending
Publish every Git push to main to FlakeHub / flakehub-publish (push) Waiting to run
Publish every git push to Flakestry / publish-flake (push) Waiting to run
Documentation / Version info (push) Waiting to run
Documentation / Build (push) Blocked by required conditions
Documentation / Combine builds (push) Blocked by required conditions
Documentation / Deploy (push) Blocked by required conditions
treewide: add plugin descriptions
2025-06-24 06:10:11 +00:00

25 lines
663 B
Nix

{
lib,
...
}:
lib.nixvim.plugins.mkNeovimPlugin {
name = "goto-preview";
description = "A small Neovim plugin for previewing definitions using floating windows.";
maintainers = [ lib.maintainers.GaetanLepage ];
settingsExample = {
default_mappings = false;
height = 30;
post_open_hook.__raw = ''
function(_, win)
-- Close the current preview window with <Esc> or 'q'.
local function close_window()
vim.api.nvim_win_close(win, true)
end
vim.keymap.set('n', '<Esc>', close_window, { buffer = true })
vim.keymap.set('n', 'q', close_window, { buffer = true })
end
'';
};
}