jacobsimpson / nvim-example-lua-plugin

A simple Neovim Lua plugin using the Lua embedded in Neovim, suitable as a template.
The Unlicense
177 stars 19 forks source link

Error opening neovim #9

Closed joaothallis closed 2 years ago

joaothallis commented 2 years ago
$ pwd
/home/joao/.config/nvim
$ bash \
  <(curl -o- https://raw.githubusercontent.com/jacobsimpson/nvim-example-lua-plugin/master/install.sh) \
  mynewplugin
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   782  100   782    0     0  19648      0 --:--:-- --:--:-- --:--:-- 20051
Cloning into 'mynewplugin'...
remote: Enumerating objects: 13, done.
remote: Counting objects: 100% (13/13), done.
remote: Compressing objects: 100% (11/11), done.
remote: Total 13 (delta 0), reused 6 (delta 0), pack-reused 0
Receiving objects: 100% (13/13), 5.65 KiB | 5.65 MiB/s, done.

To try out your new plugin locally, use:

nvim --cmd 'set rtp+=mynewplugin'

To use it after uploading to Github, add the necessary plugin load command to
your Neovim config files.

Example:

Plug '<github-username>/mynewplugin'

$ nvim --cmd "set rtp+=./mynewplugin"

Error:

nvim-example-lua-plugin.vim: VimL code executing.
nvim-example-lua-plugin.vim: Lua code executing.
Error detected while processing /home/joao/.config/nvim/mynewplugin/plugin/mynewplugin.vim:
line   34:
E492: Not an editor command: require'myluamodule'.setup({p1 = "value1"})
nvim-example-lua-plugin.myluamodule.init global_lua_function: hello
nvim-example-lua-plugin.myluamodule.init local_lua_function: hello
nvim-example-lua-plugin.myluamodule.definestuff show_stuff: hello
Press ENTER or type command to continue
nvim -v
NVIM v0.7.0-dev+1015-g92e92f02e
Build type: RelWithDebInfo
LuaJIT 2.0.5
Panky-codes commented 2 years ago

Same issue here. I think the lua qualifier is missing:

lua require'myluamodule'.setup({p1 = "value1"})