From e00fc002a6441fa3741d1f705337efbbd8850744 Mon Sep 17 00:00:00 2001 From: Elvis Claros Castro Date: Mon, 9 Dec 2024 10:44:18 -0300 Subject: Cambios varios. --- lua/plugins/aerial.lua | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 lua/plugins/aerial.lua (limited to 'lua/plugins/aerial.lua') diff --git a/lua/plugins/aerial.lua b/lua/plugins/aerial.lua new file mode 100644 index 0000000..f8bc139 --- /dev/null +++ b/lua/plugins/aerial.lua @@ -0,0 +1,54 @@ +-- Silent keymap option +local opts = { silent = true } + +return { + { + "folke/edgy.nvim", + optional = true, + opts = function(_, opts) + opts.right = opts.right or {} + table.insert(opts.right, "aerial") + table.insert(opts.right, { + title = "hurl.nvim", + ft = "hurl-nvim", + size = { width = 0.5 }, + }) + + end, + }, + { + "stevearc/aerial.nvim", + keys = { + { "ta", "AerialToggle", desc = "AerialToggle" }, + }, + config = function() + local status_ok, aerial = pcall(require, "aerial") + if not status_ok then + return + end + + aerial.setup({ + -- optionally use on_attach to set keymaps when aerial has attached to a buffer + on_attach = function(bufnr) + -- Jump forwards/backwards with '{' and '}' + vim.keymap.set("n", "{", "AerialPrev", { buffer = bufnr }) + vim.keymap.set("n", "}", "AerialNext", { buffer = bufnr }) + + vim.keymap.set("n", "fi", "Telescope aerial", opts) + end, + }) + + local tele_status_ok, telescope = pcall(require, "telescope") + if not tele_status_ok then + return + end + + -- Define a custom command to open aerial with telescope + vim.keymap.set("n", "fi", "Telescope aerial", { + desc = "Telescope Aerial", + }) + + telescope.load_extension("aerial") + end, + }, +} -- cgit v1.2.3