prochri / telescope-all-recent.nvim

(F)recency sorting for all Telescope pickers.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

when selecting a recent, it don't go to the top

otavioschwanck opened this issue · comments

if i open 4 files on find_files, and then, after i call and select one of then, it doesn't go to the top on the next search. If i search for the file, it will update.

Probably to fix it is just upgrade the priority (order) when select something that is from the recent list.

EDIT:

I think this is because of frecency. Is possible to disable it ? i just want that the top items to be for recently open

Yes, that seems to be the behaviour of frecency sorting.

You can change that by calling setup with:

{
  pickers = {
    find_files = {
      disable = false,
      use_cwd = true,
      sorting = 'recent',
    }
  }
}

Yes, that seems to be the behaviour of frecency sorting.

You can change that by calling setup with:

{
  pickers = {
    find_files = {
      disable = false,
      use_cwd = true,
      sorting = 'recent',
    }
  }
}

i added that but the last selected item not always go to the top. (it appear on the first ones, but not always at first)

Sorry, then I misunderstood something.

You are trying to select a file in the picker and then close the picker without opening the file? And after that, the selected file should show up at the top of the search?

This scenario is currently not supported, as it only updates if you actually open an item.

If that's not what you mean, please clarify!

Sorry, then I misunderstood something.

You are trying to select a file in the picker and then close the picker without opening the file? And after that, the selected file should show up at the top of the search?

This scenario is currently not supported, as it only updates if you actually open an item.

If that's not what you mean, please clarify!

I am selecting then. Look:
all-recent

Only the selections that is not recent are being took to the top. If i select one from the recent ones, it doesn't goes.

I just pushed a commit that should fix this.

Turns out I was querying for recent timestamp in a resolution of minutes.

Let me know if it works for you! (you can close this issue if it does)