From 60718ed6e806fa86fd78cb3bf55a05f1a74b257e Mon Sep 17 00:00:00 2001 From: Huynh Duc Dung Date: Thu, 15 Feb 2024 21:20:31 +0800 Subject: [PATCH] feat(integration): set filetype to 'copilot-chat' for support edgy.nvim --- rplugin/python3/CopilotChat/handlers/vsplit_chat_handler.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rplugin/python3/CopilotChat/handlers/vsplit_chat_handler.py b/rplugin/python3/CopilotChat/handlers/vsplit_chat_handler.py index 9cd76a82..6f306cdd 100644 --- a/rplugin/python3/CopilotChat/handlers/vsplit_chat_handler.py +++ b/rplugin/python3/CopilotChat/handlers/vsplit_chat_handler.py @@ -11,11 +11,12 @@ def __init__(self, nvim: MyNvim): self.buffer: MyBuffer = MyBuffer.new( self.nvim, { - "filetype": "markdown", + "filetype": "copilot-chat", }, ) def vsplit(self): + self.buffer.option("filetype", "copilot-chat") var_key = "copilot_chat" for window in self.nvim.windows: try: @@ -36,6 +37,7 @@ def vsplit(self): self.nvim.current.window.vars[var_key] = True def chat(self, prompt: str, filetype: str, code: str = ""): + self.buffer.option("filetype", "markdown") super().chat(prompt, filetype, code, self.nvim.current.window.handle) def reset_buffer(self):