Add source:is_available API

This commit is contained in:
hrsh7th
2021-08-11 21:37:55 +09:00
parent 5200927346
commit ab616ffe88
3 changed files with 17 additions and 1 deletions

View File

@@ -164,6 +164,14 @@ source.get_default_replace_range = function(self)
end)
end
---Return the source is available or not.
source.is_available = function(self)
if self.source.is_available then
return self.source.is_available()
end
return true
end
---Get keyword_pattern
---@return string
source.get_keyword_pattern = function(self)