From 4fc3195da14faf5791b181cd9f874722fc6b72be Mon Sep 17 00:00:00 2001 From: Niza Toshpulatov Date: Wed, 15 May 2024 17:32:02 +0200 Subject: [PATCH 1/3] Fix typo in core.lua --- lua/cmp/core.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/cmp/core.lua b/lua/cmp/core.lua index b34c360ec..7295b9c72 100644 --- a/lua/cmp/core.lua +++ b/lua/cmp/core.lua @@ -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()), }) From 709d041115f074dbd2ddf0f4d18bab54ec373d6f Mon Sep 17 00:00:00 2001 From: Niza Toshpulatov Date: Wed, 15 May 2024 17:34:01 +0200 Subject: [PATCH 2/3] Fix typos in compare.lua --- lua/cmp/config/compare.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/cmp/config/compare.lua b/lua/cmp/config/compare.lua index f39921baf..ce435962b 100644 --- a/lua/cmp/config/compare.lua +++ b/lua/cmp/config/compare.lua @@ -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 @@ -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 From 0c5b4257eee9bdeb074bc0ed7de7d4b681a9b548 Mon Sep 17 00:00:00 2001 From: Niza Toshpulatov Date: Wed, 15 May 2024 17:35:30 +0200 Subject: [PATCH 3/3] Fix typo in misc.lua --- lua/cmp/utils/misc.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/cmp/utils/misc.lua b/lua/cmp/utils/misc.lua index 660467981..9c98054b5 100644 --- a/lua/cmp/utils/misc.lua +++ b/lua/cmp/utils/misc.lua @@ -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)