From b4c6e760232ec54d4632edef3869e1a05ec61751 Mon Sep 17 00:00:00 2001 From: "Dung Duc Huynh (Kaka)" <870029+jellydn@users.noreply.github.com> Date: Fri, 15 Dec 2023 22:37:32 +0800 Subject: [PATCH] feat: add configuration options for wrap and filetype This change improves the user experience. The chat is getting more readable if that is in markdown and wrap. --- rplugin/python3/plugin.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rplugin/python3/plugin.py b/rplugin/python3/plugin.py index 11134970..f86b8cce 100644 --- a/rplugin/python3/plugin.py +++ b/rplugin/python3/plugin.py @@ -42,6 +42,9 @@ def copilotChat(self, args: list[str]): # Create a new scratch buffer to hold the chat self.nvim.command("enew") self.nvim.command("setlocal buftype=nofile bufhidden=hide noswapfile") + # Set filetype as markdown and wrap + self.nvim.command("setlocal filetype=markdown") + self.nvim.command("setlocal wrap") if self.nvim.current.line != "": self.nvim.command("normal o") for token in self.copilot.ask(prompt, code, language=file_type):