Commit Graph

72 Commits

Author SHA1 Message Date
JINNOUCHI Yasushi
ada91ca486
feat!: remove code for SQLite (#172)
* feat!: remove code for SQLite

ref [Introduce revised telescope-frecency.nvim : neovim](https://www.reddit.com/r/neovim/comments/174m8zu/introduce_revised_telescopefrecencynvim/)

I have deprecated SQLite features 4 months ago. It is the time to remove
code for them.

* test: fix test to load telescope validly

* test: remove sqlite.lua from CI settings

* test: test database as native

* fix: add lacked type from old database/sqlite.lua

* docs: remove description for SQLite3 logic

* chore: fix types

* chore: add types for Database:raw_table
2024-01-30 18:26:07 +09:00
JINNOUCHI Yasushi
a3e818d001
fix: fix joining paths in Windows (#168)
* fix: use plenary.path to manage paths in Windows

* fix: filter out paths validly in Windows

* fix: detect default `ignore_patterns` in Windows

fix: #169

* fix: join paths validly in Windows

* docs: fix value for `ignore_patterns` in Windows

* fix: avoid duplication of separators in paths

Fix: #171
This fixes only in native logic. The one with SQLite has still bugs.
……but that may not be fixed.
2024-01-28 15:52:47 +09:00
JINNOUCHI Yasushi
1189184484
fix!: no confirm always when db_safe_mode is off (#162)
* fix!: no confirm always when `db_safe_mode` is off

Fix: #50
Fix: #167

Before this, `db_safe_mode = false` makes it no confirmation in
`:FrecencyValidate!`, but it still does in `:FrecencyValidate` and the
auto validation in Neovim's startup.

After this commit, `db_safe_mode = false` makes it no confirmation
always when you see.

And `force` option in `Frecency:validate_database(force)` now means
weather it should remove files less than threshold.

* docs: add notes for lacked options
2024-01-22 22:34:02 +09:00
JINNOUCHI Yasushi
b57930bfaa
fix: add fallback for v0.9 that has no vim.system (#159)
* fix: add fallback for v0.9 that has no vim.system

* docs: remove note for NUL character delimiters
2024-01-01 01:24:46 +09:00
JINNOUCHI Yasushi
da7c724e3c
List up entries for workspace files by rg or fd (#156)
* feat: read workspace files by external commands

* fix: avoid errors when it manages invalid buffers

* feat: add workspace_scan_cmd to select a way

* docs: describe `workspace_scan_cmd` option
2024-01-01 00:12:17 +09:00
JINNOUCHI Yasushi
ca5fa5326f
feat: add an command to delete an entry from DB (#152)
* feat: add an command to delete an entry from DB

Fix #151

* test: add tests for frecency:delete()

* docs: add note for FrecencyDB
2023-11-24 10:51:36 +09:00
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
fbda5d91d6
docs: fix link (#139) 2023-08-27 19:06:43 +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
Dmitrii
484ee36613
docs(readme): devicons_disabled -> disable_devicons (#132) 2023-08-25 17:52:34 +09:00
Maxim Yurevich
3ddaaa0a60
docs(readme): add lazy.nvim installation guide (#96) 2023-06-10 14:45:57 +09:00
JINNOUCHI Yasushi
0a4a521471
refactor!: do nothing until calling setup() (#80)
* Use Lua function to complete tags

* Use Lua func to define validating command

* Use new API's to define options & mappings

* Add not for usage of `FrecencyValidate`
2023-04-11 11:16:52 +09:00
Rohan Orton
5140a6ed87
Fix broken Frecency Algorithm link in README.md (#82)
MDN appear to have removed the Frecency Algorithm page linked in the README document. Updating link to use archived version.
2022-11-06 13:38:46 +01:00
JINNOUCHI Yasushi
9634c3508c
Enable to specify tags to show the tails (#77)
* Enable to specify tags to show the tails

* Add doc for show_filter_column
2022-09-27 21:09:50 +02:00
Lucas Hoffmann
d51c7631dc
Update url for sqlite dependency (#64)
The old repository on github redirects to this one.
2022-09-06 07:47:32 +02:00
Munif Tanjim
32f4b59ea1
feat: support opts.workspace (#68) 2022-08-12 15:42:45 +02:00
James Hiew
ea44b316f4
feat: add default_workspace setting (#43) 2021-11-23 19:07:11 +01:00
tami5
cf3a1deb9c
follow sqlite new release (#40)
* refactor(sql_wrapper): follow sqlite new release

* update readme
2021-09-01 08:36:12 +03:00
Anshuman Medhi
f8cf92a637
doc(readme): fix packer install instructions (#34)
Co-authored-by: tami5 <65782666+tami5@users.noreply.github.com>
2021-08-22 03:49:34 +03:00
premell
f32d417831
doc(readme): update config example (#33)
remove comma causing error.
2021-08-21 00:52:16 +03:00
Senghan Bright
31e8158d54 docs: add missing comma in config example 2021-08-04 23:51:59 +02:00
Senghan Bright
a236fccbee docs: add devicons link 2021-08-04 22:01:34 +02:00
Senghan Bright
3da05c8744 docs: fix readme 2021-08-04 20:38:36 +02:00
Senghan Bright
4edeb980e5 docs: fix readme parameter quoting 2021-08-04 20:37:31 +02:00
Senghan Bright
5dc0cb42d8 docs: update README to match recently added config parameters 2021-08-04 20:35:43 +02:00
Senghan Bright
69c3255d31 add disable_devicons parameter to example config. 2021-08-04 20:28:11 +02:00
Senghan Bright
f7ee2172da docs: update read me with db_root information. 2021-08-04 10:58:51 +02:00
Senghan Bright
f7261e9cb5 chore: Documentation for database validation. 2021-08-04 09:21:48 +02:00
Senghan Bright
b0ca43d7d6 chore: Add requires "sql.nvim" guard in packer config example 2021-08-04 08:51:37 +02:00
Senghan Bright
a5803b6755
Update README.md 2021-02-04 00:02:55 +01:00
Senghan Bright
284699afe1 update readme 2021-02-02 11:43:49 +01:00
Senghan Bright
6db89f20b3 update readme 2021-02-02 11:33:36 +01:00
Senghan Bright
93904dd90f . 2021-02-02 11:28:00 +01:00
Senghan Bright
b2ceef1572 . 2021-02-02 11:27:17 +01:00
Senghan Bright
feb7bcaf06 . 2021-02-02 11:26:32 +01:00
Senghan Bright
7ef31cbaf7 . 2021-02-02 11:26:03 +01:00
Senghan Bright
4ff080c5aa add gif for frecency workspaces 2021-02-02 11:23:30 +01:00
Senghan Bright
7afdd3c32c
Feature: filtered workspaces
* draft implementation of tags/filters

* .

* add filtering:

- extended substring sorter to have modes:
- when current string is prefixed by `:foo`, results are tag_names that
come from tags/workspaces table. (if `:foo ` token is incomplete it is
ignored)
- when a complete workspace tag is matched ':foobar:', results are
indexed_files filtered by if their parent_dir is a descendant of the
workspace_dir
- a recursive scan_dir() result is added to the  :foobar: filter
results; any non-indexed_files are given a score of zero, and are
alphabetically sorted below the indexed_results

- tab completion for tab_names in insert mode`:foo|` state: cycles
through available options

* add completion file

* use attach_mappings for <CR> map

* stop completion being enabled multiple times

* improve keys

* improve completion cancellation

* add dynamic `lsp` tag

* add dynamic `lsp` tag

* fix empty lsp workspaces

* remove hardcoded workspaces and allow config from ext_config

* add filter highlight and some fixes

* .

* add workspace filters to readme

* wip LSP workspace filter

* merge ignore_patterns fix

* change LSP_ROOT tagname to LSP

* fix setting default values

* .

* update readme with filter instructions

* remove debug message

* improve relative paths

* improve relative paths

* WIP dynamic column sizes

* WIP filter_column_width

* fix keymaps

* .

* feat: persistent filters

* refactor config creation

* fix: filter directory column autosize

* improve LSP workspace paths

* .

* remove workspace filter output

* cache persistent filter results

* fix cached results

* .

* remove results cache; sorting is the expensive part

* respect ignore patterns for non-indexed files.

* return table on on_input_filter_cb
2021-01-28 22:45:04 +01:00
Senghan Bright
4f410348ff update repo location in install instructions 2021-01-17 22:06:28 +01:00
Senghan Bright
6e9ec0a86e update readme 2021-01-17 19:57:25 +01:00
Senghan Bright
244eae6971 update readme 2021-01-17 19:50:50 +01:00
Senghan Bright
1db3bb17aa update readme 2021-01-17 19:47:44 +01:00
Senghan Bright
50869b5f55 automatically remove stale entries from db 2021-01-17 16:51:43 +01:00
Senghan Bright
07b569ab03 update readme 2021-01-17 13:35:12 +01:00
Senghan Bright
c977ea5a46 update readme 2021-01-17 13:17:37 +01:00
Senghan Bright
73c48b2099 update readme 2021-01-17 11:11:35 +01:00
Senghan Bright
e71670b0a7 . 2021-01-17 10:59:09 +01:00
Senghan Bright
639fcff3b2 . 2021-01-17 10:58:19 +01:00
Senghan Bright
6e7685fc0c . 2021-01-17 10:57:10 +01:00