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 false
) )
else else
expr = vim.fn.expand("<cexpr>") expr = vim.fn.expand("<cexpr>") --[[@as string]]
end end
if expr == "" then if expr == "" then
+1 -1
View File
@@ -226,7 +226,7 @@ end
local Emitter = {} local Emitter = {}
Emitter.__index = Emitter Emitter.__index = Emitter
---@return ow.Git.Util.Emitter ---@return ow.Git.Util.Emitter<T>
function Emitter.new() function Emitter.new()
return setmetatable({ _listeners = {} }, Emitter) return setmetatable({ _listeners = {} }, Emitter)
end end
+3 -4
View File
@@ -425,14 +425,13 @@ function Linter.add(bufnr, config)
config.debounce = config.debounce or 100 config.debounce = config.debounce or 100
config.events = config.events or { "TextChanged", "TextChangedI" } config.events = config.events or { "TextChanged", "TextChangedI" }
local linter = { ---@type ow.lsp.Linter
local linter = setmetatable({
namespace = vim.api.nvim_create_namespace("lsp.linter"), namespace = vim.api.nvim_create_namespace("lsp.linter"),
augroup = vim.api.nvim_create_augroup("lsp.linter", { clear = false }), augroup = vim.api.nvim_create_augroup("lsp.linter", { clear = false }),
bufnr = bufnr, bufnr = bufnr,
config = config, config = config,
} }, Linter)
linter = setmetatable(linter, Linter)
local success = linter:run() local success = linter:run()
if not success then if not success then
+1 -1
View File
@@ -306,7 +306,7 @@ end
function M.debounce(fn, delay) function M.debounce(fn, delay)
local timer, err = vim.uv.new_timer() local timer, err = vim.uv.new_timer()
if not timer then 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 local noop = function() end
return fn, return fn,
{ {