How can I disable completion in an Oil buffer #1429
Replies: 4 comments
-
Still not sure why this suddenly came about but this gets it done for the time being
|
Beta Was this translation helpful? Give feedback.
-
@windowsrefund Yes, that solution works, but they could try this alternative: opts = {
enabled = function()
-- If in the cmdline, enable completion regardless of filetype
if vim.fn.getcmdtype() ~= "" then
return true
end
-- Disable completion if the current buffer is `oil`
return not vim.tbl_contains({ "oil" }, vim.bo.filetype)
end,
} This would allow completion to work normally in other contexts while remaining disabled in |
Beta Was this translation helpful? Give feedback.
-
A more elegant solution if you prefer not to alter your blink configuration is to benefit from the filetype plugin. Put this line in vim.b.completion = false |
Beta Was this translation helpful? Give feedback.
-
Both are so much cleaner than my solution. Thank you both. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Curious to know if anyone can reproduce this? Seems like this used to not be a problem so maybe something has changed.
Beta Was this translation helpful? Give feedback.
All reactions