mirror of
https://github.com/pojokcodeid/nvim-lazy.git
synced 2025-06-21 08:35:48 +02:00
add: todo comment
This commit is contained in:
parent
7162f65a13
commit
b9949062dc
4 changed files with 30 additions and 0 deletions
1
init.lua
1
init.lua
|
@ -1,3 +1,4 @@
|
||||||
|
-- PERF fully optimized
|
||||||
if vim.g.vscode then
|
if vim.g.vscode then
|
||||||
-- config vscode
|
-- config vscode
|
||||||
Map = vim.keymap.set
|
Map = vim.keymap.set
|
||||||
|
|
|
@ -59,6 +59,7 @@
|
||||||
"smart-splits.nvim": { "branch": "master", "commit": "66fda3a601a5b4c679656f15eb6ddd613c8d3216" },
|
"smart-splits.nvim": { "branch": "master", "commit": "66fda3a601a5b4c679656f15eb6ddd613c8d3216" },
|
||||||
"telescope.nvim": { "branch": "master", "commit": "f2bfde705ac752c52544d5cfa8b0aee0a766c1ed" },
|
"telescope.nvim": { "branch": "master", "commit": "f2bfde705ac752c52544d5cfa8b0aee0a766c1ed" },
|
||||||
"tiny-devicons-auto-colors.nvim": { "branch": "main", "commit": "9be4af5b1bc1f26a11206ed7ce8bf44312e7941a" },
|
"tiny-devicons-auto-colors.nvim": { "branch": "main", "commit": "9be4af5b1bc1f26a11206ed7ce8bf44312e7941a" },
|
||||||
|
"todo-comments.nvim": { "branch": "main", "commit": "a7e39ae9e74f2c8c6dc4eea6d40c3971ae84752d" },
|
||||||
"toggleterm.nvim": { "branch": "main", "commit": "fee58a0473fd92b28c34f8f724e4918b15ba30a3" },
|
"toggleterm.nvim": { "branch": "main", "commit": "fee58a0473fd92b28c34f8f724e4918b15ba30a3" },
|
||||||
"vim-illuminate": { "branch": "master", "commit": "5eeb7951fc630682c322e88a9bbdae5c224ff0aa" },
|
"vim-illuminate": { "branch": "master", "commit": "5eeb7951fc630682c322e88a9bbdae5c224ff0aa" },
|
||||||
"vim-startuptime": { "branch": "master", "commit": "97a88e688482a09c3c4b777d07b509b328a5ec29" },
|
"vim-startuptime": { "branch": "master", "commit": "97a88e688482a09c3c4b777d07b509b328a5ec29" },
|
||||||
|
|
|
@ -131,6 +131,9 @@ pcode.columnline = true
|
||||||
-- https://github.com/okuuva/auto-save.nvim
|
-- https://github.com/okuuva/auto-save.nvim
|
||||||
pcode.auto_save = true
|
pcode.auto_save = true
|
||||||
|
|
||||||
|
-- https://github.com/folke/todo-comments.nvim
|
||||||
|
pcode.todo_comment = true
|
||||||
|
|
||||||
-- https://github.com/nvim-telescope/telescope.nvim
|
-- https://github.com/nvim-telescope/telescope.nvim
|
||||||
---@alias telescope_themes
|
---@alias telescope_themes
|
||||||
---| "cursor" # see `telescope.themes.get_cursor()`
|
---| "cursor" # see `telescope.themes.get_cursor()`
|
||||||
|
|
25
lua/plugins/todo-comments.lua
Normal file
25
lua/plugins/todo-comments.lua
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
local M = {}
|
||||||
|
if pcode.todo_comment then
|
||||||
|
M = {
|
||||||
|
"folke/todo-comments.nvim",
|
||||||
|
event = { "BufRead", "BufNewFile" },
|
||||||
|
dependencies = { "nvim-lua/plenary.nvim" },
|
||||||
|
config = function()
|
||||||
|
local todo_comments = require("todo-comments")
|
||||||
|
|
||||||
|
-- set keymaps
|
||||||
|
local keymap = vim.keymap -- for conciseness
|
||||||
|
|
||||||
|
keymap.set("n", "]t", function()
|
||||||
|
todo_comments.jump_next()
|
||||||
|
end, { desc = "Next todo comment" })
|
||||||
|
|
||||||
|
keymap.set("n", "[t", function()
|
||||||
|
todo_comments.jump_prev()
|
||||||
|
end, { desc = "Previous todo comment" })
|
||||||
|
|
||||||
|
todo_comments.setup()
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
end
|
||||||
|
return M
|
Loading…
Add table
Add a link
Reference in a new issue