Skip to main content

Adapting Red to the Language Server Protocol

Supervisor

Suitable for

Mathematics and Computer Science, Part C
Computer Science and Philosophy, Part C
Computer Science, Part C
Computer Science, Part B

Abstract

The Language Server Protocol is an open, JSON-RPC-based protocol for use between source code editors or integrated development environments (IDEs) and servers that provide ”language intelligence tools”: programming language-specific features like code completion, syntax highlighting and marking of warnings and errors, as well as refactoring routines. The goal of the protocol is to allow programming language support to be implemented and distributed independently of any given editor or IDE. In the early 2020s LSP quickly became a norm for language intelligence tools providers.


Red (also known as AppleRed) is no-frills, unicode-capable, modeless text editor with a simple implementation that can be customized using the redscript language (a Lisp-like notation). Its underlying capabilities can be straightforwardly extended using Scala. It has no pretensions to being an all-encompassing workplace, and unlike many IDE and modern editors does not confuse its user by spontaneously trying to be helpful: everything it does it does in response to user input from mouse, pad, or keyboard. Sometimes such “helpful” systems can be tricky to use because it’s not clear who or what is in control.


The aim of this project is to adapt Red to the LSP, and to use one or two specific Language Servers as test cases. Examples of language servers are: Metals (for Scala), rust.Analyzer(for Rust), haskell language server (for Haskell), and texlab (for Latex).