mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-07 21:24:33 +08:00
Add ale.has to mirror ale#Has in Lua
This commit is contained in:
@@ -55,6 +55,15 @@ ale.setup = setmetatable({
|
||||
end,
|
||||
})
|
||||
|
||||
---Check if ALE supports a given feature.
|
||||
---
|
||||
---The ALE version can be checked with ale.has("ale-1.0.0"), etc.
|
||||
---@param feature string The feature to test for.
|
||||
---@return boolean supported If the feature is supported.
|
||||
ale.has = function(feature)
|
||||
return vim.fn["ale#Has"](feature) == 1
|
||||
end
|
||||
|
||||
---Get an ALE variable for a buffer (first) or globally (second)
|
||||
---@param buffer number The buffer number to retreive the variable for.
|
||||
---@param variable_name string The variable to retrieve.
|
||||
|
||||
Reference in New Issue
Block a user