diff --git a/lua/cmp/config.lua b/lua/cmp/config.lua index 6db2fa6..0353444 100644 --- a/lua/cmp/config.lua +++ b/lua/cmp/config.lua @@ -80,7 +80,7 @@ config.get = function() 'get', 'onetime', global_config.revision or 0, - onetime_config.revision or 0 + onetime_config.revision or 0, }, function() return misc.merge(config.normalize(onetime_config), config.normalize(global_config)) end) @@ -92,7 +92,7 @@ config.get = function() 'cmdline', global_config.revision or 0, cmdtype, - cmdline_config.revision or 0 + cmdline_config.revision or 0, }, function() return misc.merge(config.normalize(cmdline_config), config.normalize(global_config)) end) @@ -148,7 +148,7 @@ config.is_native_menu = function() return true end if c.view and c.view.entries then - return c.view.entries == 'native' or c.view.entries.name == 'native' + return c.view.entries == 'native' or c.view.entries.name == 'native' end return false end @@ -166,14 +166,14 @@ config.normalize = function(c) end if c.experimental and c.experimental.native_menu then - vim.api.nvim_echo({ - { '[nvim-cmp] ', 'Normal' }, - { 'experimental.native_menu', 'WarningMsg' }, - { ' is deprecated.\n', 'Normal' }, - { '[nvim-cmp] Please use ', 'Normal' }, - { 'view.entries = "native"', 'WarningMsg' }, - { ' instead.', 'Normal' }, - }, true, {}) + vim.api.nvim_echo({ + { '[nvim-cmp] ', 'Normal' }, + { 'experimental.native_menu', 'WarningMsg' }, + { ' is deprecated.\n', 'Normal' }, + { '[nvim-cmp] Please use ', 'Normal' }, + { 'view.entries = "native"', 'WarningMsg' }, + { ' instead.', 'Normal' }, + }, true, {}) c.view = c.view or {} c.view.entries = c.view.entries or 'native' diff --git a/lua/cmp/init.lua b/lua/cmp/init.lua index 593a2aa..ad6ca54 100644 --- a/lua/cmp/init.lua +++ b/lua/cmp/init.lua @@ -240,7 +240,7 @@ cmp.status = function() for _, name in ipairs(kinds.available) do vim.api.nvim_echo({ { ('- %s\n'):format(name), 'Normal' } }, false, {}) end - end + end if #kinds.unavailable > 0 then vim.api.nvim_echo({ { '\n', 'Normal' } }, false, {}) diff --git a/lua/cmp/utils/keymap.lua b/lua/cmp/utils/keymap.lua index 67bec80..ba15c66 100644 --- a/lua/cmp/utils/keymap.lua +++ b/lua/cmp/utils/keymap.lua @@ -67,7 +67,7 @@ end ---@param count number ---@return string keymap.backspace = function(count) - if type(count) == 'string' then + if type(count) == 'string' then count = vim.fn.strchars(count, true) end if count <= 0 then