telescope-frecency.nvim
telescope-frecency.nvim copied to clipboard
Using `:CWD:` as workspace is very slow
Following the suggestion in the configuration section of the readme to set default_workspace
to :CWD:
introduces ~2 seconds of loading before the results are shown. The same behavior can be observed when using the default configuration and typing :CWD:
in the frecency prompt.
Do you see the same thing with setting it to juts CWD
? That is what the README currently says, and I'm not seeing a delay when using it.
How do you set default_workspace
exactly? In #55 it seems not to work no matter what I try.
This is what I have:
require("telescope").setup({
extensions = {
frecency = {
default_workspace = "CWD",
show_filter_column = false,
},
},
})
I'm also having this issue. I've tried calling :Telescope frecency workspace=CWD
and setting the default_workspace = "CWD"
. Both are slow.
This problem is because show_unindexed
is true
in default. When it is true
, it adds all files found in the workspace.
https://github.com/nvim-telescope/telescope-frecency.nvim/blob/65a7d89eb8ee1a8ac9e88f0eb6d30fa766d21269/lua/telescope/_extensions/frecency/db_client.lua#L164-L176
When you launch Neovim in your home directory, it scans huge amount of files and takes long time. I think you should set show_unindexed = false
if you use default_workspace = 'CWD'
.
And you may have interests to move cwd automatically when editing files, such as using ahmedkhalf/project.nvim.
https://github.com/nvim-telescope/telescope-frecency.nvim/issues/52#issuecomment-1256902653 thanks @delphinus, closing