Advice/best practice/arhitecture pattern for building language with LSP in mind?

This page summarizes the projects mentioned and recommended in the original post on /r/ProgrammingLanguages

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • salsa

    A generic framework for on-demand, incrementalized computation. Inspired by adapton, glimmer, and rustc's query system.

  • I would recommend checking out query based compiler architectures. The rust library salsa serves as a good example for how to implement these frameworks (and if you are using rust, then you can just build your compiler on top of this library). Also, check out this blog post from the author of Sixten in which he goes over how he built his own query based compiler architecture before salsa. https://ollef.github.io/blog/posts/query-based-compilers.html

  • merlin

    Context sensitive completion for OCaml in Vim and Emacs

  • Self-advertising: I partcipated to the writing of Merlin: A Language Server for OCaml (Experience Report), which explains the overall design of Merlin, a language server for OCaml. A key idea of Merlin are that classic lexing-parsing-typing pipelines can easily be adapted to be incremental for a Language Server, especially when they are using immutable data structures.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • eclair

    Éclair - Parsing with derivatives and zippers (by redelmann)

  • There is also this paper (https://arxiv.org/pdf/1911.12737.pdf) and corresponding codebase https://github.com/redelmann/eclair, which I've only skimmed but it looks interesting as well.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts