This commit is contained in:
hrsh7th
2021-10-11 16:29:42 +09:00
parent 071c08fcc9
commit 2f2794decd
8 changed files with 23 additions and 18 deletions

View File

@@ -24,8 +24,13 @@ end
---Return current mode is insert-mode or not.
---@return boolean
misc.is_insert_mode = function()
return string.sub(vim.api.nvim_get_mode().mode, 1, 1) == 'i'
misc.is_suitable_mode = function()
local mode = vim.api.nvim_get_mode().mode
return vim.tbl_contains({
'i',
'ic',
'ix',
}, mode)
end
---Merge two tables recursively