From 1a79d7e54938824f73a6fc75dfa31bbd0b221d14 Mon Sep 17 00:00:00 2001 From: hrsh7th Date: Mon, 8 Nov 2021 14:56:21 +0900 Subject: [PATCH] Fix #481 --- lua/cmp/utils/keymap.lua | 2 ++ 1 file changed, 2 insertions(+) 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