summaryrefslogtreecommitdiff
path: root/ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/stay-centered.lua
diff options
context:
space:
mode:
Diffstat (limited to 'ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/stay-centered.lua')
-rw-r--r--ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/stay-centered.lua28
1 files changed, 28 insertions, 0 deletions
diff --git a/ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/stay-centered.lua b/ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/stay-centered.lua
new file mode 100644
index 0000000..b64880b
--- /dev/null
+++ b/ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/stay-centered.lua
@@ -0,0 +1,28 @@
+return {
+ "arnamak/stay-centered.nvim",
+ lazy = false,
+ config = function()
+ require("stay-centered").setup({
+ -- The filetype is determined by the vim filetype, not the file extension. In order to get the filetype, open a file and run the command:
+ -- :lua print(vim.bo.filetype)
+ skip_filetypes = {},
+ -- Set to false to disable by default
+ enabled = true,
+ -- allows scrolling to move the cursor without centering, default recommended
+ allow_scroll_move = true,
+ -- temporarily disables plugin on left-mouse down, allows natural mouse selection
+ -- try disabling if plugin causes lag, function uses vim.on_key
+ disable_on_mouse = false,
+ })
+ end,
+ keys = {
+ {
+ "<leader>zs",
+ function()
+ require("stay-centered").toggle()
+ end,
+ mode = { "n", "v" },
+ desc = "Toggle stay-centered.nvim",
+ },
+ },
+}