From 3d1e5fc980b22d9c0ce9f1d8ca4dd5629114133c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20La=C3=ADn?= Date: Sun, 31 Dec 2023 13:20:00 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat(nvim):=20add=20nvim-recorder?= =?UTF-8?q?=20module=20to=20lualine?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .config/nvim/lazy-lock.json | 1 + .config/nvim/lazyvim.json | 1 + .../lua/plugins/extras/coding/recorder.lua | 49 +++++++++++-------- 3 files changed, 31 insertions(+), 20 deletions(-) diff --git a/.config/nvim/lazy-lock.json b/.config/nvim/lazy-lock.json index 822ca1bd..2428f5f1 100644 --- a/.config/nvim/lazy-lock.json +++ b/.config/nvim/lazy-lock.json @@ -83,6 +83,7 @@ "nvim-notify": { "branch": "master", "commit": "ebcdd8219e2a2cbc0a4bef68002f6867f1fde269" }, "nvim-numbertoggle": { "branch": "main", "commit": "9ab95e60ea5ec138e1b2332e0fc18b8e5de464c6" }, "nvim-puppeteer": { "branch": "main", "commit": "d7e1b2d67c89d32b6ecada88ff67b539ba09f2d7" }, + "nvim-recorder": { "branch": "main", "commit": "daaae505862e816a7efe578e22d6f3d10cd7a2e6" }, "nvim-spectre": { "branch": "master", "commit": "d8906855f1949ac97b1e77aaf8d3fe12ed158ddc" }, "nvim-treesitter": { "branch": "master", "commit": "e49f1e8ef3e8450a8446cb1f2bbb53c919f60b6d" }, "nvim-treesitter-context": { "branch": "master", "commit": "652ec514d6ba8bc4a3c2de76c855fe668e2c7196" }, diff --git a/.config/nvim/lazyvim.json b/.config/nvim/lazyvim.json index 97027272..a757c247 100644 --- a/.config/nvim/lazyvim.json +++ b/.config/nvim/lazyvim.json @@ -12,6 +12,7 @@ "plugins.extras.coding.debugprint", "plugins.extras.coding.dial", "plugins.extras.coding.multicursor", + "plugins.extras.coding.recorder", "plugins.extras.coding.refactoring", "plugins.extras.coding.sniprun", "plugins.extras.coding.treesitter.endwise", diff --git a/.config/nvim/lua/plugins/extras/coding/recorder.lua b/.config/nvim/lua/plugins/extras/coding/recorder.lua index b2727a49..21dfbfcb 100644 --- a/.config/nvim/lua/plugins/extras/coding/recorder.lua +++ b/.config/nvim/lua/plugins/extras/coding/recorder.lua @@ -1,24 +1,33 @@ return { - "chrisgrieser/nvim-recorder", - dependencies = { "rcarriga/nvim-notify" }, - keys = { - { "q", desc = "Start Recording" }, - { "Q", desc = "Play Recording" }, - { "", desc = "Switch Slot" }, - { "cq", desc = "Edit Macro" }, - { "yq", desc = "Yank Macro" }, - { "dq", desc = "Delete All Macros" }, - }, - opts = { - useNerdFontsIcons = false, - slots = { "a", "b", "c", "d" }, - mapping = { - startStopRecording = "q", - playMacro = "Q", - editMacro = "cq", - switchSlot = "", - deleteAllMacros = "dq", - yankMacro = "yq", + { + "chrisgrieser/nvim-recorder", + dependencies = { "rcarriga/nvim-notify" }, + event = "VeryLazy", + keys = { + { "q", desc = "Start Recording" }, + { "Q", desc = "Play Recording" }, + { "", desc = "Switch Slot" }, + { "cq", desc = "Edit Macro" }, + { "yq", desc = "Yank Macro" }, + { "dq", desc = "Delete All Macros" }, + }, + opts = { + useNerdFontsIcons = true, + slots = { "a", "b", "c", "d" }, + mapping = { + startStopRecording = "q", + playMacro = "Q", + editMacro = "cq", + switchSlot = "", + deleteAllMacros = "dq", + yankMacro = "yq", + }, }, }, + { + "nvim-lualine/lualine.nvim", + opts = function(_, opts) + table.insert(opts.sections.lualine_x, 2, require("recorder").displaySlots) + end, + }, }