Adventures with the Language Server Protocol¶

A practical guide to the Language Server Protocol (LSP). The guide builds a language server incrementally, in Python, using the pygls library.

Contents:

  • Introduction
    • LSP Overview
      • Client-Server Interaction
    • The Greet Language
  • First Language Server
    • Implementation Skeleton
      • Pre-Requisites
    • Anatomy of the Plugin
    • Tidying up the skeleton
      • Tiny baby steps - setting the language
      • Cleaning up
    • Naming: enough, already, Json
      • Package.json
      • extension.ts
      • server.py
    • Implementing Greet Language Support
  • Testing the Server
    • Testing the Parser
      • Positive Tests
      • Negative Tests
    • Testing the Server
      • Setup
      • Parsing a valid file on opening
      • Parsing an invalid file on opening
      • Ensuring file is parsed when changed
    • Wrapping up
  • Extending the Server: Definitions and References
    • Extending the Language Grammar
    • Starting with an end in mind
    • Bye-bye regular expressions, hello parser-generator
  • Installing Lark

Indices and tables¶

  • :ref:genindex

  • :ref:modindex

  • :ref:search

HelloLSP

Navigation

Contents:

  • Introduction
  • First Language Server
  • Testing the Server
  • Extending the Server: Definitions and References
  • Installing Lark

Related Topics

  • Documentation overview
    • Next: Introduction

Quick search

©2023, sfinnie. | Powered by Sphinx 7.0.1 & Alabaster 0.7.13 | Page source