* feat: call init process before telescope loading
Fix#231
This changes enable to load frecency without telescope's loading itself.
This is needed when you want to load telescope lazily, but want to start
registering process as soon as Neovim has started.
```lua
{
"nvim-telescope/telescope-frecency.nvim",
main = "frecency",
---@type FrecencyOpts
opts = {
db_safe_mode = false,
},
},
{
"nvim-telescope/telescope.nvim",
-- `cmd` opts makes lazy.nvim load telescope.nvim lazily.
cmd = { "Telescope" },
config = function()
local telescope = require "telescope"
telescope.setup {
extensions = {
other_extension = {
foo_bar = true,
},
-- Here you need no configuration opts for frecency because
-- you've already done.
}
}
-- This is still needed.
telescope.load_extension "frecency"
end,
},
```
* docs: add note for loading telescope.nvim lazily
* refactor: use vim.pesc instead of implementing
* feat: add optional func to ignore in registering
* test: add tests for ignore_register function
* docs: add note for `ignore_register` option
* docs: add note for use case of `ignore_patterns`
* feat: add function to query the DB
* docs: add documentation for frecency.query()
* test: fix tests to run with `timestamps` property
* test: add tests for frecency.query()
* 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
* fix!: change timing for initialization
fix#109fix#59
This fixes problems below.
* Auto-validation feature is called at Neovim starting.
- → Now it starts at `:Telescope frecency` called at the first time.
* `frecency.setup()` is called every when `:Telescope frecency` is
called.
- → Now it is called only once.
* `telescope.setup()` calls `frecency.new()` and it reads the database.
This causes time in executing `init.lua`.
- → Now it reads the database lazily. It reads at the first time when
needed.
* test: change logic to initialize config
* test: make Neovim version newer in CI
* I did an overhall for all codes and added typing by Lua-language-server and tests. It also works on CI.
* Now it searches files on the workspace completely asynchronously. It does not block your text input. (Fix#106)
Make count = 1 when you open a file you've never opened (Fix#107)