GithubHelp home page GithubHelp logo

isabella232 / language-server-protocol Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sourcegraph/language-server-protocol

0.0 0.0 0.0 310 KB

Defines a common protocol for language servers.

License: Other

language-server-protocol's Introduction

Language Server Protocol

Note: A blog covering the background and mechanics of the protocol has been added to the Visual Studio Code site.

The Language Server protocol is used between a tool (the client) and a language smartness provider (the server) to integrate features like auto complete, goto definition, find all references and alike into the tool. The following diagram illustrates the communication between a tool and the language server.

Interaction diagram

The language server maintains semantic information about a program implemented in a particular language.

  • When the user opens a document in the tool, it notifies the language server that the document was opened and that the truth of the document is now maintained by the tool in a memory buffer.
  • When the user edits the document, the server is notified of the changes and updates the program's semantic information.
  • As the user makes changes the language server analyses the document and notifies the tool with any errors and warnings (diagnostics) that it finds.
  • When the user requests to go to the definition of a symbol, the client sends a definition request to the server. The server responds with the URI of the document and a range inside that document. Based on this information the tool opens the corresponding document at the position where the symbol is defined.
  • When the user closes the document, a didClose notification is sent, informing the language server that the truth of the file is now on the file system.

The communication between the Editor/IDE host and the Language Server uses JSON RPC v2.0. The protocol supports servers with different capabilities. The first request sent from the Editor/IDE to the language server informs the server about the supported language features.

The first version of the protocol is based on experiences we gained while integrating OmniSharp and the TypeScript Server into VS Code. See the history section for a brief history on how the protocol evolved.

Contributing

If you are interested in fixing issues like typos or contributing directly to the protocol specification you can either file an issue or provide a pull request containing the changes to the protocol.md file.

When proposing an extension to the specification, then please refer to an implementation of the proposed changes in a language server. This will help us in understanding the particular use case.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

The Language Server Protocol

The file protocol.md specifies the language server protocol.

License

Creative Commons Attribution / MIT

language-server-protocol's People

Contributors

aarnott avatar aeschli avatar akosyakov avatar beyang avatar bolinfest avatar chrismwendt avatar damieng avatar dbaeumer avatar egamma avatar felixfbecker avatar ggilmore avatar gregvanl avatar hediet avatar keegancsmith avatar ljw1004 avatar marwes avatar masaeedu avatar mkeller avatar mortonfox avatar msftgits avatar natgabb avatar othomann avatar persola avatar rictic avatar slimsag avatar smarter avatar sqs avatar vladdu avatar weinand avatar xanewok 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.