Skip to content

Commit

Permalink
Fix timeoutlen for mini.clue
Browse files Browse the repository at this point in the history
  • Loading branch information
lvim-tech committed Aug 9, 2023
1 parent 580675f commit e209b71
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions lua/modules/base/configs/ui/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -994,6 +994,7 @@ config.mini_clue = function()
"prompt",
"help",
"quickfix",
"nofile",
}
local filetypes = {
"neo-tree",
Expand All @@ -1017,16 +1018,21 @@ config.mini_clue = function()
"toggleterm",
"netrw",
"noice",
"lazy",
"mason",
"LvimHelper",
}
vim.api.nvim_create_autocmd("BufEnter, WinEnter", {
vim.api.nvim_create_autocmd({ "BufEnter", "WinEnter" }, {
callback = function()
local buftype = vim.tbl_contains(buftypes, vim.bo.buftype)
local filetype = vim.tbl_contains(filetypes, vim.bo.filetype)
if buftype or filetype then
vim.opt.timeoutlen = 1000
else
vim.opt.timeoutlen = 0
end
vim.schedule(function()
local buftype = vim.tbl_contains(buftypes, vim.bo.buftype)
local filetype = vim.tbl_contains(filetypes, vim.bo.filetype)
if buftype or filetype then
vim.opt.timeoutlen = 1000
else
vim.opt.timeoutlen = 0
end
end)
end,
group = group,
})
Expand Down

0 comments on commit e209b71

Please sign in to comment.