Commit Graph

12 Commits

Author SHA1 Message Date
Stef
0b891ec934 fix: always add index to entry (#2442)
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.
2023-05-24 11:29:36 +02:00
Michał Nowotnik
12c08bfde7 fix: make_entry.gen_from_string is a factory and needs to be called (#2116) 2022-08-13 11:15:59 +02:00
Fabian David Schmidt
ef9137d85c feat: refine with new_table 2022-07-01 18:13:25 +02:00
Simon Hauser
234066f875 fix: man_pages previewer, respecting MANPATH and apropos output parsing (#1764)
- introducing putils writer and use it rather than using PAGER env var
- introducing env for lua/telescope/_.lua job interface
  - to respect MANPATH (and PATH just in case)
- fix for apropos output parsing might return e.g. `alacritty, Alacritty`
  We need to split on first `,`
2022-03-10 13:48:40 +01:00
fdschmidt93
627d89c959 fix(oneshot_finder): generate entries for passed result (#1602) 2021-12-27 09:45:34 +01:00
fdschmidt93
9d7d322f85 feat: allow initial results in async_oneshot_finder (#1461) 2021-12-03 15:36:48 +01:00
TJ DeVries
dea927d0eb feat: Add scrolling through results (#1232)
* some scrollin

* [WIP]: Fri 10 Sep 2021 02:24:20 PM EDT

* ok, I think scrolling works

* change to 1000 for now, dont need to scroll that far :)
2021-10-08 10:56:01 -04:00
Simon Hauser
4380e453ca fix: default make_entry (#1239)
from_string doesnt exist. Its called gen_from_string
2021-09-13 21:49:13 +02:00
TJ DeVries
4f91ffcbab fix: Close async oneshot jobs on finder:close (#1140) 2021-08-20 14:41:52 -04:00
TJ DeVries
a97af306c4 feat(performance): Major performance improvements using async v2 from @oberblastmeister (#987)
* start: Working w/ async jobs

* short circuit to using bad finder if you pass writer.
2021-08-20 11:11:24 -04:00
Simon Hauser
79644ab677 chore: use stylua for formatting (#1040)
* chore: stylua job and config

* reformat with stylua
2021-07-23 11:42:37 -04:00
TJ DeVries
64e59060b1 feat: asyncify pickers - except for live_grep (#709)
* 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
2021-04-08 10:35:44 -04:00