steelbrain / intentions

Base package for showing intentions in Atom
MIT License
54 stars 11 forks source link

1.1.3 breaks contextual intentions #69

Closed Gert-dev closed 7 years ago

Gert-dev commented 7 years ago

Hello

I noticed you introduced caching for the intentions list in 1.1.3. Caching is a neat thing, but it seems that this cache keeps the list in its entirety cached for the entire editor until it changes. This is a problem for me as my packages provide contextual intentions (i.e. what intentions are displayed depend on the cursor position). For example: you can only generate getters if you are in a class, you can only extract code into a method when you have a selection, you can only show documentation when the cursor is on a structural element, ...

With this change, the list is now generated once and then is the same everywhere until the editor is modified.

Is there perhaps an option I need to pass back or a flag I need to set in my provider to ensure the results can be dynamic?

Thanks!

steelbrain commented 7 years ago

Ah damn, forgot about that 😅

Considering that caching didn't solve the original issue it was supposed to, I'll just remove it I guess

steelbrain commented 7 years ago

Removed in v1.1.5