test&lint&fmt

This commit is contained in:
hrsh7th
2022-02-13 14:38:31 +09:00
parent 070c5572ad
commit 33fc65f174
3 changed files with 13 additions and 13 deletions

View File

@@ -80,7 +80,7 @@ config.get = function()
'get', 'get',
'onetime', 'onetime',
global_config.revision or 0, global_config.revision or 0,
onetime_config.revision or 0 onetime_config.revision or 0,
}, function() }, function()
return misc.merge(config.normalize(onetime_config), config.normalize(global_config)) return misc.merge(config.normalize(onetime_config), config.normalize(global_config))
end) end)
@@ -92,7 +92,7 @@ config.get = function()
'cmdline', 'cmdline',
global_config.revision or 0, global_config.revision or 0,
cmdtype, cmdtype,
cmdline_config.revision or 0 cmdline_config.revision or 0,
}, function() }, function()
return misc.merge(config.normalize(cmdline_config), config.normalize(global_config)) return misc.merge(config.normalize(cmdline_config), config.normalize(global_config))
end) end)
@@ -166,14 +166,14 @@ config.normalize = function(c)
end end
if c.experimental and c.experimental.native_menu then if c.experimental and c.experimental.native_menu then
vim.api.nvim_echo({ vim.api.nvim_echo({
{ '[nvim-cmp] ', 'Normal' }, { '[nvim-cmp] ', 'Normal' },
{ 'experimental.native_menu', 'WarningMsg' }, { 'experimental.native_menu', 'WarningMsg' },
{ ' is deprecated.\n', 'Normal' }, { ' is deprecated.\n', 'Normal' },
{ '[nvim-cmp] Please use ', 'Normal' }, { '[nvim-cmp] Please use ', 'Normal' },
{ 'view.entries = "native"', 'WarningMsg' }, { 'view.entries = "native"', 'WarningMsg' },
{ ' instead.', 'Normal' }, { ' instead.', 'Normal' },
}, true, {}) }, true, {})
c.view = c.view or {} c.view = c.view or {}
c.view.entries = c.view.entries or 'native' c.view.entries = c.view.entries or 'native'

View File

@@ -240,7 +240,7 @@ cmp.status = function()
for _, name in ipairs(kinds.available) do for _, name in ipairs(kinds.available) do
vim.api.nvim_echo({ { ('- %s\n'):format(name), 'Normal' } }, false, {}) vim.api.nvim_echo({ { ('- %s\n'):format(name), 'Normal' } }, false, {})
end end
end end
if #kinds.unavailable > 0 then if #kinds.unavailable > 0 then
vim.api.nvim_echo({ { '\n', 'Normal' } }, false, {}) vim.api.nvim_echo({ { '\n', 'Normal' } }, false, {})

View File

@@ -67,7 +67,7 @@ end
---@param count number ---@param count number
---@return string ---@return string
keymap.backspace = function(count) keymap.backspace = function(count)
if type(count) == 'string' then if type(count) == 'string' then
count = vim.fn.strchars(count, true) count = vim.fn.strchars(count, true)
end end
if count <= 0 then if count <= 0 then