aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/loader.lua
diff options
context:
space:
mode:
authorfutsuuu <futsuuu123@gmail.com>2024-07-20 14:46:27 +0900
committerLewis Russell <me@lewisr.dev>2024-08-13 14:05:10 +0100
commit67bb0cfa79bc7eea5103ce9a00fc6176077c135b (patch)
treef973087743b34665d1a25cf6b838df371164d83d /runtime/lua/vim/loader.lua
parent9768e88f3891b5594eb2d556bd3bdf40c61d46e1 (diff)
downloadrneovim-67bb0cfa79bc7eea5103ce9a00fc6176077c135b.tar.gz
rneovim-67bb0cfa79bc7eea5103ce9a00fc6176077c135b.tar.bz2
rneovim-67bb0cfa79bc7eea5103ce9a00fc6176077c135b.zip
fix(loader): follow the style of the error message for built-in loaders
start the error message with '\n\t' instead of '\n' surround the module name by single quotes
Diffstat (limited to 'runtime/lua/vim/loader.lua')
-rw-r--r--runtime/lua/vim/loader.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/runtime/lua/vim/loader.lua b/runtime/lua/vim/loader.lua
index ea77a22416..2a881d1602 100644
--- a/runtime/lua/vim/loader.lua
+++ b/runtime/lua/vim/loader.lua
@@ -200,7 +200,7 @@ function Loader.loader(modname)
return chunk or error(err)
end
Loader._hashes = nil
- return '\ncache_loader: module ' .. modname .. ' not found'
+ return ("\n\tcache_loader: module '%s' not found"):format(modname)
end
--- The `package.loaders` loader for libs
@@ -222,7 +222,7 @@ function Loader.loader_lib(modname)
local chunk, err = package.loadlib(ret.modpath, 'luaopen_' .. funcname:gsub('%.', '_'))
return chunk or error(err)
end
- return '\ncache_loader_lib: module ' .. modname .. ' not found'
+ return ("\n\tcache_loader_lib: module '%s' not found"):format(modname)
end
--- `loadfile` using the cache