diff options
| author | Bram Moolenaar <Bram@vim.org> | 2020-05-31 14:08:12 +0200 |
|---|---|---|
| committer | Bram Moolenaar <Bram@vim.org> | 2020-05-31 14:08:12 +0200 |
| commit | 788fbb47079e6df4d4815d27273faf8390395029 (patch) | |
| tree | 4257162a0428962e3aad34a926ff40d08b0d632d /src/testdir/testluaplugin/lua | |
| parent | 5cd1cb9ff9d04979ff4cbc36ca8416d83364505d (diff) | |
| download | vim-git-788fbb47079e6df4d4815d27273faf8390395029.tar.gz | |
patch 8.2.0858: not easy to require Lua modulesv8.2.0858
Problem: Not easy to require Lua modules.
Solution: Improve use of Lua path. (Prabir Shrestha, closes #6098)
Diffstat (limited to 'src/testdir/testluaplugin/lua')
| -rw-r--r-- | src/testdir/testluaplugin/lua/testluaplugin/hello.lua | 7 | ||||
| -rw-r--r-- | src/testdir/testluaplugin/lua/testluaplugin/init.lua | 5 |
2 files changed, 12 insertions, 0 deletions
diff --git a/src/testdir/testluaplugin/lua/testluaplugin/hello.lua b/src/testdir/testluaplugin/lua/testluaplugin/hello.lua new file mode 100644 index 000000000..7c9055249 --- /dev/null +++ b/src/testdir/testluaplugin/lua/testluaplugin/hello.lua @@ -0,0 +1,7 @@ +local function hello() + return "hello from lua" +end + +return { + hello = hello +} diff --git a/src/testdir/testluaplugin/lua/testluaplugin/init.lua b/src/testdir/testluaplugin/lua/testluaplugin/init.lua new file mode 100644 index 000000000..1e6c47482 --- /dev/null +++ b/src/testdir/testluaplugin/lua/testluaplugin/init.lua @@ -0,0 +1,5 @@ +local hello = require('testluaplugin/hello').hello + +return { + hello = hello +} |
