From 7ed2303648bf83bb081d9bd863660ebf2344ce47 Mon Sep 17 00:00:00 2001 From: srdusr Date: Wed, 24 Sep 2025 04:19:28 +0200 Subject: Squashed 'common/config/nvim/' changes from 2a8020a..966d12a 966d12a Update/Overhaul git-subtree-dir: common/config/nvim git-subtree-split: 966d12ac730c83da90d60ab24eae539b2ea69441 --- lua/plugins/goto-preview.lua | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) mode change 100644 => 100755 lua/plugins/goto-preview.lua (limited to 'lua/plugins/goto-preview.lua') diff --git a/lua/plugins/goto-preview.lua b/lua/plugins/goto-preview.lua old mode 100644 new mode 100755 index d4d2c67..eb54a8c --- a/lua/plugins/goto-preview.lua +++ b/lua/plugins/goto-preview.lua @@ -1,4 +1,12 @@ -require('goto-preview').setup { +local M = {} + +function M.setup() + local ok, gp = pcall(require, 'goto-preview') + if not ok or not gp then + return false + end + + gp.setup { width = 120; -- Width of the floating window height = 15; -- Height of the floating window border = {"↖", "─" ,"┐", "│", "┘", "─", "└", "│"}; -- Border characters of the floating window @@ -14,5 +22,10 @@ require('goto-preview').setup { focus_on_open = true; -- Focus the floating window when opening it. dismiss_on_move = false; -- Dismiss the floating window when moving the cursor. force_close = true, -- passed into vim.api.nvim_win_close's second argument. See :h nvim_win_close - bufhidden = "wipe", -- the bufhidden option to set on the floating window. See :h bufhidden -} + bufhidden = "wipe", -- the bufhidden option to set on the floating window. See :h bufhidden + } + + return true +end + +return M -- cgit v1.2.3