diff --git a/lua/dap/hover.lua b/lua/dap/hover.lua index 4b47982..932beac 100644 --- a/lua/dap/hover.lua +++ b/lua/dap/hover.lua @@ -59,7 +59,7 @@ local function hover_async() false ) else - expr = vim.fn.expand("") + expr = vim.fn.expand("") --[[@as string]] end if expr == "" then diff --git a/lua/git/util.lua b/lua/git/util.lua index b49d82f..c0b3f6f 100644 --- a/lua/git/util.lua +++ b/lua/git/util.lua @@ -226,7 +226,7 @@ end local Emitter = {} Emitter.__index = Emitter ----@return ow.Git.Util.Emitter +---@return ow.Git.Util.Emitter function Emitter.new() return setmetatable({ _listeners = {} }, Emitter) end diff --git a/lua/linter.lua b/lua/linter.lua index 633820f..3543d8f 100644 --- a/lua/linter.lua +++ b/lua/linter.lua @@ -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 diff --git a/lua/util.lua b/lua/util.lua index 6f545c1..8cf96ab 100644 --- a/lua/util.lua +++ b/lua/util.lua @@ -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, {