Giter Club home page Giter Club logo

ltags's Introduction

ltags produces tag files compatible with extended tags format used by Vim and many other editors This adds very useful semantic hints for symbols, such as basic type, global or file scope, belonging to what struct, etc.

Although Exuberant ctags is the most commonly used implementation, supporting 41 programming languages, it does not do Lua very well. It only does functions, and always collects the module and the function together (e.g 'tablex.imap') as the 'tag'. No extended type information is provided, and no indication of file scope.

Invocation is easy - this script only needs Lua (5.1 or 5.2) and is to be passed the filenames to be processed. On Windows, wildcard arguments will also be expanded.

As with ctags, a single file 'tags' is generated in the directory where ltags is invoked.

The -nv option switches off module-level local variable tagging. The common practice of declaring imported functions as locals up front can complicate the simple business of going to the original definition. So if we had local imap = tablex.imap up top then there would be two items with name 'imap' visible in that module - the local alias and the actual function. Not a problem if your editor is comfortable with multiple tag values.

The -nr option switches off module-level local require tagging. Class systems that return the class table from require produce lots of noise but the class definition is removed by -nv (it's too aggressive). If we had local Animal = class(function(a,name) a.name = name end), then that definition would be removed by -nv but is retained with -nr and imports of that class like local Animal = require("Animal") are not tagged.

ltags's People

Contributors

stevedonovan avatar idbrii avatar

Watchers

James Cloos 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.