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

@ -19,9 +19,9 @@
- Neovim >= 0.8.0 (use the `neovim-pre-0.8.0` branch for older versions)
- a [patched font](https://www.nerdfonts.com/) for the icons, or change them to simple ASCII characters
- optional:
- [ripgrep](https://github.com/BurntSushi/ripgrep) and [plenary.nvim](https://github.com/nvim-lua/plenary.nvim) are used for searching.
- [Trouble](https://github.com/folke/trouble.nvim)
- [Telescope](https://github.com/nvim-telescope/telescope.nvim)
+ [ripgrep](https://github.com/BurntSushi/ripgrep) and [plenary.nvim](https://github.com/nvim-lua/plenary.nvim) are used for searching.
+ [Trouble](https://github.com/folke/trouble.nvim)
+ [Telescope](https://github.com/nvim-telescope/telescope.nvim)
## 📦 Installation
@ -149,7 +149,7 @@ Each of the commands below accept the following arguments:
- `cwd` - Specify the directory to search for comments, like:
```vim
:TodoTrouble cwd=~/projects/foobar
:TodoTelescope cwd=~/projects/foobar
```
- `keywords` - Comma separated list of keywords to filter results by. Keywords are case-sensitive.
@ -170,10 +170,12 @@ This uses the location list to show all todos in your project.
![image](https://user-images.githubusercontent.com/292349/118135332-bf9c2300-b3b7-11eb-9a40-1307feb27c44.png)
### 🚦 `:TodoTrouble`
### 🚦 `:Trouble todo`
List all project todos in [trouble](https://github.com/folke/trouble.nvim)
Use Trouble's filtering: `Trouble todo filter = {tag = {TODO,FIX,FIXME}}`
> See screenshot at the top
### 🔭 `:TodoTelescope`

View File

@ -1,4 +1,4 @@
*todo-comments.nvim.txt* For Neovim >= 0.8.0 Last change: 2024 May 22
*todo-comments.nvim.txt* For Neovim >= 0.8.0 Last change: 2024 June 12
==============================================================================
Table of Contents *todo-comments.nvim-table-of-contents*
@ -167,7 +167,7 @@ Each of the commands below accept the following arguments:
- `cwd` - Specify the directory to search for comments, like:
>vim
:TodoTrouble cwd=~/projects/foobar
:TodoTelescope cwd=~/projects/foobar
<
- `keywords` - Comma separated list of keywords to filter results by. Keywords are case-sensitive.
@ -187,10 +187,12 @@ This uses the quickfix list to show all todos in your project.
This uses the location list to show all todos in your project.
:TODOTROUBLE ~
:TROUBLE TODO ~
List all project todos in trouble <https://github.com/folke/trouble.nvim>
Use Troubles filtering: `Trouble todo filter = {tag = {TODO,FIX,FIXME}}`
See screenshot at the top

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 })