-
Notifications
You must be signed in to change notification settings - Fork 126
Open
Labels
Description
here are the rplugin
import neovim
@neovim.plugin
class Main(object):
def __init__(self, vim):
self.vim = vim
@neovim.function('test_python')
def test_python(self, args):
self.vim.command('echo "hello from TestPython"')
@neovim.function('TestPython')
def test_python_1(self, args):
self.vim.command('echo "hello from TestPython"')
put this script in ~/.config/nvim/rplugin/python3
and run UpdateRemotePlugins
, generate rplugin.vim
in .local/share/nvim
" node plugins
" python3 plugins
call remote#host#RegisterPlugin('python3', '/home/jrmei/.config/nvim/rplugin/python3/auxlib.py', [
\ {'sync': v:false, 'name': 'test_python', 'type': 'function', 'opts': {}},
\ {'sync': v:false, 'name': 'TestPython', 'type': 'function', 'opts': {}},
\ ])
" ruby plugins
" python plugins
now if run call TestPython()
, if will output correctly. But if run call test_python()
, it complains unknown function.
punitsoni
Metadata
Metadata
Assignees
Labels
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
bfredl commentedon Apr 28, 2018
Plugin defined functions and commands must begin with uppercase. But we should throw an error for this as early as possible, ideally by nvim core so it covers hosts in all languages.
meijieru commentedon Apr 28, 2018
Yeah, that would be ideal
[-]Unknown function[/-][+]lowercase @neovim.function not found[/+]