dokato / todor

TODOr - RStudio add-in for finding TODO, FIXME, CHANGED etc. comments in your code.
Other
246 stars 12 forks source link

TODOr active file #57

Closed olivroy closed 10 months ago

olivroy commented 1 year ago

Hello !

I was wondering if it would be possible to support the active addin when focus is on the console

At line https://github.com/dokato/todor/blob/010babcc0314c5721d93a03b59413ce9009e0e6b/R/todor.R#L210

if replaced with

rstudioapi::getSourceEditorContext()$path

it would work.

happy to contribute a PR if you think this is relevant

Edit: Ref https://rstudio.github.io/rstudioapi/reference/rstudio-editors.html

dokato commented 1 year ago

Sorry @olivroy to come back so late, I've got quite busy summer. Seems indeed like an easy swap, let me test that more in action what are the consequences.

olivroy commented 11 months ago

Any more thoughts? I wouldn't mind opening a PR if you agree

dokato commented 10 months ago

Apologies @olivroy for the wait. PR ready: https://github.com/dokato/todor/pull/60 Feel free to look, otherwise I'll merge that soon.

olivroy commented 10 months ago

Looks good. thanks! It is not my case, but if users had custom keybindings, maybe changing the addin name will mess that?

dokato commented 10 months ago

Someone made a comment lately that "Find project TODOs" is not exhaustive as some people search for just BUG, or FIXME statements, so I decided to sneak in this change to this PR. I think I tested it and it didn't break my keybindings, but good call, I'll double-check that.

Regarding your request, it's merged in already and I'll push to CRAN soon. Thanks for suggesting it!

olivroy commented 10 months ago

Seeet! thank you very much