38 Commits

Author SHA1 Message Date
Marskey
dc192faceb feat: add searching indicator (#1717) (#2637) 2023-08-07 17:10:24 +00:00
Simon Hauser
19e8a8ae8b fix(finder): followup to #2442, make sure entry is not nil (#2526) 2023-05-24 14:13:50 +02:00
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
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
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
oberblastmeister
253d3aaa6b added a new DynamicFinder (which can be used with rust_analyzer) (#705)
* 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
2021-04-13 14:39:14 -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
Senghan Bright
9d4670c748 feat: allow a callback to be called on on_lines update (for filtering tags from query text) (#455)
* 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>
2021-01-28 16:39:05 -05:00
Simon Hauser
313ce9d0b6 fix: live_grep will now accept cwd (#390) 2021-01-04 22:01:03 +01:00
Simon Hauser
141dc6d55e ci: Add luacheck ci job (#317)
* Add luacheck ci job

* Fix most of the linting issues

* fixup: lint

Co-authored-by: TJ DeVries <devries.timothyj@gmail.com>
2020-12-09 15:46:41 -05:00
TJ DeVries
2ce3ad61aa fix: #140 2020-10-08 22:53:44 -04:00
TJ DeVries
3cf3acc4d5 feat: Add scroll_strategy = 'cycle' 2020-10-08 22:47:22 -04:00
TJ DeVries
59497d6640 feat: Do a bit better sorting for command history
To be honest, I'm not 100% sure this is fantastic, but it's definitely a
step in the right direction for command history.

Closes: #150
2020-10-08 22:31:44 -04:00
TJ DeVries
ae7fd0d27a feat: Add status, better debug, and some associated refactors
* [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
2020-09-29 22:52:38 -04:00
TJ DeVries
25b7895097 feat: Disable job recording from plenary.
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.
2020-09-21 15:41:38 -04:00
TJ DeVries
d96d89711c feat: add a bit better writer support 2020-09-11 14:36:57 -04:00
TJ DeVries
382c491380 feat: Add some more layout options 2020-09-11 00:14:40 -04:00
smolck
2592586533 View the planets (#12)
* 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>
2020-09-06 23:07:51 -04:00
TJ DeVries
14310ee6b1 fix: Don't push past midnight. You'll make clason's stuff break :/ 2020-09-04 09:49:10 -04:00
TJ DeVries
839f57efb3 feat: Major improvements in API. Particularly relating to entries. 2020-09-03 23:56:49 -04:00
TJ DeVries
b04ec331c4 feat: Add cool mapping for <C-R> in command mode 2020-09-03 11:18:08 -04:00
TJ DeVries
d48a2933d5 fix: clear last line 2020-09-02 19:11:38 -04:00
TJ DeVries
061307233c feat: add some new items and make mappings easier 2020-09-02 00:06:07 -04:00
TJ DeVries
8c5bf8c746 wip: Messing around w/ ffi for some stuff 2020-08-31 18:12:51 -04:00
TJ DeVries
e38589f265 feat: Combine configuration into picker.new() 2020-08-31 17:32:31 -04:00
smolck
450574df47 Revert finders.lua change 2020-08-31 16:47:28 -04:00
smolck
21474b586c Add FZF builtin for searching vim.v.oldfiles 2020-08-31 16:47:28 -04:00
TJ DeVries
6b066cf9e8 feat: Add better mapping support 2020-08-31 00:06:53 -04:00
TJ DeVries
6a75a0b6d3 fix: but I don't like that I fixed by scheduling... Seems race condition 2020-08-29 23:08:30 -04:00
TJ DeVries
9bb62777b2 fix: Think I fixed the weird movements 2020-08-29 22:55:48 -04:00
TJ DeVries
7e9f38a87e feat: Add livegrep and lsp referecnes 2020-08-27 22:12:47 -04:00
TJ DeVries
cfddae42f5 WIP: Actually get the UI to work and add some tests 2020-08-20 23:41:53 -04:00
TJ DeVries
96cac0a8c8 Work on ngram sorter 2020-08-03 20:40:04 -04:00
TJ DeVries
fa0382d93e Streamed some refactoring. More work to do 2020-07-31 00:05:22 -04:00
TJ DeVries
ababfbfd88 Another stream 2020-07-17 00:03:20 -04:00
TJ DeVries
c6f0142fc6 Get simple rg example to work 2020-07-15 17:53:30 -04:00