telescope-frecency.nvim icon indicating copy to clipboard operation
telescope-frecency.nvim copied to clipboard

Using `:CWD:` as workspace is very slow

Open HoldenLucas opened this issue 2 years ago • 3 comments

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.

HoldenLucas avatar Dec 20 '21 19:12 HoldenLucas

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.

technicalpickles avatar Jul 02 '22 15:07 technicalpickles

How do you set default_workspace exactly? In #55 it seems not to work no matter what I try.

lucc avatar Jul 29 '22 07:07 lucc

This is what I have:

require("telescope").setup({
    extensions = {
        frecency = {
            default_workspace = "CWD",
            show_filter_column = false,
        },
    },
})

technicalpickles avatar Jul 29 '22 15:07 technicalpickles

I'm also having this issue. I've tried calling :Telescope frecency workspace=CWD and setting the default_workspace = "CWD". Both are slow.

kamalarieff avatar Sep 06 '22 18:09 kamalarieff

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'.

delphinus avatar Sep 24 '22 08:09 delphinus

And you may have interests to move cwd automatically when editing files, such as using ahmedkhalf/project.nvim.

delphinus avatar Sep 24 '22 08:09 delphinus

https://github.com/nvim-telescope/telescope-frecency.nvim/issues/52#issuecomment-1256902653 thanks @delphinus, closing

HoldenLucas avatar Oct 14 '22 18:10 HoldenLucas