Giter Site home page Giter Site logo

flow-language-server's Introduction

Flow Language Server

npm CircleCI

This is an implementation of the Language Server Protocol for the Flow static type checker for JavaScript. flow-language-server makes creating a Flow integration for your favorite text editor or IDE much simpler.

Requirements

flow-language-server requires Node v6 or any later maintained version of Node.js. It also requires any supported operating system platform for Flow.

Installation

You most likely don't need to install flow-language-server directly if you want Flow support for your favorite editor; instead, check out the integrations below.

How it works

flow-language-server wraps the existing flow server binary the user has installed either locally in their project as the flow-bin module from npm, or globally as the flow binary. flow-language-server translates messages as they come in from Flow, sending them over JSON RPC via stdio, node-ipc, a socket, or a named pipe. It also, for the time being, automatically downloads and manages any missing flow binaries, though this probably is best suited to each individual editor integration.

Building an editor integration

If your editor integration is built with node.js, you can install flow-language-server as a dependency:

  • yarn add flow-language-server or
  • npm install -S flow-language-server

Otherwise, flow-language-server can be installed globally from npm into the user's path:

  • yarn global add flow-language-server or
  • npm install -g flow-language-server

Editor Integrations

Developed in conjunction with flow-language-server, Flow for Atom IDE showcases all that the language server has to offer. Install it as ide-flow through Atom's package manager along with atom-ide-ui.

Neovim

flow-language-server can be used with neovim:

  1. Install LanguageClient-neovim
  2. Run npm install -g flow-language-server or yarn global add flow-language-server
  3. Add the following to neovim's configuration:
let g:LanguageClient_serverCommands = {
\ 'javascript': ['flow-language-server', '--stdio'],
\ }

" (Optionally) automatically start language servers.
let g:LanguageClient_autoStart = 1

Wrote your own editor integration using flow-language-server? Send us a pull request to add it here!

Contributing

Facebook has adopted a Code of Conduct that we expect project participants to adhere to. Please read the full text so that you can understand what actions will and will not be tolerated.

Contributor License Agreement ("CLA")

In order to accept your pull request, we need you to submit a CLA. You only need to do this once to work on any of Facebook's open source projects.

Complete your CLA here: https://code.facebook.com/cla

License

flow-language-server is BSD licensed. We also provide an additional patent grant.

flow-language-server's People

Contributors

bolinfest avatar hansonw avatar janicduplessis avatar wbinnssmith avatar

Watchers

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