1

Update generated neovim config

This commit is contained in:
2024-08-15 14:28:54 +02:00
parent 07409c223d
commit 25cfcf2941
3809 changed files with 351157 additions and 0 deletions

View File

@ -0,0 +1,29 @@
local Config = require("todo-comments.config")
local Grep = require("fzf-lua.providers.grep")
local M = {}
---@param filter? string|string[]
local function keywords_filter(filter)
local all = vim.tbl_keys(Config.keywords)
if not filter then
return all
end
local filters = type(filter) == "string" and { filter } or filter
return vim.tbl_filter(function(kw)
return vim.tbl_contains(filters, kw)
end, all)
end
---@param opts? {keywords: string[]}
function M.todo(opts)
opts = vim.tbl_extend("force", {
no_esc = true,
multiline = true,
}, opts or {})
opts.no_esc = true
opts.search = Config.search_regex(keywords_filter(opts.keywords))
return Grep.grep(opts)
end
return M