InsertMode is required

This commit is contained in:
hrsh7th
2021-09-13 01:05:31 +09:00
parent a78894a09a
commit 9c460395a0
3 changed files with 4 additions and 10 deletions

View File

@@ -44,9 +44,9 @@ end
config.enabled = function()
local enabled = config.get().enabled
if type(enabled) == 'function' then
return enabled()
enabled = enabled()
end
return not not enabled
return enabled and string.sub(vim.api.nvim_get_mode().mode, 1, 1) == 'i'
end
---Return source config