diff options
Diffstat (limited to 'helm-semantic.el')
-rw-r--r-- | helm-semantic.el | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/helm-semantic.el b/helm-semantic.el index 05b8880c..8fb8eded 100644 --- a/helm-semantic.el +++ b/helm-semantic.el @@ -50,6 +50,13 @@ ;; Internals vars (defvar helm-semantic--tags-cache nil) +(defcustom helm-semantic-display-style 'semantic-format-tag-summarize + "Function to present a semantic tag." + :group 'helm-semantic + :type '(radio + (const :tag "Default" semantic-format-tag-summarize) + (const :tag "Prototype" semantic-format-tag-prototype))) + (defun helm-semantic--fetch-candidates (tags depth &optional class) "Write the contents of TAGS to the current buffer." (let ((class class) cur-type) @@ -63,22 +70,23 @@ (setq class nil)) (insert (if (and class (not type-p)) - (format "%s%sClass(%s) " + (format "%s%s(%s) " spaces (if (< depth 2) "" "├►") class) spaces) ;; Save the tag for later - (propertize (semantic-format-tag-summarize tag nil t) + (propertize (funcall helm-semantic-display-style tag nil t) 'semantic-tag tag) "\n") (and type-p (setq class (car tag))) ;; Recurse to children - (helm-semantic--fetch-candidates - (semantic-tag-components tag) (1+ depth) class))) + (unless (eq cur-type 'function) + (helm-semantic--fetch-candidates + (semantic-tag-components tag) (1+ depth) class)))) ;; Don't do anything with packages or includes for now ((package include) (insert - (propertize (semantic-format-tag-summarize tag nil t) + (propertize (funcall helm-semantic-display-style tag nil t) 'semantic-tag tag) "\n") ) |