GithubHelp home page GithubHelp logo

pjan / lushtags Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mkasa/lushtags

0.0 3.0 0.0 107 KB

Create ctags compatible tags files for Haskell programs

License: MIT License

Haskell 91.33% Vim Script 8.67%

lushtags's Introduction

lushtags

This repository is forked from (bitc/lushtags)[https://github.com/bitc/lushtags] because it was not maintained (at least it looked so to me). The difference from the last fork is shown in the last section.

Create ctags compatible tags files for Haskell programs

Similar programs are hasktags, gasbag, hothasktags, and GHC's builtin ctags generation.

lushtags differs from these by being designed to have smooth integration with the Vim Tagbar plugin.

Tagbar is nice because it deals with creating tags automatically. There is no need to manually run commands or keep track of tag files. Just open any Haskell file in Vim and the Tagbar window will instantly show an interactive browsable list of all the functions and declarations in the file. This window also updates automatically as you edit the file.

The tags created by lushtags are marked with several extensions, so that when used with Tagbar you get these features:

  • Type signatures are displayed for functions.
  • Tags are properly scoped so that, for example, data declarations appear as a tree with their constructors scoped as children.
  • Definitions that are exported from the module are marked as "public" and appear emphasized in Tagbar.
  • Tag locations are internally stored as patterns, not line numbers, so that you can correctly jump to tags even if they have moved in the source code during editing.

screenshot

The original version of lushtags could not handle fields, but this version can handle them.

screenshot2

Using lushtags with Vim and the Tagbar plugin

  1. Build and install the lushtags executable

    Using cabal:

     $ cabal configure
     $ cabal build
     $ cabal install
    

    Using stack:

     $ stack build
     $ stack install
    
  2. Install the Tagbar plugin. Tagbar can be found at

    http://www.vim.org/scripts/script.php?script_id=3465 http://majutsushi.github.com/tagbar/

  3. Install the included Haskell Tagbar configuration:

     $ cp plugin/tagbar-haskell.vim ~/.vim/plugin/
    
  4. Try it out:

     $ vim Hello.hs
    

Now open the Tagbar with the command :TagbarOpen. An interactive sidebar will appear with all of the tags in your Haskell source file.

Differences from bitc/lushtags

  • Compatible with GHC 7.10.3 (probably with older versions down to 7.8.3 as well)
  • Outputs record functions.

lushtags's People

Contributors

bitc avatar cristhianmotoche avatar jagajaga avatar mkasa avatar vaibhavsagar avatar uuhan avatar

Watchers

pjan vandaele avatar James Cloos avatar  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.