1

Refresh generated neovim config

This commit is contained in:
2024-08-15 13:01:03 +02:00
parent 64b51cf53a
commit f5af8e2b28
1836 changed files with 38979 additions and 31094 deletions

View File

@ -4,10 +4,10 @@ if not has_telescope then
error("This plugins requires nvim-telescope/telescope.nvim")
end
local pickers = require("telescope.builtin")
local Config = require("todo-comments.config")
local Highlight = require("todo-comments.highlight")
local make_entry = require("telescope.make_entry")
local pickers = require("telescope.builtin")
local function keywords_filter(opts_keywords)
assert(not opts_keywords or type(opts_keywords) == "string", "'keywords' must be a comma separated string or nil")
@ -41,9 +41,9 @@ local function todo(opts)
if start then
kw = Config.keywords[kw] or kw
local icon = Config.options.keywords[kw].icon or ' '
local icon = Config.options.keywords[kw].icon or " "
display = icon .. " " .. display
table.insert(hl, { { 1, #icon + 1 }, "TodoFg" .. kw })
table.insert(hl, { { 0, #icon + 1 }, "TodoFg" .. kw })
text = vim.trim(text:sub(start))
table.insert(hl, {

View File

@ -46,9 +46,10 @@ function M.match(str, patterns)
for _, pattern in pairs(patterns) do
local m = vim.fn.matchlist(str, [[\v\C]] .. pattern)
if #m > 1 and m[2] then
local kw = m[2]
local start = str:find(kw)
return start, start + #kw, kw
local match = m[2]
local kw = m[3] ~= "" and m[3] or m[2]
local start = str:find(match, 1, true)
return start, start + #match, kw
end
end
end
@ -387,7 +388,6 @@ function M.start()
[[augroup Todo
autocmd!
autocmd BufWinEnter,WinNew * lua require("todo-comments.highlight").attach()
autocmd BufWritePost * silent! lua require'trouble'.refresh({auto = true, provider = "todo"})
autocmd WinScrolled * lua require("todo-comments.highlight").highlight_win()
autocmd ColorScheme * lua vim.defer_fn(require("todo-comments.config").colors, 10)
augroup end]],

View File

@ -1,5 +1,5 @@
local highlight = require("todo-comments.highlight")
local config = require("todo-comments.config")
local highlight = require("todo-comments.highlight")
local util = require("todo-comments.util")
local M = {}

View File

@ -1,6 +1,6 @@
local Config = require("todo-comments.config")
local Search = require("todo-comments.search")
local util = require("trouble.util")
local Config = require("todo-comments.config")
local function todo(_win, _buf, cb, opts)
Search.search(function(results)