$ 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
Error: