mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-07-24 04:34:34 +02:00
fix(options): don't lower timeoutlen when in VS Code (#2568)
Avoid lowering timeoutlen when running in VS Code, to avoid unwanted timeouts from key mappings. The lower value of 300ms (down from Neovim's default of 1000ms) works great outside of VS Code, where it helps trigger the which-key UI quickly, and where which-key prevents timeouts from occuring. But in VS Code (where which-key isn't applicable), the lower value makes it difficult to perform some key mappings in time, such as `]p`, which requires shifting hand position.
This commit is contained in:
parent
16d6ac234a
commit
29ed06e000
1 changed files with 3 additions and 1 deletions
|
@ -49,7 +49,9 @@ opt.splitkeep = "screen"
|
|||
opt.splitright = true -- Put new windows right of current
|
||||
opt.tabstop = 2 -- Number of spaces tabs count for
|
||||
opt.termguicolors = true -- True color support
|
||||
opt.timeoutlen = 300
|
||||
if not vim.g.vscode then
|
||||
opt.timeoutlen = 300 -- Lower than default (1000) to quickly trigger which-key
|
||||
end
|
||||
opt.undofile = true
|
||||
opt.undolevels = 10000
|
||||
opt.updatetime = 200 -- Save swap file and trigger CursorHold
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue