aboutsummaryrefslogtreecommitdiff
path: root/common/config/nvim/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
commite95332b121672abaf9fd02692d81869b1e46c02d (patch)
tree9dc0def690d7941b18783733045ba091112e9452 /common/config/nvim/lua/plugins/goto-preview.lua
parent0f6cee92221dc517bd756083e260dd9373851b82 (diff)
parent7ed2303648bf83bb081d9bd863660ebf2344ce47 (diff)
downloaddotfiles-e95332b121672abaf9fd02692d81869b1e46c02d.tar.gz
dotfiles-e95332b121672abaf9fd02692d81869b1e46c02d.zip
Merge commit '7ed2303648bf83bb081d9bd863660ebf2344ce47'
Diffstat (limited to 'common/config/nvim/lua/plugins/goto-preview.lua')
-rwxr-xr-x[-rw-r--r--]common/config/nvim/lua/plugins/goto-preview.lua19
1 files changed, 16 insertions, 3 deletions
diff --git a/common/config/nvim/lua/plugins/goto-preview.lua b/common/config/nvim/lua/plugins/goto-preview.lua
index d4d2c67..eb54a8c 100644..100755
--- a/common/config/nvim/lua/plugins/goto-preview.lua
+++ b/common/config/nvim/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