mirror of
https://github.com/boxpositron/absolute-vim.git
synced 2026-02-28 11:40:36 +00:00
feat(todo-comments.lua): add support for todo-comments plugin
This commit adds support for the todo-comments plugin. It includes the following changes: - Added a new file `todo-comments.lua` in the `lua/absolute/after` directory. - Imported the `todo-comments` module. - Set up the `todo-comments` plugin with default options. - Defined key mappings for jumping to previous and next todo comments. - Defined key mappings for opening comments in Telescope and Trouble. - Added a new file `todo-comments.lua` in the `lua/absolute/plugins` directory. - Exported a table with the configuration for the `todo-comments` plugin, including its dependencies and a config function that requires the `absolute.after.todo-comments` module.
This commit is contained in:
25
lua/absolute/after/todo-comments.lua
Normal file
25
lua/absolute/after/todo-comments.lua
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
local todo_comments = require("todo-comments")
|
||||||
|
|
||||||
|
todo_comments.setup({})
|
||||||
|
|
||||||
|
local opts = { noremap = true, silent = true }
|
||||||
|
|
||||||
|
opts.desc = "Jump to previous comment"
|
||||||
|
vim.keymap.set("n", "[t", function()
|
||||||
|
todo_comments.jump_prev()
|
||||||
|
end, opts)
|
||||||
|
|
||||||
|
opts.desc = "Jump to next todo comment"
|
||||||
|
vim.keymap.set("n", "]t", function()
|
||||||
|
todo_comments.jump_next()
|
||||||
|
end, opts)
|
||||||
|
|
||||||
|
opts.desc = "Open Comments in Telescope"
|
||||||
|
vim.keymap.set("n", "<leader>pt", function()
|
||||||
|
vim.cmd([[TodoTelescope]])
|
||||||
|
end, opts)
|
||||||
|
|
||||||
|
opts.desc = "Open Comments in Trouble"
|
||||||
|
vim.keymap.set("n", "<leader>tt", function()
|
||||||
|
vim.cmd([[TodoTrouble]])
|
||||||
|
end, opts)
|
||||||
7
lua/absolute/plugins/todo-comments.lua
Normal file
7
lua/absolute/plugins/todo-comments.lua
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
return {
|
||||||
|
"folke/todo-comments.nvim",
|
||||||
|
dependencies = { "nvim-lua/plenary.nvim" },
|
||||||
|
config = function()
|
||||||
|
require("absolute.after.todo-comments")
|
||||||
|
end,
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user