59497d6 introduced `sorters.fuzzy_with_index_bias`, which gives a
scoring boost to earlier entries.
However, this sorter relies on an `index` key existing for the entry, which is
only populated by the static finder currently. We should set it from the
other finders, too.
This will allow us to use said sorter everywhere. It will also let us
replicate the behaviour of `fzf --tiebreak=index`:
```
return pickers.new(opts, {
finder = finders.new_oneshot_job(...)
sorter = telescope.extensions.fzf.native_fzf_sorter(),
tiebreak = function(current_entry, existing_entry, _)
return current_entry.index < existing_entry.index
end
}):find()
```
This gives me better results for my "recently opened files" picker.
Other builtin pickers might benefit from this, too.
* started tree finder
* made tree more ergonmic
* deleted unneeded comments
* added stack root and node
* added preprocessing
* using staticfinder instead of separate finder, custom entry maker
* added selections and remember
* removed unused stuff
* fixed warnings
* fixed remember and selections pop
* started branch
* added go function
* changed up test
* removed root parameter from go function
* changed back to not do_close
* removed node and leaf classes
* removed stack class instead for table.insert and table.remove
* fixed warning
* started branch
* added better preprocessor and tree class
* started some tests
* finished making tests pass
* cleaned up
* fixed make entry and updated example
* started
* added some stuff
* deleted uneeded stuff
* added cancelable
* changed workspace requester
* use better cancellation mechanism
* removed accidental stuff
* removed useless print
* delete more useless stuff
* rename to dynamic
* added request cancellation
* CHECK IF NIL
* removed unused
* added trash global variable
* something kind of works already
* yayayayayayayayayayayayayayayayayayayayayayayayayayayayayayayayaya
* use async for everything besides live jobs
* fix: fixup autocmds previewer
* fix: lints for prime
* temp: Add example of how we can think about async sorters
* feat: Allow picker to decide when to cancel
* fix: simplify scoring logic and tests
* fixup: name
* fix: Move back towards more backwards compat methods
* fixup: Remove results from opts
* fixup: remove trailing quote
* fixup: Attempt to clean up some more async items. Next is status
* wip: Add todo for when bfredl implements extmarks over the EOL
* wip
* fixup: got em
* fixup: cleaning
* fixup: docs
* allow a callback to be called on on_lines update
* .
* remove unused _filter_marker var
* nit: Move to table and implement 'close'
Co-authored-by: TJ DeVries <devries.timothyj@gmail.com>
* [WIP]: Mon 28 Sep 2020 01:08:24 PM EDT
* add much much better tracking. so much less hax
* status updates, oneshot job updates, etc.
* remove temp function
* add status function
* asdfasdfasdf
This should reduce memory usage at least for large jobs. We won't save
all the results into the job. I _think_ this will be half memory usage
for many situations.
* add planets viewer builtin
* Remove print statement
* Don't use fzf & echo
* Add all planets as files and refactor accordingly
* Remove planets.lua
* add the moon
* example ofe how to do this without ls everywhere
* fix rebase and update to new style
Co-authored-by: TJ DeVries <devries.timothyj@gmail.com>