How to use the pynvim.util.get_client_info function in pynvim

To help you get started, we’ve selected a few pynvim examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github neovim / pynvim / pynvim / msgpack_rpc / __init__.py View on Github external
def session(transport_type='stdio', *args, **kwargs):
    loop = EventLoop(transport_type, *args, **kwargs)
    msgpack_stream = MsgpackStream(loop)
    async_session = AsyncSession(msgpack_stream)
    session = Session(async_session)
    session.request(b'nvim_set_client_info',
                    *get_client_info('client', 'remote', {}), async_=True)
    return session
github neovim / pynvim / pynvim / plugin / host.py View on Github external
self._discover_classes(module, handlers, path)
                self._discover_functions(module, handlers, path, False)
                if not handlers:
                    error('{} exports no handlers'.format(path))
                    continue
                self._loaded[path] = {'handlers': handlers, 'module': module}
            except Exception as e:
                err = ('Encountered {} loading plugin at {}: {}\n{}'
                       .format(type(e).__name__, path, e, format_exc(5)))
                error(err)
                self._load_errors[path] = err

        kind = ("script-host" if len(plugins) == 1 and has_script
                else "rplugin-host")
        self.nvim.api.set_client_info(
            *get_client_info(kind, 'host', host_method_spec),
            async_=True)