oil.nvim icon indicating copy to clipboard operation
oil.nvim copied to clipboard

feature request: Configuration option to override the usage of timeoutlen

Open s1n7ax opened this issue 1 year ago • 1 comments
trafficstars

Did you check existing requests?

  • [X] I have searched the existing issues

Describe the feature

I don't know if this is just neovim or oil.nvim using it. But when the timeoutlen is set, oil.nvim wait till timeout is passed to update the tree. For example, show and hide hidden files. It's fine as long as oil.nvim is the only plugin that uses this but plugins like which-key is also using to set the pop up window delay. Now, if someone wants to oil.nvim to act immediately but want to keep the delay of which-key, it's not possible(AFAIK).

Maybe one of following is a good option?

timeout = timeout or vim.o.timeoutlen

OR

timeout = timeout or 500

Provide background

I want oil.nvim to react to things like toggle hidden files at the same time which-key to show the pop up after 1 second.

Additional details

No response

s1n7ax avatar Nov 26 '23 07:11 s1n7ax

We're not doing anything specific with timeoutlen. Do you have multiple keybindings for those actions? For example, if you're having delay with g., what is the output of :nmap g.?

stevearc avatar Dec 01 '23 16:12 stevearc

On my side, I do have multiple keybinds associated to some keys like <cr> and <bs>. Although in the context of oil.nvim, I do not care about using these keys.

The problem is that with a large timeoutlen (as I use), the experience then becomes quite painful. Perhaps my expectation is wrong, but wouldn't it make more sense that if those keys bound to the oil filetype, they should not see any delay? That seems to be the experience with most nvim plugins I have encountered.

For example, here I am using <cr> in both neo-tree and oil.nvim afterwards: https://github.com/stevearc/oil.nvim/assets/7985687/646ff0ea-7a3f-4c59-b884-b953cc0cb21c

In my case, I would indeed benefit from being able to override the usage of timeoutlen. Perhaps I could remove/restore all keybinds being used in oil.nvim, but that seems a bit painful and inefficient.

jemag avatar May 20 '24 21:05 jemag

I don't have this issue anymore.

s1n7ax avatar May 21 '24 04:05 s1n7ax