Allow to take the full SourceConfig from source API (#561)
* - SourceConfig.opts -> SourceConfig.option - Add SourceConfig.trigger_characters - Allow accessing full SourceConfig from source * fmt&lint
This commit is contained in:
@@ -168,6 +168,19 @@ misc.to_vimindex = function(text, utfindex)
|
||||
return utfindex + 1
|
||||
end
|
||||
|
||||
---Return readonly version object
|
||||
---@generic T
|
||||
---@param tbl T
|
||||
---@return T
|
||||
misc.readonly = function(tbl)
|
||||
return setmetatable({}, {
|
||||
__index = tbl,
|
||||
__newindex = function()
|
||||
error('this table is readonly.')
|
||||
end,
|
||||
})
|
||||
end
|
||||
|
||||
---Mark the function as deprecated
|
||||
misc.deprecated = function(fn, msg)
|
||||
local printed = false
|
||||
|
||||
Reference in New Issue
Block a user