[Announce] navigation bar and semantic code search


#1

Hi,
I always get lost in code so I made tool for better navigation and for code searching.

It basically analyses all the code files in project and gather info about each of them.

Then it presents contextual information in form of breadcrumbs and navigable side panel:

As you can see, it can also detect JSX in functions.

I has also support for AngularJS:

You can also search.

By name:

By type:

Or by performing some weird deep search like “show me object literals that have property color set to red”

You can also perform global search by beginning with two dots:

I just think that we need better tools for exploring and understanding codebases (especially when you are new in project, especially big one). And we need better tools for navigating and code searching :slight_smile:

What do you think about this project? I would like to read some feedback.

Package site:
url: https://atom.io/packages/atom-lupa


#2

It looks like it only supports JavaScript? Not Ruby, Elixir, Lua or C++?


#3

For now only JavaScript has full support.
But I think about adding support for other languages.

However because I perform full parsing to AST (in contrast to regexp based approach I’ve seen in other similar plugins) adding support for some additional language X means

  1. finding good parser for language X (not every parser is good).
  2. to find good parser for language X, I may need to leave safe JavaScript land and search for example Python parser written in Python. In this situation I would have to glue few languages in one app (probably not a big problem, I could use child_process.spawn to run for example Python intepreter)
  3. then I would have to explore parser AST (this is not always obvious thing) and figure out “how extract informations from tree”. Then to write script for analysing, and check corner cases, fix bugs etc.

Off course even without a parser I could just add simplified RegExp based approaches for other languages. I could hack symbols-view package and take data from it (if symbols-view generates such data itself). Or I could use ctags.

In this way I could deliver good support for JavaScript, and mediocre (i.e. regexp based approaches will always be mediocre) support for all other languages.

So I would like to add support for some other languages in near future, but how exactly I would do that is open question.

I think also for which languages I could implement support first (popularity counts so Ruby would have more priority than Elixir)


#5

Is it possible to support c++ using libtooling or even http://clang.llvm.org/docs/ClangCheck.html


#6

I made LIVE DEMO running in browser: http://hex13.github.io/atom-lupa/ :slight_smile:

Besides I’ve added basic TypeScript and Python support (live demo is JS only for now).