From bb1d89d128ee429e78f0c7aa3399cf004d5fe762 Mon Sep 17 00:00:00 2001 From: notomo Date: Mon, 23 Sep 2024 14:39:50 +0900 Subject: [PATCH] Fix warnings --- lua/vusted/helper.lua | 1 + lua/vusted/run.lua | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lua/vusted/helper.lua b/lua/vusted/helper.lua index bf87c0b..193ad06 100644 --- a/lua/vusted/helper.lua +++ b/lua/vusted/helper.lua @@ -57,6 +57,7 @@ local clears = { if vim.api.nvim_exec2 then return vim.api.nvim_exec2(cmd, { output = true }).output end + ---@diagnostic disable-next-line: deprecated return vim.api.nvim_exec(cmd, true) end local groups = vim.split(exec("augroup"), "%s+", { trimempty = true }) diff --git a/lua/vusted/run.lua b/lua/vusted/run.lua index 8e34596..2fa232f 100644 --- a/lua/vusted/run.lua +++ b/lua/vusted/run.lua @@ -5,8 +5,11 @@ return function() -- for loading test target vim.o.runtimepath = vim.fn.getcwd() .. "," .. vim.o.runtimepath + local argv = vim.fn.argv() + ---@cast argv string[] + -- NOTICE: replace global arg - arg = vim.fn.argv() -- luacheck: ignore + arg = argv vim.cmd("%argdelete") if vim.tbl_contains(arg, "--version") then