Skip to content

Commit

Permalink
Add completionItem resolve
Browse files Browse the repository at this point in the history
  • Loading branch information
mopemope committed May 8, 2018
1 parent c0080d1 commit ac6362d
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
11 changes: 9 additions & 2 deletions company-meghanada.el
Original file line number Diff line number Diff line change
Expand Up @@ -297,8 +297,15 @@

(defun company-meghanada--post-completion (arg)
(let ((type (intern (get-text-property 0 'type arg)))
(meta (get-text-property 0 'meta arg)))

(meta (get-text-property 0 'meta arg))
(desc (get-text-property 0 'desc arg))
(anno (company-meghanada--annotation arg)))
;;(message (format "@ arg:%s meta:%s desc:%s anno:%s" arg meta desc anno))
(meghanada-autocomplete-resolve-async
type
arg
desc
#'identity)
(pcase type
;; completion class
(`CLASS (company-meghanada--post-class arg))
Expand Down
15 changes: 15 additions & 0 deletions meghanada.el
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

;;; meghanada.el --- A better java development mode -*- coding: utf-8; lexical-binding: t; -*-

;; Copyright (C) 2017 Yutaka Matsubara
Expand Down Expand Up @@ -1033,6 +1034,20 @@ e.g. java.lang.annotation)."
prefix)
(message "client connection not established")))

(defun meghanada-autocomplete-resolve-async (type item desc callback)
"TODO: FIX DOC TYPE ITEM DESC CALLBACK."
(if (and meghanada--client-process (process-live-p meghanada--client-process))
(meghanada--send-request "cr"
callback
(buffer-file-name)
(meghanada--what-line)
(meghanada--what-column)
(format "\"%s\"" type)
(format "\"%s\"" item)
(format "\"%s\"" desc))
(message "client connection not established")))


(defun meghanada--local-val-callback (result)
"TODO: FIX DOC OUTPUT ."
(let* ((return-type (car result))
Expand Down

0 comments on commit ac6362d

Please sign in to comment.