update readme

This commit is contained in:
Senghan Bright 2021-01-17 13:35:12 +01:00
parent c977ea5a46
commit 07b569ab03

View File

@ -1,8 +1,8 @@
# telescope-frecency.nvim # telescope-frecency.nvim
Frecency is a [telescope.nvim](https://github.com/nvim-telescope/telescope.nvim) extension that offers a more intelligent way to select files from your editing history. A [telescope.nvim](https://github.com/nvim-telescope/telescope.nvim) extension that offers intelligent prioritization when selecting files from your editing history.
Using an implementation of Mozilla's [Frecency algorithm](https://developer.mozilla.org/en-US/docs/Mozilla/Tech/Places/Frecency_algorithm), files edited _frecently_ are given higher precedence in the list index. Using an implementation of Mozilla's [Frecency algorithm](https://developer.mozilla.org/en-US/docs/Mozilla/Tech/Places/Frecency_algorithm) (used in [Firefox's address bar](https://support.mozilla.org/en-US/kb/address-bar-autocomplete-firefox)), files edited _frecently_ are given higher precedence in the list index.
As the extension learns your editing habits over time, the sorting of the list is dynamically altered to priotize the files you're likely to need. As the extension learns your editing habits over time, the sorting of the list is dynamically altered to priotize the files you're likely to need.
<img src="https://raw.githubusercontent.com/sunjon/images/master/gh_readme_telescope_frecency.png" alt="screenshot" width="800"/> <img src="https://raw.githubusercontent.com/sunjon/images/master/gh_readme_telescope_frecency.png" alt="screenshot" width="800"/>
@ -11,9 +11,9 @@ As the extension learns your editing habits over time, the sorting of the list i
## Frecency: sorting by "frequency" and "recency" ## Frecency: sorting by "frequency" and "recency"
Frecency is a score given to each unique file loaded into a Neovim buffer. 'Frecency' is a score given to each unique file indexed in a file history database.
A timestamp is recorded to a database on each file load. A timestamp is recorded to once per session when a file is loaded into a buffer.
The score is calculated using the age of the 10 most recent timestamps and the total amount of times the file has been loaded: The score is calculated using the age of the 10 most recent timestamps and the total amount of times the file has been loaded:
@ -71,5 +71,4 @@ lua require("telescope").extensions.frecency.frecency(opts)
## References ## References
- [Mozilla Frecency algorithm](https://developer.mozilla.org/en-US/docs/Mozilla/Tech/Places/Frecency_algorithm) - [Mozilla: Frecency algorithm](https://developer.mozilla.org/en-US/docs/Mozilla/Tech/Places/Frecency_algorithm)
- [Stack Engineering: A faster smarter quick switcher](https://slack.engineering/a-faster-smarter-quick-switcher/)