mirror of
https://github.com/kristoferssolo/telescope-frecency.nvim.git
synced 2025-10-21 20:10:38 +00:00
update readme
This commit is contained in:
parent
aa93b2f8e6
commit
1db3bb17aa
54
README.md
54
README.md
@ -44,30 +44,64 @@ This plugin uses `sql.nvim` to perform the database transactions.
|
||||
|
||||
## Installation
|
||||
|
||||
TODO: add installation instructions for other package managers
|
||||
### [Packer.nvim](https://github.com/wbthomason/packer.nvim)
|
||||
|
||||
```
|
||||
```lua
|
||||
use {
|
||||
"sunjon/telescope-frecency",
|
||||
config = function()
|
||||
require"telescope".load_extension("frecency")
|
||||
end
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
_TODO: add installation instructions for other package managers_
|
||||
|
||||
If no database is found when running Neovim with the plugin installed, a new one is created and entries from `shada` `v:oldfiles` are automatically imported.
|
||||
|
||||
## Configuration
|
||||
|
||||
Function for keymaps
|
||||
|
||||
```lua
|
||||
lua require("telescope").extensions.frecency.frecency(opts)
|
||||
```
|
||||
## Commands and Function
|
||||
|
||||
```
|
||||
:Telescope frecency
|
||||
```
|
||||
..or to map to a key:
|
||||
|
||||
```lua
|
||||
vim.api.nvim_set_keymap("n", "<leader><leader>", "<Cmd>lua require('telescope').extensions.frecency.frecency()<CR>", {noremap = true, silent = true})
|
||||
```
|
||||
|
||||
## Configuration
|
||||
|
||||
See [default configuration](https://github.com/nvim-telescope/telescope.nvim#telescope-defaults) for full details on configuring Telescope.
|
||||
|
||||
- `ignore_patterns`
|
||||
|
||||
This setting controls which files are indexed (and subsequently which you'll see in the finder results).
|
||||
|
||||
- `show_scores`
|
||||
|
||||
To see the scores generated by the algorithm in the results, set this to `true`.
|
||||
|
||||
|
||||
If you've not configured the extension, the following values are used:
|
||||
|
||||
```
|
||||
telescope.setup {
|
||||
extensions = {
|
||||
frecency = {
|
||||
show_scores = false,
|
||||
ignore_patterns = {"*.git/*", "*/tmp/*"},
|
||||
}
|
||||
},
|
||||
}
|
||||
```
|
||||
|
||||
### Highlight Groups
|
||||
|
||||
```vim
|
||||
TelescopePathSeparator
|
||||
TelescopeBufferLoaded
|
||||
```
|
||||
|
||||
## References
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user