diff options
Diffstat (limited to 'common/config/nvim/lua/plugins/goto-preview.lua')
| -rwxr-xr-x[-rw-r--r--] | common/config/nvim/lua/plugins/goto-preview.lua | 19 |
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 |
