This commit is contained in:
hrsh7th
2021-11-02 12:05:47 +09:00
parent 017d3abc57
commit b4e761e307

View File

@@ -74,10 +74,6 @@ end
---@param name string
---@return cmp.SourceConfig
config.get_source_config = function(name)
local bufnr = vim.api.nvim_get_current_buf()
local global = config.global
local buffer = config.buffers[bufnr] or { revision = 1 }
return config.cache:ensure({ 'get_source_config', bufnr, global.revision or 0, buffer.revision or 0, name }, function()
local c = config.get()
for _, s in ipairs(c.sources) do
if s.name == name then
@@ -88,7 +84,6 @@ config.get_source_config = function(name)
end
end
return nil
end)
end
---Normalize mapping key