File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change 99
99
(push tag company-semantic--current-tags)))
100
100
(delete " " (mapcar 'semantic-tag-name company-semantic--current-tags)))
101
101
102
+ (defun company-semantic-annotation (argument tags )
103
+ (let* ((tag (assoc argument tags))
104
+ (kind (when tag (elt tag 1 ))))
105
+ (cl-case kind
106
+ (function (let* ((prototype (semantic-format-tag-prototype tag nil nil ))
107
+ (par-pos (string-match " (" prototype)))
108
+ (when par-pos (substring prototype par-pos)))))))
109
+
102
110
(defun company-semantic--pre-prefix-length (prefix-length )
103
111
" Sum up the length of all chained symbols before POS.
104
112
Symbols are chained by \" .\" or \" ->\" ."
@@ -133,6 +141,8 @@ Symbols are chained by \".\" or \"->\"."
133
141
(company-semantic-completions arg)))
134
142
(meta (funcall company-semantic-metadata-function
135
143
(assoc arg company-semantic--current-tags)))
144
+ (annotation (company-semantic-annotation arg
145
+ company-semantic--current-tags))
136
146
(doc-buffer (company-semantic-doc-buffer
137
147
(assoc arg company-semantic--current-tags)))
138
148
; ; Because "" is an empty context and doesn't return local variables.
You can’t perform that action at this time.
0 commit comments