Skip to content

How to open chat in right split window by CopilotChat. #123

Description

@yfujita-skgcat

Is there any simple way to display the chat from the CopilotChat command in a split window on the right side?

I read "rplugin/python3/CopilotChat/mypynvim/core/buffer.py" and found self.nvim.api.command(f"vsplit | buffer {self.buf.handle}").
I inserted "wincmd l" as follows and succeeded in open chat in right side.

    def vsplit(self, opts: dict[str, Any] = {}):
        # self.nvim.api.command(f"vsplit | buffer {self.buf.handle}")
        self.nvim.api.command(f"vsplit | wincmd l | buffer {self.buf.handle}")
        winnr = self.nvim.api.get_current_win()
        for opt, val in opts.items():
            self.nvim.api.win_set_option(winnr, opt, val)

Is there any other way than modifying the source code?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions