Skip to content

Commit

Permalink
Include data in completionEntryDetails request (#467)
Browse files Browse the repository at this point in the history
* Include data in completionEntryDetails request

* Fix syntax

* Handle case where only data is present
  • Loading branch information
JaydenNavarro-at authored Jun 20, 2023
1 parent bb09bcc commit b38dfc3
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions tide.el
Original file line number Diff line number Diff line change
Expand Up @@ -1734,9 +1734,14 @@ This function is used for the basic completions sorting."

(defun tide-command:completionEntryDetails (name)
(let* ((source (plist-get (get-text-property 0 'completion name) :source))
(entry-names (if source
`(:entryNames [(:name ,name :source ,source)])
`(:entryNames [,name])))
(data (plist-get (get-text-property 0 'completion name) :data))
(entry-names (cond ((and source data)
`(:entryNames [(:name ,name :source ,source :data ,data)]))
(source
`(:entryNames [(:name ,name :source ,source)]))
(data
`(:entryNames [(:name ,name :data ,data)]))
(t `(:entryNames [,name]))))
(arguments (-concat (get-text-property 0 'file-location name)
entry-names)))
(-when-let (response (tide-send-command-sync "completionEntryDetails" arguments))
Expand Down

0 comments on commit b38dfc3

Please sign in to comment.