Exemple #1
0
    class DefxHandlers:

        def __init__(self, vim: vim.Nvim) -> None:
            self._rplugin = Rplugin(vim)

        @vim.function('_defx_init', sync=True)  # type: ignore
        def init_channel(self, args: Args) -> None:
            self._rplugin.init_channel()

        @vim.rpc_export('_defx_start', sync=True)  # type: ignore
        def start(self, args: Args) -> None:
            self._rplugin.start(args)

        @vim.rpc_export('_defx_do_action', sync=True)  # type: ignore
        def do_action(self, args: Args) -> None:
            self._rplugin.do_action(args)

        @vim.rpc_export('_defx_async_action', sync=False)  # type: ignore
        def async_action(self, args: Args) -> None:
            self._rplugin.do_action(args)

        @vim.rpc_export('_defx_get_candidate', sync=True)  # type: ignore
        def get_candidate(self, args: Args
                          ) -> typing.Dict[str, typing.Union[str, bool]]:
            return self._rplugin.get_candidate()

        @vim.rpc_export('_defx_get_context', sync=True)  # type: ignore
        def get_context(self, args: Args) -> typing.Dict[str, typing.Any]:
            return self._rplugin.get_context()

        @vim.rpc_export('_defx_redraw', sync=True)  # type: ignore
        def redraw(self, args: Args) -> None:
            return self._rplugin.redraw(self._rplugin._views)
Exemple #2
0
    class DefxHandlers:
        def __init__(self, vim: Nvim) -> None:
            self._rplugin = Rplugin(vim)

        @neovim.function('_defx_init', sync=True)  # type: ignore
        def init_channel(self, args: typing.List) -> None:
            self._rplugin.init_channel()

        @neovim.function('_defx_start', sync=True)  # type: ignore
        def start(self, args: typing.List) -> None:
            self._rplugin.start(args)

        @neovim.function('_defx_do_action', sync=True)  # type: ignore
        def do_action(self, args: typing.List) -> None:
            self._rplugin.do_action(args)
Exemple #3
0
    class DefxHandlers:
        def __init__(self, vim: vim.Nvim) -> None:
            self._rplugin = Rplugin(vim)

        @vim.function('_defx_init', sync=True)  # type: ignore
        def init_channel(self, args: typing.List[typing.Any]) -> None:
            self._rplugin.init_channel()

        @vim.rpc_export('_defx_start', sync=True)  # type: ignore
        def start(self, args: typing.List[typing.Any]) -> None:
            self._rplugin.start(args)

        @vim.rpc_export('_defx_do_action', sync=True)  # type: ignore
        def do_action(self, args: typing.List[typing.Any]) -> None:
            self._rplugin.do_action(args)

        @vim.rpc_export('_defx_async_action', sync=False)  # type: ignore
        def async_action(self, args: typing.List[typing.Any]) -> None:
            self._rplugin.do_action(args)