Skip to content

Commit fc09bb8

Browse files
authored
Merge pull request #118 from editor-code-assistant/fix-edit-commands
Use gfm-mode with view-mode rendering for editable chat
2 parents 957c999 + 551bfd0 commit fc09bb8

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

eca-chat.el

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
;; Variables
2626

2727
(eval-and-compile
28-
(defcustom eca-chat-parent-mode 'gfm-view-mode
29-
"The parent mode to eca-chat-mode inheirit."
28+
(defcustom eca-chat-parent-mode 'gfm-mode
29+
"The parent mode to eca-chat-mode inherit."
3030
:type 'symbol
3131
:group 'eca))
3232

@@ -1661,12 +1661,14 @@ CHILD, NAME, DOCSTRING and BODY are passed down."
16611661
:group 'eca
16621662
(visual-line-mode)
16631663
(hl-line-mode -1)
1664-
(read-only-mode -1)
16651664
(setq-local eca-chat--history '())
16661665
(setq-local eca-chat--history-index -1)
16671666

1668-
;; Show diff blocks in markdown-mode with colors.
1667+
;; Show diff blocks in markdown-mode with colors.
16691668
(setq-local markdown-fontify-code-blocks-natively t)
1669+
;; Enable gfm-view-mode-like rendering without read-only
1670+
(setq-local markdown-hide-markup t)
1671+
(add-to-invisibility-spec 'markdown-markup)
16701672

16711673
(make-local-variable 'completion-at-point-functions)
16721674
(setq-local completion-at-point-functions (list #'eca-chat-completion-at-point))

0 commit comments

Comments
 (0)