## Next
+* `company-semantic-insert-arguments`: New option. Like in `company-clang`.
* `company-semantic-begin-after-member-access`: New option. Similar to the one
in `company-clang`.
* `company-capf` accepts `:company-prefix-length` property function.
;;; Code:
(require 'company)
+(require 'company-template)
(require 'cl-lib)
(defvar semantic-idle-summary-function)
and `c-electric-colon', for automatic completion right after \">\" and
\":\".")
+(defcustom company-semantic-insert-arguments t
+ "When non-nil, insert function arguments as a template after completion."
+ :type 'boolean
+ :package-version '(company . "0.9.0"))
+
(defvar company-semantic-modes '(c-mode c++-mode jde-mode java-mode))
(defvar-local company-semantic--current-tags nil
(location (let ((tag (assoc arg company-semantic--current-tags)))
(when (buffer-live-p (semantic-tag-buffer tag))
(cons (semantic-tag-buffer tag)
- (semantic-tag-start tag)))))))
+ (semantic-tag-start tag)))))
+ (post-completion (let ((anno (company-semantic-annotation
+ arg company-semantic--current-tags)))
+ (when (and company-semantic-insert-arguments anno)
+ (insert anno)
+ (company-template-c-like-templatify (concat arg anno)))
+ ))))
(provide 'company-semantic)
;;; company-semantic.el ends here