aboutsummaryrefslogtreecommitdiffstats
path: root/modules/by-name/nv/nvim/plgs/goto-preview/lua
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-11-09 12:35:44 +0100
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-11-09 12:54:51 +0100
commit2122a01f99c6da466b8f0f55c965c11a9043d117 (patch)
tree6c1697afc30a5bb72635bda7db9b5610386a5b71 /modules/by-name/nv/nvim/plgs/goto-preview/lua
parentfix(pkgs/stamp): Fallback to `dot-license` (diff)
downloadnixos-config-2122a01f99c6da466b8f0f55c965c11a9043d117.zip
refactor(modules/legacy/conf/nvim): Move to `by-name`
Diffstat (limited to 'modules/by-name/nv/nvim/plgs/goto-preview/lua')
-rw-r--r--modules/by-name/nv/nvim/plgs/goto-preview/lua/goto-preview.lua21
1 files changed, 21 insertions, 0 deletions
diff --git a/modules/by-name/nv/nvim/plgs/goto-preview/lua/goto-preview.lua b/modules/by-name/nv/nvim/plgs/goto-preview/lua/goto-preview.lua
new file mode 100644
index 00000000..9687a5a0
--- /dev/null
+++ b/modules/by-name/nv/nvim/plgs/goto-preview/lua/goto-preview.lua
@@ -0,0 +1,21 @@
+require("goto-preview").setup({
+ width = 120, -- Width of the floating window
+ height = 15, -- Height of the floating window
+ border = { "↖", "─", "┐", "│", "┘", "─", "└", "│" }, -- Border characters of the floating window
+ default_mappings = false, -- Bind default mappings
+ debug = false, -- Print debug information
+ opacity = nil, -- 0-100 opacity level of the floating window where 100 is fully transparent.
+ resizing_mappings = false, -- Binds arrow keys to resizing the floating window.
+ post_open_hook = nil, -- A function taking two arguments, a buffer and a window to be ran as a hook.
+ post_close_hook = nil, -- A function taking two arguments, a buffer and a window to be ran as a hook.
+ references = { -- Configure the telescope UI for slowing the references cycling window.
+ telescope = {}, -- require("telescope.themes").get_dropdown({ hide_preview = false })
+ },
+ -- These two configs can also be passed down to the goto-preview definition and implementation calls for one off "peak" functionality.
+ 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
+ stack_floating_preview_windows = true, -- Whether to nest floating windows
+ preview_window_title = { enable = true, position = "left" }, -- Whether to set the preview window title as the filename
+})