Implement ale.queue for calling ale#Queue in Lua

This commit is contained in:
w0rp
2025-03-22 01:10:11 +00:00
parent db43854ca3
commit 26ffb9dfa3
3 changed files with 61 additions and 4 deletions

View File

@@ -55,6 +55,21 @@ ale.setup = setmetatable({
end,
})
---Run ALE linters on a buffer after a delay.
---
---If a delay in milliseconds multiple times, the internal timer used by ALE
---will be reset, so ALE doesn't lint too often.
---
---If the `linting_flag` is not 'lint_file' then linters that require files to
---be saved will no be run.
---@param delay number Milliseconds to wait for. A delay of 0 lints immediately.
---@param linting_flag string|nil If set to 'lint_file', run all linters.
---@param buffer number|nil The buffer to check. Defaults to the current buffer.
---@return nil
ale.queue = function(delay, linting_flag, buffer)
vim.fn["ale#Queue"](delay, linting_flag, buffer)
end
---Check if ALE supports a given feature.
---
---The ALE version can be checked with ale.has("ale-1.0.0"), etc.