From 8007f43bd96125dd160bca3f41845bbdefc6348c Mon Sep 17 00:00:00 2001 From: Fredrik Averpil Date: Sun, 22 Dec 2024 17:02:39 +0100 Subject: [PATCH] feat(nvim): todo keymaps --- nvim-fredrik/lua/fredrik/config/keymaps.lua | 19 +++++++++++++++++++ nvim-fredrik/lua/fredrik/plugins/todo.lua | 1 + 2 files changed, 20 insertions(+) diff --git a/nvim-fredrik/lua/fredrik/config/keymaps.lua b/nvim-fredrik/lua/fredrik/config/keymaps.lua index c4c5d153..8ed8bc16 100644 --- a/nvim-fredrik/lua/fredrik/config/keymaps.lua +++ b/nvim-fredrik/lua/fredrik/config/keymaps.lua @@ -453,6 +453,25 @@ function M.setup_fzf_keymaps() } end +function M.setup_todo_keymaps() + return { + { + "st", + function() + require("todo-comments.fzf").todo() + end, + desc = "Todo", + }, + { + "sT", + function() + require("todo-comments.fzf").todo({ keywords = { "TODO", "FIX", "FIXME" } }) + end, + desc = "Todo/Fix/Fixme", + }, + } +end + function M.setup_auto_session_keymaps() return { -- Will use Telescope if installed or a vim.ui.select picker otherwise diff --git a/nvim-fredrik/lua/fredrik/plugins/todo.lua b/nvim-fredrik/lua/fredrik/plugins/todo.lua index 6c6632b4..4b39d554 100644 --- a/nvim-fredrik/lua/fredrik/plugins/todo.lua +++ b/nvim-fredrik/lua/fredrik/plugins/todo.lua @@ -5,5 +5,6 @@ return { event = "VeryLazy", dependencies = { "nvim-lua/plenary.nvim" }, opts = {}, + keys = require("fredrik.config.keymaps").setup_todo_keymaps(), }, }