Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fixed typos #1926

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lua/cmp/config/compare.lua
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ compare.recently_used = setmetatable({
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).
---Exceptions are that Text(1) will be ranked the lowest, and snippets be the highest.
---@type cmp.ComparatorFunction
Expand Down Expand Up @@ -106,7 +106,7 @@ compare.sort_text = function(entry1, entry2)
return nil
end

---length: Entires with shorter label length will be ranked higher.
---length: Entries with shorter label length will be ranked higher.
---@type cmp.ComparatorFunction
compare.length = function(entry1, entry2)
local diff = #entry1.completion_item.label - #entry2.completion_item.label
Expand Down
2 changes: 1 addition & 1 deletion lua/cmp/core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ core.confirm = function(self, e, option, callback)
else
vim.cmd([[silent! undojoin]])
-- 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:get_offset() - 1, ctx.cursor.row - 1, ctx.cursor.col - 1, {
e.context.cursor_before_line:sub(e:get_offset()),
})
Expand Down
2 changes: 1 addition & 1 deletion lua/cmp/utils/misc.lua
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ misc.rep = function(str_or_tbl, count)
return rep
end

---Return the valu is empty or not.
---Return whether the value is empty or not.
---@param v any
---@return boolean
misc.empty = function(v)
Expand Down