File tree Expand file tree Collapse file tree 2 files changed +36
-3
lines changed Expand file tree Collapse file tree 2 files changed +36
-3
lines changed Original file line number Diff line number Diff line change @@ -216,7 +216,9 @@ and complete members."
216
216
. ,(omnisharp--t-or-json-false
217
217
omnisharp-auto-complete-want-importable-types))
218
218
219
- (WordToComplete . ,(thing-at-point 'symbol )))
219
+ (WordToComplete . ,(thing-at-point 'symbol ))
220
+
221
+ (WantKind . t ))
220
222
221
223
(omnisharp--get-request-object)))
222
224
@@ -672,15 +674,45 @@ is a more sophisticated matching framework than what popup.el offers."
672
674
(when required-namespace-import
673
675
(omnisharp--insert-namespace-import required-namespace-import)))))
674
676
677
+ (defun omnisharp--convert-auto-complete-kind-to-popup-symbol-value (kind )
678
+ (pcase kind
679
+ ; ; auto-complete's recommended rules
680
+ ; ;; Symbol
681
+ (" Keyword" " s" )
682
+ ; ;; Function, Method
683
+ (" Method" " f" )
684
+ (" Function" " f" )
685
+ (" Constructor" " f" )
686
+ ; ;; Variable
687
+ (" Field" " v" )
688
+ (" Variable" " v" )
689
+ (" Property" " v" )
690
+ ; ;; Constant
691
+ ; ;; Abbreviation
692
+ (" Value" " a" )
693
+ ; ; original rules
694
+ (" Text" " " )
695
+ (" Class" " t" )
696
+ (" Interface" " i" )
697
+ (" Enum" " e" )
698
+ (" Module" " m" )
699
+ (" Unit" " u" )
700
+ (" Snippet" " " )
701
+ (" Color" " " )
702
+ (" File" " f" )
703
+ (" Reference" " r" )))
704
+
675
705
(defun omnisharp--convert-auto-complete-result-to-popup-format (json-result-alist )
676
706
(mapcar
677
707
(-lambda ((&alist 'DisplayText display-text
678
708
'CompletionText completion-text
679
709
'Description description
680
710
'Snippet snippet
681
- 'RequiredNamespaceImport require-ns-import))
711
+ 'RequiredNamespaceImport require-ns-import
712
+ 'Kind kind))
682
713
(popup-make-item display-text
683
714
:value (propertize completion-text 'Snippet snippet 'RequiredNamespaceImport require-ns-import)
715
+ :symbol (omnisharp--convert-auto-complete-kind-to-popup-symbol-value kind)
684
716
:document description))
685
717
json-result-alist))
686
718
Original file line number Diff line number Diff line change @@ -251,7 +251,8 @@ expected output in that buffer"
251
251
(RequiredNamespaceImport . nil )
252
252
(DisplayText . " Verbosity Verbose - display text" )
253
253
(Description . , description )
254
- (CompletionText . , completion-text ))])
254
+ (CompletionText . , completion-text )
255
+ (Kind . " Verbose" ))])
255
256
(converted-popup-item
256
257
(nth 0
257
258
(omnisharp--convert-auto-complete-result-to-popup-format
You can’t perform that action at this time.
0 commit comments