Skip to content

Commit

Permalink
perf: pull #1980 changes from @hrsh7th
Browse files Browse the repository at this point in the history
  • Loading branch information
iguanacucumber committed Oct 21, 2024
1 parent 34e5f63 commit b32aafb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lua/cmp/entry.lua
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ local matcher = require('cmp.matcher')
---@field public filter_text string
---@field private match_view_args_ret {input:string, word:string, option:cmp.MatchingConfig, matches:table[]}
local entry = {}
entry.__index = entry

---Create new entry
---@param ctx cmp.Context
Expand All @@ -40,7 +41,7 @@ local entry = {}
---@param item_defaults? lsp.internal.CompletionItemDefaults
---@return cmp.Entry
entry.new = function(ctx, source, completion_item, item_defaults)
local self = setmetatable({}, { __index = entry })
local self = setmetatable({}, entry)
self.id = misc.id('entry.new')
self.cache = cache.new()
self.match_cache = cache.new()
Expand All @@ -53,7 +54,6 @@ entry.new = function(ctx, source, completion_item, item_defaults)
self.source_offset = source.request_offset
self.source_insert_range = source.default_insert_range
self.source_replace_range = source.default_replace_range
self.completion_item = self:fill_defaults(completion_item, item_defaults)
self.item_defaults = item_defaults
self.resolved_completion_item = nil
self.resolved_callbacks = {}
Expand Down

0 comments on commit b32aafb

Please sign in to comment.