Code Monkey home page Code Monkey logo

tags-smoothie's Introduction

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.

tags-smoothie's People

Contributors

rhexo avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.