folke / todo-comments.nvim

βœ… Highlight, list and search todo comments in your projects
Apache License 2.0
3.15k stars 89 forks source link

feature: `nvim-lualine` component #259

Open bezhermoso opened 5 months ago

bezhermoso commented 5 months ago

Did you check the docs?

Is your feature request related to a problem? Please describe.

πŸ‘‹ Hi!

Thoughts on providing a lualine component that would display the number of TODOs, NOTEs, etc. to the user's liking?

Describe the solution you'd like

Ideally, this plugin can provide a component (e.g. a Lua function returning a string) that can be added to any segment in lualine e.g.

local todos_component = require("todo-comments.lualine").component({
  order = {"TODO", "FIX"},
})

require('lualine').setup({
  sections = {
    lualine_y = {'progress', todos_component },
  }
})

The ideal result would be something like:

βœ… 12 🐞 3

...or whatever the glyphs this plugin is configured with.

Describe alternatives you've considered

I wrote a plugin to do this (https://github.com/bezhermoso/todos-lualine.nvim), but it maintains its own copy of this plugin's defaults e.g. glyphs, keywords for each type. Users that override these settings would need to replicate the config for the component to maintain consistency. Not so bad for glyphs, but inconsistency arising from diverging sets of keywords is not good.

Ideally, there is a single configuration that's respected in both the functionality-proper & the lualine component.

Alternatively:

This plugin can provide a Lua API to fetch the number of matches given a list of todo-types e.g. fetch_counts({"TODO", "FIX"}, callback) & expose the counts in a structured way, or simply expose the user's configuration so that todos-lualine can read & use it.

Additional context

No response

github-actions[bot] commented 3 months ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

bezhermoso commented 3 months ago

Hi @folke any chance you can take a quick look?

github-actions[bot] commented 1 month ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

Mte90 commented 1 month ago

just a ping

github-actions[bot] commented 3 weeks ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

Mte90 commented 3 weeks ago

this starts to be a very boring action...