Skip to content

Commit

Permalink
Fix REPL completion when no adapter connection
Browse files Browse the repository at this point in the history
  • Loading branch information
svaante committed Apr 22, 2024
1 parent c6c8db1 commit 181f11b
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions dape.el
Original file line number Diff line number Diff line change
Expand Up @@ -4278,14 +4278,16 @@ Send INPUT to DUMMY-PROCESS."
(let* ((bounds (or (bounds-of-thing-at-point 'word)
(cons (point) (point))))
(trigger-chars
(or (thread-first (dape--live-connection 'last t)
(dape--capabilities)
;; completionTriggerCharacters is an
;; unofficial array of string to trigger
;; completion on.
(plist-get :completionTriggerCharacters)
(append nil))
'(".")))
(when-let ((conn (or (dape--live-connection 'stopped t)
(dape--live-connection 'last t))))
(or (thread-first conn
(dape--capabilities)
;; completionTriggerCharacters is an
;; unofficial array of string to trigger
;; completion on.
(plist-get :completionTriggerCharacters)
(append nil))
'("."))))
(collection
;; Add `dape-repl-commands' only if completion starts at
;; beginning of prompt line.
Expand Down

0 comments on commit 181f11b

Please sign in to comment.