From 98e8b9d593a5547c126a39212d6f5e954a2d85dd Mon Sep 17 00:00:00 2001 From: hrsh7th <629908+hrsh7th@users.noreply.github.com> Date: Wed, 18 Dec 2024 15:12:21 +0900 Subject: [PATCH] expose latest response for creating compat layer --- lua/cmp/source.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lua/cmp/source.lua b/lua/cmp/source.lua index 74bd3d092..e85746a2a 100644 --- a/lua/cmp/source.lua +++ b/lua/cmp/source.lua @@ -15,6 +15,7 @@ local char = require('cmp.utils.char') ---@field public source any ---@field public cache cmp.Cache ---@field public revision integer +---@field public response? lsp.CompletionResponse|nil ---@field public incomplete boolean ---@field public is_triggered_by_symbol boolean ---@field public entries cmp.Entry[] @@ -350,6 +351,7 @@ source.complete = function(self, ctx, callback) end ---@type lsp.CompletionResponse response = response or {} + self.response = response self.incomplete = response.isIncomplete or false