folke / todo-comments.nvim

✅ Highlight, list and search todo comments in your projects
Apache License 2.0
3.25k stars 92 forks source link

feature: Allow numbered tags, and show them in the todoquickfix list in sorted order #330

Closed printfdebugging closed 1 day ago

printfdebugging commented 1 week ago

Did you check the docs?

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

I am a new programmer and am often searching ways to become good at programming. Recently I got to know about "the systematic approach" to programming. Before this I used to load all the relevant bits related to the code into my head and then program with intuition. This works for small problems, but what if the problem doesn't fit into your head? For that we have the systematic approach, where we keep logs of what we tried, what worked, what didnt.. and slowly we reach to the solution.

This approach is slow, but deterministic. Keeping logs is important, and keeping them as close to the relevant code as possible is more important. I write comments to do so. Also in comments, I write numbered comments like 001 NOTE: I tried someting, it worked! this was the conclusion.. Numbering here helps one time travel, and know what was their thought process, what were the conclusions etc. This also prevents duplicate work, where you keep rediscovering the same thing after a long time.

So a big codebase, a big problem, systematic approach to solving problems, a lot of numbered comments in the codebase

Describe the solution you'd like

If todo-comments.nvim allowed numbered comments like (001-NODE: I searched this that, found the following, conclusion...), and a way to show then in the todoquickfix list in sorted order, then I would be able to navigate my discoveries/conclusions/findings etc very easily.

Describe alternatives you've considered

Alternatively I will have to write an editor of my own, more powerful than neovim or emacs, which would have a tree showing my notes in one window, and the code in the other. then clicking on a node in one window will open that node (code file) in the other window. :)

Additional context

--

printfdebugging commented 1 day ago

Also currently TodoQuickFix list is just a list, I have to manually go down and press enter on each member to go to the place. It would be nice if TodoQuickFix shows a list like lsp-references where I can navigate using :cnext and :cprevious keybindings.

I don't know if I am asking too much.. maybe I will try doing it myself coming weekend.

EDIT: this totally works. Actually I was trying it in a yaml file for which there was something wrong with the C-n C-p keybindings. I opened the plugin code, and I found that it was checking for keywords. It works in lua files and cpp files, so no issues on that side.

Just an option to show the quickfix list in the sorted order based on the first few words is left in this feature request

printfdebugging commented 1 day ago

If you find it useful for larger audiences, then please consider merging the patch. The plugin code was not hard to navigate, quite understandable.. :) (using my fork for the time being).