Skip to content

Commit

Permalink
feat(integration): set filetype to 'copilot-chat' for support edgy.nvim
Browse files Browse the repository at this point in the history
  • Loading branch information
jellydn committed Feb 15, 2024
1 parent bc577b3 commit 60718ed
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion rplugin/python3/CopilotChat/handlers/vsplit_chat_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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):
Expand Down

0 comments on commit 60718ed

Please sign in to comment.