diff options
author | Lewis Russell <lewis6991@gmail.com> | 2025-01-24 13:01:25 +0000 |
---|---|---|
committer | Lewis Russell <me@lewisr.dev> | 2025-01-27 16:37:50 +0000 |
commit | 6aa42e8f92bd8bea49b7b2accfe4ab67a5344e41 (patch) | |
tree | 5695108458a60f19e56834e9889ea58fc9c8c32d /runtime/lua/vim/health.lua | |
parent | 83479b95abae84b4b2b4a0331503298ddc5ff47b (diff) | |
download | rneovim-6aa42e8f92bd8bea49b7b2accfe4ab67a5344e41.tar.gz rneovim-6aa42e8f92bd8bea49b7b2accfe4ab67a5344e41.tar.bz2 rneovim-6aa42e8f92bd8bea49b7b2accfe4ab67a5344e41.zip |
fix: resolve all remaining LuaLS diagnostics
Diffstat (limited to 'runtime/lua/vim/health.lua')
-rw-r--r-- | runtime/lua/vim/health.lua | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/runtime/lua/vim/health.lua b/runtime/lua/vim/health.lua index 3268c82613..a265e2b901 100644 --- a/runtime/lua/vim/health.lua +++ b/runtime/lua/vim/health.lua @@ -126,7 +126,7 @@ local function filepath_to_healthcheck(path) -- */health/init.lua name = vim.fs.dirname(vim.fs.dirname(subpath)) end - name = name:gsub('/', '.') + name = assert(name:gsub('/', '.')) --- @type string func = 'require("' .. name .. '.health").check()' filetype = 'l' @@ -235,7 +235,7 @@ local function format_report_message(status, msg, ...) -- Report each suggestion for _, v in ipairs(varargs) do if v then - output = output .. '\n - ' .. indent_after_line1(v, 6) + output = output .. '\n - ' .. indent_after_line1(v, 6) --- @type string end end end @@ -445,8 +445,7 @@ function M._check(mods, plugin_names) -- Quit with 'q' inside healthcheck buffers. vim.keymap.set('n', 'q', function() - local ok, _ = pcall(vim.cmd.close) - if not ok then + if not pcall(vim.cmd.close) then vim.cmd.bdelete() end end, { buffer = bufnr, silent = true, noremap = true, nowait = true }) |