GithubHelp home page GithubHelp logo

nejch / lsif-py Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sourcegraph/lsif-py

0.0 1.0 0.0 40 KB

Language Server Indexing Format implementation for Python

License: MIT License

Python 100.00%

lsif-py's Introduction

Python LSIF Indexer

๐Ÿšจ This implementation is in its infancy and conforms to the 0.4.0 draft of the LSIF spec.

Language Server Index Format

The purpose of the Language Server Index Format (LSIF) is to define a standard format for language servers and related tools to dump their knowledge about a workspace. The dump is basically a pre-computed set of responses that a language server would send back about a particular range of source code.

Basic Usage

To run the indexer, simply run the provided shell script wrapper and provide a workspace directory to be indexed.

$ ./lsif-py lsif_indexer
Indexing file lsif_indexer/analysis.py
Indexing file lsif_indexer/index.py
Indexing file lsif_indexer/__init__.py
Indexing file lsif_indexer/consts.py
Indexing file lsif_indexer/script.py
Indexing file lsif_indexer/emitter.py

Processed in 2834.89ms

Verbose logging can be enabled with -v. The dump file is data.lsif by default, but can be changed via the -o <filename> flag.

Installation Notes

The indexer requires Python 3.x. To install dependencies, run:

pip install -r requirements.txt

If you don't want to install dependencies globally, use virtualenv:

$ virtualenv venv
$ source venv/bin/activate
(venv) $ pip install -r requirements.txt
(venv) $ ./lsif-py lsif_indexer
# ...
(venv) $ deactivate
$

Installation on macOS

On macOS, where the system Python on macOS is still 2.7.x, you can install Python 3 via Homebrew:

brew install python@3

You may need to write pip3 instead of pip to get the correct version.

lsif-py's People

Contributors

efritz 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.