How to properly use Snacks.picker.todo_comments when you previously defined the keywords in folke/todo-comments.nvim? #1899
Answered
by
drowning-cat
DominikMendel
asked this question in
Q&A
-
If I have my tolke/todo-comments.nvim defined with an opts like so ```lua
|
Beta Was this translation helpful? Give feedback.
Answered by
drowning-cat
May 21, 2025
Replies: 1 comment 3 replies
-
You're doing something wrong. Let's test it with a minimal reproducible example: -- Run with: nvim -u repro.lua repro.lua
-- repro.lua
vim.env.LAZY_STDPATH = '.repro'
load(vim.fn.system 'curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua')()
---@module 'snacks'
-- I_LOVE_POTATO_CHIPS: Lays
-- NOTE: Pringles too
---@diagnostic disable-next-line: missing-fields
require('lazy.minit').repro {
spec = {
{
'folke/todo-comments.nvim',
event = 'VimEnter',
dependencies = { 'nvim-lua/plenary.nvim' },
opts = {
keywords = {
I_LOVE_POTATO_CHIPS = { icon = '🥔', color = 'info' },
},
},
-- stylua: ignore
keys = {
---@diagnostic disable-next-line: undefined-field
{ '<space>st', function() Snacks.picker.todo_comments() end, desc = 'Todo' },
---@diagnostic disable-next-line: undefined-field
-- { '<space>sT', function() Snacks.picker.todo_comments { keywords = { 'TODO', 'FIX', 'FIXME' } } end, desc = 'Todo/Fix/Fixme' },
},
},
{
'folke/snacks.nvim',
opts = {},
},
},
} |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
DominikMendel
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You're doing something wrong. Let's test it with a minimal reproducible example: