Skip to content

Self recursion tags generation agorithm based on exctags

License

Notifications You must be signed in to change notification settings

rhexo/tags-smoothie

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

tags-smoothie

Self recursion tags generation agorithm based on exctags

requirments

configuration

Need to be added in .emacs

(setq projectile-tags-command "/usr/local/bin/exctags -Re -f \"%s\" --language-force=c++ %s %s")

(add-to-list 'load-path "/home/rhexo/.emacs.d/tags-smoothie")
(require 'tags-smoothie)

;; sets search directories for system includes (see defaults in tags-smoothie.el)
(setq tags-smoothie-search-path
      '("/usr/include/"                    ;; system/include support
        "/usr/local/include/"              ;; local/include support
        "/usr/include/c++/v1/"))           ;; c++ support

;; project directories that will be excluded from overview (see defaults in tags-smoothie.el)
(setq tags-smoothie-cpp-dir-to-exclude '("/build" "/bin"))

;; redefinition of projectile regeneration tags procedure
(defun projectile-regenerate-tags ()
  "Regenerate the project's [e|g]tags. Override function"
  (interactive)
  (let* ((project-root (projectile-project-root))
         (tags-exclude (projectile-tags-exclude-patterns))
         (default-directory project-root)
         (tags-file (expand-file-name projectile-tags-file-name))
         (tags-includes (tags-smoothie-get-files-stream project-root))
         (command (format projectile-tags-command tags-file tags-includes tags-exclude))
         shell-output exit-code)
    (with-temp-buffer
      (setq exit-code
            (call-process-shell-command command nil (current-buffer))
            shell-output (projectile-trim-string
                          (buffer-substring (point-min) (point-max)))))
    (unless (zerop exit-code)
      (error shell-output))
    (visit-tags-table tags-file)))

--language-force=c++ needed for compiling includes like string or map, i.e. includes without file extension

If you are using tags-smoothie for non c/c++ projects you have to omitted this option.

About

Self recursion tags generation agorithm based on exctags

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published