Skip to content

Commit

Permalink
feat: add configuration options for wrap and filetype
Browse files Browse the repository at this point in the history
This change improves the user experience. The chat is getting more readable if that is in markdown and wrap.
  • Loading branch information
jellydn authored Dec 15, 2023
1 parent ea2ac30 commit b4c6e76
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions rplugin/python3/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit b4c6e76

Please sign in to comment.