From d1a9f40a4a23c147f1d81a48d41462cba0e3d670 Mon Sep 17 00:00:00 2001 From: Haelnorr Date: Fri, 24 Jan 2025 18:25:37 +1100 Subject: [PATCH] Added keybind for todo comments telescope search --- README.md | 3 +++ lua/haelnorr/lazy/todo-comments.lua | 16 ++++++++++------ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 5e1c547..05f6490 100644 --- a/README.md +++ b/README.md @@ -192,6 +192,9 @@ e.g. in Python: `:TodoTelescope` - search project todos with Telescope +`ts` will enter `:TodoTelescope cwd=` into the nvim command line. Can +leave blank for default functionality, or enter a directory to restrict the +search to. --- #### [Treesitter](https://github.com/nvim-treesitter/nvim-treesitter) diff --git a/lua/haelnorr/lazy/todo-comments.lua b/lua/haelnorr/lazy/todo-comments.lua index 92b3b55..36c8766 100644 --- a/lua/haelnorr/lazy/todo-comments.lua +++ b/lua/haelnorr/lazy/todo-comments.lua @@ -1,8 +1,12 @@ return { - 'folke/todo-comments.nvim', - event = 'VimEnter', - dependencies = { - 'nvim-lua/plenary.nvim' - }, - opts = {} + "folke/todo-comments.nvim", + event = "VimEnter", + dependencies = { + "nvim-lua/plenary.nvim", + }, + opts = {}, + config = function() + require("todo-comments").setup() + vim.keymap.set("n", "ts", ":TodoTelescope cwd=") + end, }