forked from aniani/vim
patch 8.2.0858: not easy to require Lua modules
Problem: Not easy to require Lua modules. Solution: Improve use of Lua path. (Prabir Shrestha, closes #6098)
This commit is contained in:
7
src/testdir/testluaplugin/lua/testluaplugin/hello.lua
Normal file
7
src/testdir/testluaplugin/lua/testluaplugin/hello.lua
Normal file
@@ -0,0 +1,7 @@
|
||||
local function hello()
|
||||
return "hello from lua"
|
||||
end
|
||||
|
||||
return {
|
||||
hello = hello
|
||||
}
|
||||
5
src/testdir/testluaplugin/lua/testluaplugin/init.lua
Normal file
5
src/testdir/testluaplugin/lua/testluaplugin/init.lua
Normal file
@@ -0,0 +1,5 @@
|
||||
local hello = require('testluaplugin/hello').hello
|
||||
|
||||
return {
|
||||
hello = hello
|
||||
}
|
||||
Reference in New Issue
Block a user