diff options
| author | srdusr <trevorgray@srdusr.com> | 2025-09-24 00:14:04 +0200 |
|---|---|---|
| committer | srdusr <trevorgray@srdusr.com> | 2025-09-24 00:14:04 +0200 |
| commit | 966d12ac730c83da90d60ab24eae539b2ea69441 (patch) | |
| tree | 702f5f832796b572d0faee31c0eb15507e91f49a /lua/plugins/goto-preview.lua | |
| parent | 2a8020a2e9b7ef2ee77ddee14892127a4eb95187 (diff) | |
| download | dotfiles-966d12ac730c83da90d60ab24eae539b2ea69441.tar.gz dotfiles-966d12ac730c83da90d60ab24eae539b2ea69441.zip | |
Update/Overhaul
Diffstat (limited to 'lua/plugins/goto-preview.lua')
| -rwxr-xr-x[-rw-r--r--] | lua/plugins/goto-preview.lua | 19 |
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 |
