1

Refresh generated neovim config

This commit is contained in:
2024-07-14 21:12:36 +02:00
parent f215ce2ab5
commit 00464e0e65
731 changed files with 6780 additions and 31110 deletions

View File

@ -41,7 +41,7 @@ local function todo(opts)
if start then
kw = Config.keywords[kw] or kw
local icon = Config.options.keywords[kw].icon
local icon = Config.options.keywords[kw].icon or ' '
display = icon .. " " .. display
table.insert(hl, { { 1, #icon + 1 }, "TodoFg" .. kw })
text = vim.trim(text:sub(start))

View File

@ -65,25 +65,25 @@ function M.search(cb, opts)
return
end
local args =
vim.tbl_flatten({ Config.options.search.args, Config.search_regex(keywords_filter(opts.keywords)), opts.cwd })
Job
:new({
command = command,
args = args,
on_exit = vim.schedule_wrap(function(j, code)
if code == 2 then
local error = table.concat(j:stderr_result(), "\n")
Util.error(command .. " failed with code " .. code .. "\n" .. error)
end
if code == 1 and opts.disable_not_found_warnings ~= true then
Util.warn("no todos found")
end
local lines = j:result()
cb(M.process(lines))
end),
})
:start()
local args = {}
vim.list_extend(args, Config.options.search.args)
vim.list_extend(args, { Config.search_regex(keywords_filter(opts.keywords)), opts.cwd })
Job:new({
command = command,
args = args,
on_exit = vim.schedule_wrap(function(j, code)
if code == 2 then
local error = table.concat(j:stderr_result(), "\n")
Util.error(command .. " failed with code " .. code .. "\n" .. error)
end
if code == 1 and opts.disable_not_found_warnings ~= true then
Util.warn("no todos found")
end
local lines = j:result()
cb(M.process(lines))
end),
}):start()
end
local function parse_opts(opts)
@ -106,7 +106,7 @@ end
function M.setlist(opts, use_loclist)
opts = parse_opts(opts) or {}
opts.open = (opts.open ~= nil and {opts.open} or {true})[1]
opts.open = (opts.open ~= nil and { opts.open } or { true })[1]
M.search(function(results)
if use_loclist then
vim.fn.setloclist(0, {}, " ", { title = "Todo", id = "$", items = results })