Thanks, the implementation has begun ))
The ToDoList window must be open for this feature to work which is not ideal.
I haven't looked at the code, but it seems to also require constant updating of the list when comments change? I was able to insert a "todo" inside a comment by simply adding spaces at the end of it...
Solving it is not trivial. All ToDo items should be scanned when a menu is opened, and stored in some new structure.
Scanning the entire list can create a large delay when opening the menu, which is certainly not good (even if the list is cached).
I don't know
CodeTools. Is it possible to get information from it whether the cursor is currently inside a comment? If outside it, then there is no need to check further, and IDE can immediately show "
Insert todo" in the menu. If it is a comment, then see if it contains "
todo:". If it does not, then IDE can again show "
Insert todo". Otherwise, "
Edit todo" may be shown.
If this is possible, then IDE can work only with the current code, without accessing the list (and window).