Exemple #1
0
        def cont() -> bool:
            assert isinstance(nvim.loop, AbstractEventLoop)
            nvim.loop.set_default_executor(self._pool)

            atomic, specs = rpc.drain(nvim.channel_id)
            self._handlers.update(specs)
            try:
                self._settings = initial_settings(nvim, specs)
            except DecodeError as e:
                tpl = """
                Some options may hanve changed.
                See help doc on Github under [docs/CONFIGURATION.md]


                ${e}
                """
                ms = Template(dedent(tpl)).substitute(e=e)
                write(nvim, ms, error=True)
                return False
            else:
                hl = highlight(*self._settings.view.hl_context.groups)
                (atomic + autocmd.drain() + hl).commit(nvim)

                self._state = initial_state(
                    nvim, pool=self._pool, settings=self._settings
                )
                init_locale(self._settings.lang)
                return True
Exemple #2
0
        def cont() -> None:
            if isinstance(nvim.loop, AbstractEventLoop):
                nvim.loop.set_default_executor(pool)

            atomic, specs = rpc.drain(nvim.channel_id)
            self._handlers.update(specs)
            self._settings = initial_settings(nvim, specs)
            hl = highlight(*self._settings.view.hl_context.groups)
            (atomic + autocmd.drain() + hl).commit(nvim)

            self._state = initial_state(nvim, settings=self._settings)
            init_locale(self._settings.lang)
Exemple #3
0
def _dehl_cursor(nvim: Nvim) -> None:
    highlight(HLgroup("CursorLine", guibg="#f1f4f6")).commit(nvim)
Exemple #4
0
def _hl_cursor(nvim: Nvim) -> None:
    highlight(HLgroup("CursorLine", guibg="#f2d9fa")).commit(nvim)