Skip to content

Commit 49abdb4

Browse files
committed
fix #1519: disable completion in *only* shell command mode
When inside of git bash or WSL on windows, you may experience a hang with shell commands.
1 parent 6ba2408 commit 49abdb4

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

init.lua

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -857,6 +857,12 @@ require('lazy').setup({
857857
default = { 'lsp', 'path', 'snippets', 'lazydev' },
858858
providers = {
859859
lazydev = { module = 'lazydev.integrations.blink', score_offset = 100 },
860+
cmdline = {
861+
-- ignores cmdline completions when executing shell commands
862+
enabled = function()
863+
return vim.fn.getcmdtype() ~= ':' or not vim.fn.getcmdline():match "^[%%0-9,'<>%-]*!"
864+
end,
865+
},
860866
},
861867
},
862868

0 commit comments

Comments
 (0)