diff --git a/lua/cmp/utils/keymap.lua b/lua/cmp/utils/keymap.lua index 32079c9..0f8214f 100644 --- a/lua/cmp/utils/keymap.lua +++ b/lua/cmp/utils/keymap.lua @@ -77,8 +77,10 @@ end ---@return string keymap.autoindent = function() local keys = {} + table.insert(keys, keymap.t('setlocal cindent')) table.insert(keys, keymap.t('setlocal indentkeys+=!^F')) table.insert(keys, keymap.t('')) + table.insert(keys, keymap.t('setlocal %scindent'):format(vim.bo.cindent and '' or 'no')) table.insert(keys, keymap.t('setlocal indentkeys=%s'):format(vim.bo.indentkeys:gsub( '|', '\\|'))) return table.concat(keys, '') end