Commit Graph

10 Commits

Author SHA1 Message Date
JINNOUCHI Yasushi
daf59744f6
feat!: make use_sqlite = false be the default (#148)
* refactor: load lazily sqlite to get filename

* feat: add logic to start migration automatically

* feat: make use_sqlite = false be the default

* docs: update README for removing dependencies

* feat: migrate silently when use_sqlite = false

* chore: remove `SQLite3` from messages

* test: run again max to 5 times in Windows
2023-10-10 18:17:08 +09:00
JINNOUCHI Yasushi
2119da4e3d
feat: add max_timestamps option (#145)
To set recency count. Fix #144
2023-09-17 17:02:58 +09:00
JINNOUCHI Yasushi
767fbf074f
feat: check DB file has been changed (#143)
* refactor: unite logic for finder & async_finder

* chore: fix types

* chore: add sleep to show results at first

* refactor: fix to find results separatedly

* test: remove unnecessary ones and fix others

* test: add matrix for 0.9.x & Windows

* test: use forked plenary.log for Windows

* test: fix to use strptime in Windows

* test: run again if segmentation fault in Windows

* test: loosen timeout for Perl

* test: use the latest plenary.nvim again

* chore: fix types

* chore: change variable name

* feat: watch changes of DB to reload

* chore: add comments to steps

* test: copy whole modules for testing in Windows

* fix: make valid paths for Windows

* test: add tests for Native

* test: use robust way to calculate time

vim.fn.strptime cannot be used in Lua loop

* chore: fix comments

* refactor: simplify the code

* test: loosen condition to detect failures

* test: disable some logging

Many loggings make the test fail.

* test: run tests sequentially in Windows

* test: loosen timeout not to fail on Windows
2023-09-17 15:21:01 +09:00
JINNOUCHI Yasushi
9037d696e6
feat: add logic to store data by native code (#130)
* refactor: make logic for Database be abstract
* feat: add logic for DB by string.dump
* fix: run with async.void to run synchronously
* test: add tests for native feature
* feat!: sort candidates by path when score is same
  This is needed because candidates from SQLite is sorted by id, but ones from native is sorted by path.
* chore: clean up types
* feat: add lock/unlock feature to access DB
* test: use async version of busted
  And disable benchmark tests (fix later)
* test: add tests for file_lock
* chore: use more explicit names
* chore: use plenary.log instead
* fix: wait async functions definitely
* feat: add migrator
* chore: fix logging
* fix: detect emptiness of the table
* fix: deal with buffer with no names
* test: loosen the condition temporarily
* test: add tests for migrator
* fix: return true when the table is not empty
* feat: load sqlite lazily not to require in start
* chore: add logging to calculate time for fetching
* feat: add converter from native code to SQLite
* feat: warn when sqlite.lua is not available
* feat: add FrecencyMigrateDB to migrate DB
* docs: add note for native code logic
* test: ignore type bug
2023-08-27 18:51:16 +09:00
JINNOUCHI Yasushi
5d1a01be63
fix: use more gentle one for TelescopeBufferLoaded (#136) 2023-08-26 06:43:01 +09:00
JINNOUCHI Yasushi
e7825aaf57
feat: set default highlights (#135) 2023-08-25 23:17:04 +09:00
JINNOUCHI Yasushi
3aee7e0c6b
feat: deal with configs in setup() (#127) 2023-08-13 23:58:17 +09:00
JINNOUCHI Yasushi
07e0f87ebd
refactor: remove logic for caching feature (#126)
It can get candidates sufficiently fast with the current logic. Remove logic
for caching feature that still remained.

----

NOTE: My box has a DB containing 1284 files and 2973 timestamps.
`:Telescope frecency` takes around 20 milliseconds on average.
2023-08-13 15:15:35 +09:00
JINNOUCHI Yasushi
0615dd6343
fix: deal with the case called with no opts (#113) 2023-08-07 07:19:29 +09:00
JINNOUCHI Yasushi
1f32091e2b
refactor!: use OO & add tests (#100)
* I did an overhall for all codes and added typing by Lua-language-server and tests. It also works on CI.
* Now it searches files on the workspace completely asynchronously. It does not block your text input. (Fix #106)
Make count = 1 when you open a file you've never opened (Fix #107)
2023-08-06 16:02:37 +09:00