manateelazycat / mind-wave

Emacs AI plugin based on ChatGPT API
GNU General Public License v3.0
159 stars 26 forks source link

Suggest to let mind-wave-chat-mode extends markdown mode #9

Closed xqliu closed 1 year ago

xqliu commented 1 year ago

As per title.

Since the response of chat-gpt is in markdown mode, so suggest above

Thanks :)

xqliu commented 1 year ago

My configuration as below,

I use a file Daily.chat to persistent my communication with ChatGPT and use markdown mode to render the chat buffer.

Also have turn on auto-fill and visual-line-mode

Binding C-c x to switch to the buffer and start asking

(defun switch-to-daily-chat-and-ask ()
  "Switch to Daily.chat buffer and invoke mind-wave-chat-ask function."
  (interactive)
  (switch-to-buffer (find-file-noselect "~/org-files/Daily.chat"))
  (markdown-mode)
  (mind-wave-chat-mode)
  (mind-wave-chat-ask)
  )

(add-to-list 'auto-mode-alist '("\\.chat$" . mind-wave-chat-mode))
(add-to-list 'auto-mode-alist '("\\.chat$" . markdown-mode))
(add-hook 'mind-wave-chat-mode 'turn-on-auto-fill)
(add-hook 'mind-wave-chat-mode 'visual-line-mode)
(setq mind-wave-auto-change-title nil)
(global-set-key (kbd "C-c x") 'switch-to-daily-chat-and-ask)
xqliu commented 1 year ago

Also would think to enable markdown mode by default would be great, is it possible to add it to the package? thanks for the package :+1:

manateelazycat commented 1 year ago

https://github.com/manateelazycat/mind-wave/commit/860ec4edabd4565229d996230a8cb2c243c16dc6

Done.