mirror of
https://github.com/kristoferssolo/telescope-frecency.nvim.git
synced 2025-10-21 20:10:38 +00:00
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
This commit is contained in:
parent
9c18474d0a
commit
1189184484
18
README.md
18
README.md
@ -155,11 +155,25 @@ available tags.
|
|||||||
|
|
||||||
See [default configuration](https://github.com/nvim-telescope/telescope.nvim#telescope-defaults) for full details on configuring Telescope.
|
See [default configuration](https://github.com/nvim-telescope/telescope.nvim#telescope-defaults) for full details on configuring Telescope.
|
||||||
|
|
||||||
|
- `auto_validate` (default: `true`)
|
||||||
|
|
||||||
|
If `true`, it removes stale entries count over than `db_validate_threshold`. See
|
||||||
|
the note for [DB maintenance](#maintainance)
|
||||||
|
|
||||||
- `db_root` (default: `vim.fn.stdpath "data"`)
|
- `db_root` (default: `vim.fn.stdpath "data"`)
|
||||||
|
|
||||||
Path to parent directory of custom database location. Defaults to
|
Path to parent directory of custom database location. Defaults to
|
||||||
`$XDG_DATA_HOME/nvim` if unset.
|
`$XDG_DATA_HOME/nvim` if unset.
|
||||||
|
|
||||||
|
- `db_safe_mode` (default: `true`)
|
||||||
|
|
||||||
|
If `true`, it shows confirmation dialog by `vim.ui.select()` before validating
|
||||||
|
DB. See the note for [DB maintenance](#maintainance).
|
||||||
|
|
||||||
|
- `db_validate_threshold` (default: `10`)
|
||||||
|
|
||||||
|
It will removes over than this count in validating DB.
|
||||||
|
|
||||||
- `default_workspace` (default: `nil`)
|
- `default_workspace` (default: `nil`)
|
||||||
|
|
||||||
Default workspace tag to filter by e.g. `'CWD'` to filter by default to the
|
Default workspace tag to filter by e.g. `'CWD'` to filter by default to the
|
||||||
@ -170,6 +184,10 @@ See [default configuration](https://github.com/nvim-telescope/telescope.nvim#tel
|
|||||||
|
|
||||||
Disable devicons (if available)
|
Disable devicons (if available)
|
||||||
|
|
||||||
|
- `filter_delimiter` (default: `":"`)
|
||||||
|
|
||||||
|
Delimiters to indicate the filter like `:CWD:`.
|
||||||
|
|
||||||
- `ignore_patterns` (default: `{ "*.git/*", "*/tmp/*", "term://*" }`)
|
- `ignore_patterns` (default: `{ "*.git/*", "*/tmp/*", "term://*" }`)
|
||||||
|
|
||||||
Patterns in this table control which files are indexed (and subsequently
|
Patterns in this table control which files are indexed (and subsequently
|
||||||
|
|||||||
@ -180,7 +180,7 @@ function Frecency:validate_database(force)
|
|||||||
self.database:remove_files(unlinked)
|
self.database:remove_files(unlinked)
|
||||||
self:notify("removed %d missing entries.", #unlinked)
|
self:notify("removed %d missing entries.", #unlinked)
|
||||||
end
|
end
|
||||||
if force and not self.config.db_safe_mode then
|
if not self.config.db_safe_mode then
|
||||||
remove_entries()
|
remove_entries()
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user