summaryrefslogtreecommitdiff
path: root/ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/macro.lua
blob: bd0af3096e8ac477904cb9e1d9781ef079aab140 (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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
return {
	"ecthelionvi/NeoComposer.nvim",
	dependencies = { "kkharji/sqlite.lua" },
	opts = {},
	config = function()
		require("NeoComposer").setup({
			notify = true,
			delay_timer = 150,
			queue_most_recent = false,
			window = {
				width = 80,
				height = 10,
				border = "rounded",
				winhl = {
					Normal = "ComposerNormal",
				},
			},
			colors = {
				bg = "NONE",
				fg = "#ff9e64",
				red = "#ec5f67",
				blue = "#5fb3b3",
				green = "#99c794",
			},
			keymaps = {
				play_macro = "Q",
				yank_macro = "yq",
				stop_macro = "cq",
				toggle_record = "q",
				cycle_next = "<m-n>",
				cycle_prev = "<m-p>",
				toggle_macro_menu = "<m-q>",
			},
		})

		require("telescope").load_extension("macros")

		vim.keymap.set("n", "<leader>fQ", ":Telescope macros<CR>", { desc = "Search macros" })
		vim.keymap.set("n", "<leader>eQ", ":EditMacros<CR>", { desc = "Edit macros" })
		vim.keymap.set("n", "<leader>xQ", ":ClearNeoComposer<CR>", { desc = "Clear macros" })
	end,
}