aboutsummaryrefslogtreecommitdiff
path: root/lua/plugins/goto-preview.lua
diff options
context:
space:
mode:
authorsrdusr <trevorgray@srdusr.com>2025-09-24 04:19:28 +0200
committersrdusr <trevorgray@srdusr.com>2025-09-24 04:19:28 +0200
commit7ed2303648bf83bb081d9bd863660ebf2344ce47 (patch)
tree702f5f832796b572d0faee31c0eb15507e91f49a /lua/plugins/goto-preview.lua
parent2a8020a2e9b7ef2ee77ddee14892127a4eb95187 (diff)
downloaddotfiles-7ed2303648bf83bb081d9bd863660ebf2344ce47.tar.gz
dotfiles-7ed2303648bf83bb081d9bd863660ebf2344ce47.zip
Squashed 'common/config/nvim/' changes from 2a8020a..966d12a
966d12a Update/Overhaul git-subtree-dir: common/config/nvim git-subtree-split: 966d12ac730c83da90d60ab24eae539b2ea69441
Diffstat (limited to 'lua/plugins/goto-preview.lua')
-rwxr-xr-x[-rw-r--r--]lua/plugins/goto-preview.lua19
1 files changed, 16 insertions, 3 deletions
diff --git a/lua/plugins/goto-preview.lua b/lua/plugins/goto-preview.lua
index d4d2c67..eb54a8c 100644..100755
--- 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