From d039f19af54e73e1f076c29f1cb412c14612da07 Mon Sep 17 00:00:00 2001 From: Lewis Russell Date: Wed, 9 Sep 2026 13:04:46 +0100 Subject: build: enable more EmmyLua checks Enable checks for unused code, deprecated calls, return types, and annotations. Fix the warnings and replace the deprecated highlight function. Keep exceptions where old APIs are still needed or the checker gets it wrong. AI-assisted --- runtime/lua/vim/loader.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'runtime/lua/vim/loader.lua') diff --git a/runtime/lua/vim/loader.lua b/runtime/lua/vim/loader.lua index 2ab8d451a2..e819229583 100644 --- a/runtime/lua/vim/loader.lua +++ b/runtime/lua/vim/loader.lua @@ -437,7 +437,8 @@ function M.enable(enable) M.enabled = enable if enable then - vim.fn.mkdir(vim.fs.abspath(M.path), 'p') + vim.fn.mkdir(fs.abspath(M.path), 'p') + ---@diagnostic disable-next-line: global-in-non-module _G.loadfile = loadfile_cached -- add Lua loader table.insert(loaders, 2, loader_cached) @@ -451,6 +452,7 @@ function M.enable(enable) end end else + ---@diagnostic disable-next-line: global-in-non-module _G.loadfile = _loadfile for l = #loaders, 1, -1 do local loader = loaders[l] -- cgit