refactor: address emmylua diagnostics

This commit is contained in:
2026-04-20 22:11:18 +02:00
parent 516b9ea749
commit c7dd083083
29 changed files with 542 additions and 532 deletions
+1 -1
View File
@@ -11,7 +11,7 @@ vim.api.nvim_create_user_command("PluginUnwatch", function()
end, { desc = "Stop watching plugin configs" })
vim.api.nvim_create_user_command("PluginReload", function(opts)
require("pack").reload(opts.args)
require("pack").reload_plugin(opts.args)
end, {
nargs = 1,
complete = function(lead)
+4 -2
View File
@@ -58,9 +58,11 @@ local function delete_buffer(force)
if #buffers < 2 then
return
end
local b1 = assert(buffers[1])
local b2 = assert(buffers[2])
local current = tonumber(buffers[1]:match("^%s*(%d+)"))
local previous = tonumber(buffers[2]:match("^%s*(%d+)"))
local current = tonumber(b1:match("^%s*(%d+)")) --[[@as integer?]]
local previous = tonumber(b2:match("^%s*(%d+)")) --[[@as integer?]]
if not current or not previous then
return
+1
View File
@@ -26,6 +26,7 @@ vim.opt.foldlevel = 99
vim.opt.foldlevelstart = 99
vim.opt.foldmethod = "indent"
vim.opt.foldignore = ""
---@diagnostic disable-next-line: assign-type-mismatch
vim.opt.completeopt = {
"menu",
"menuone",