summaryrefslogtreecommitdiff
path: root/ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/stay-centered.lua
blob: b64880bedffe95ccf773f8aa598022c82d4ad8fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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",
		},
	},
}