fix: address diagnostics

This commit is contained in:
2026-05-07 01:58:56 +02:00
parent 66ceb352aa
commit 55effc0a67
4 changed files with 6 additions and 7 deletions
+1 -1
View File
@@ -59,7 +59,7 @@ local function hover_async()
false
)
else
expr = vim.fn.expand("<cexpr>")
expr = vim.fn.expand("<cexpr>") --[[@as string]]
end
if expr == "" then
+1 -1
View File
@@ -226,7 +226,7 @@ end
local Emitter = {}
Emitter.__index = Emitter
---@return ow.Git.Util.Emitter
---@return ow.Git.Util.Emitter<T>
function Emitter.new()
return setmetatable({ _listeners = {} }, Emitter)
end
+3 -4
View File
@@ -425,14 +425,13 @@ function Linter.add(bufnr, config)
config.debounce = config.debounce or 100
config.events = config.events or { "TextChanged", "TextChangedI" }
local linter = {
---@type ow.lsp.Linter
local linter = setmetatable({
namespace = vim.api.nvim_create_namespace("lsp.linter"),
augroup = vim.api.nvim_create_augroup("lsp.linter", { clear = false }),
bufnr = bufnr,
config = config,
}
linter = setmetatable(linter, Linter)
}, Linter)
local success = linter:run()
if not success then
+1 -1
View File
@@ -306,7 +306,7 @@ end
function M.debounce(fn, delay)
local timer, err = vim.uv.new_timer()
if not timer then
M.warning("debounce: failed to create timer: %s", err)
log.warning("debounce: failed to create timer: %s", err)
local noop = function() end
return fn,
{