Fix typos (#2135)
This commit is contained in:
@@ -66,7 +66,7 @@ compare.recently_used = setmetatable({
|
|||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
---kind: Entires with smaller ordinal value of 'kind' will be ranked higher.
|
---kind: Entries with smaller ordinal value of 'kind' will be ranked higher.
|
||||||
---(see lsp.CompletionItemKind enum).
|
---(see lsp.CompletionItemKind enum).
|
||||||
---Exceptions are that Text(1) will be ranked the lowest, and snippets be the highest.
|
---Exceptions are that Text(1) will be ranked the lowest, and snippets be the highest.
|
||||||
---@type cmp.ComparatorFunction
|
---@type cmp.ComparatorFunction
|
||||||
@@ -106,7 +106,7 @@ compare.sort_text = function(entry1, entry2)
|
|||||||
return nil
|
return nil
|
||||||
end
|
end
|
||||||
|
|
||||||
---length: Entires with shorter label length will be ranked higher.
|
---length: Entries with shorter label length will be ranked higher.
|
||||||
---@type cmp.ComparatorFunction
|
---@type cmp.ComparatorFunction
|
||||||
compare.length = function(entry1, entry2)
|
compare.length = function(entry1, entry2)
|
||||||
local diff = #entry1.completion_item.label - #entry2.completion_item.label
|
local diff = #entry1.completion_item.label - #entry2.completion_item.label
|
||||||
|
|||||||
@@ -399,7 +399,7 @@ core.confirm = function(self, e, option, callback)
|
|||||||
else
|
else
|
||||||
vim.cmd([[silent! undojoin]])
|
vim.cmd([[silent! undojoin]])
|
||||||
-- This logic must be used nvim_buf_set_text.
|
-- This logic must be used nvim_buf_set_text.
|
||||||
-- If not used, the snippet engine's placeholder wil be broken.
|
-- If not used, the snippet engine's placeholder will be broken.
|
||||||
vim.api.nvim_buf_set_text(0, e.context.cursor.row - 1, e.offset - 1, ctx.cursor.row - 1, ctx.cursor.col - 1, {
|
vim.api.nvim_buf_set_text(0, e.context.cursor.row - 1, e.offset - 1, ctx.cursor.row - 1, ctx.cursor.col - 1, {
|
||||||
e.context.cursor_before_line:sub(e.offset),
|
e.context.cursor_before_line:sub(e.offset),
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ misc.rep = function(str_or_tbl, count)
|
|||||||
return rep
|
return rep
|
||||||
end
|
end
|
||||||
|
|
||||||
---Return the valu is empty or not.
|
---Return whether the value is empty or not.
|
||||||
---@param v any
|
---@param v any
|
||||||
---@return boolean
|
---@return boolean
|
||||||
misc.empty = function(v)
|
misc.empty = function(v)
|
||||||
|
|||||||
Reference in New Issue
Block a user