Commit Graph

6 Commits

Author SHA1 Message Date
JINNOUCHI Yasushi
a03eb9b78a
fix!: show debug msg only when debug is true (#220)
* docs: fix the format for some docs

* fix!: show debug msg only when `debug` is `true`

Fix #212

* test: enable debug logging in tests
2024-07-06 19:13:39 +09:00
JINNOUCHI Yasushi
8783a062f7
fix: make the path for file_lock unless it exists (#205) 2024-05-25 21:24:30 +09:00
JINNOUCHI Yasushi
2a22815b09
Simplify code with using frecency.config (#189)
* chore: change the position of `?`

* fix: use config module to simplify code

* test: fix tests to use frecency.config

* test: remove macOS with nightly Neovim temporarily
2024-03-25 18:45:45 +09:00
JINNOUCHI Yasushi
9126d6bc0c
fix: fix type names to avoid conflicting (#186) 2024-03-23 16:49:39 +09:00
JINNOUCHI Yasushi
de41070181
fix: get file lock forcibly (#153)
* fix: get file lock forcibly

When Neovim ends without removing file locks, it will fail to open
frecency ever because file locks remain. This fix makes it remove file
locks when all attempts fail forcibly.

* test: avoid error in Windows

In Windows, unclosed file cannot be removed, so close it before
unlinking.

* feat: retry to unlink when it fails
2023-12-03 12:55:37 +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