ufo5260987423 /scheme-langserver

Scheme language server

★ 298⑂ 21👁 7⑃ 51● 24▤ 37
SchemeNOASSERTIONCreated 2022-08-09
下载:2.2.02.2.0 ↓2.2.02026-11-06
+0
日增长
298
stars
21
forks
7
watchers
51
prs
24
issues
37
releases

README

!
 Scheme-langserver



You may read my paper and cite like this:

 WANG, Z. (2025, May 12). Scheme-langserver: Treat Scheme Code Editing as the First-Class Concern. The 18th European Lisp Symposium (ELS25), Zurich. https://doi.org/10.5281/zenodo.15384882

Due to occasional GitHub access restrictions from China, this repository is also mirrored on Codeberg and Gitee. I collaborate with XmacsLabs; a fork is available here.



VSCode is now supported! See the setup guide.

 Note: Auto-generated type information is available here. It is mainly used for downstream development and debugging.

Implementing IDE features like autocomplete, goto definition, and hover documentation is a significant effort. Compared to languages like Java, Python, JavaScript, or C, language server implementations for Lisp dialects are still scarce. Existing tools such as Geiser, racket langserver, and swish-lint rely primarily on a REPL or keyword tokenization rather than static program analysis.

For example, when editing an incomplete project whose code is not yet fully executable, Geiser can only complete top-level bindings listed by environment-symbols (on Chez Scheme) or raw symbols—not true identifiers. This means local bindings and unfinished code receive no help in recognizing valid identifier scopes. The same limitation applies to goto definition and other core IDE features.

The root cause is that Scheme and other Lisp dialects present a formidable challenge for program analysis: their rich data structures, flexible control flow, and especially macros make static reasoning difficult. But this does not mean Scheme is only for geniuses and meta-programming. With a better editing environment, Scheme can be accessible and productive for everyone.

scheme-langserver is a Language Server Protocol (LSP) implementation for Scheme that provides completion, goto definition, hover, and type inference through static code analysis based on the R6RS standard, with switchable top environments for R6RS, R7RS, S7, and Fluent Scheme (Ansys Fluent's embedded Petite Chez Scheme). It handles incomplete code gracefully and is published via Akku, a Scheme package manager.

The server has been tested on Chez Scheme 9.4, 9.5, and 10.x.

 Compilation, Installation & Configuration
See the setup guide.

 Workspace Cache

scheme-langserver can persist the analyzed workspace state to a Chez FASL cache so
that subsequent restarts skip the expensive init-references phase. Enable it
with the --cache-path option:

bash
./run --cache-path ~/.cache/scheme-langserver


The cache file is written to /workspace.fasl. It is saved when the
server receives a normal LSP exit or shutdown request; if the process
crashes or is killed, the previously saved cache remains usable. The cache is
keyed by a manifest that includes the langserver version, Chez version, machine
type, and record-layout fingerprint; any mismatch falls back to a cold start.
Because Chez FASL is platform-specific, do not share the cache fil

Top issues

Discussions

Latest release

2.2.0 2.2.0 2026-11-06

Snapshot: 2026-11-16T09:23:14Z · Data license Apache-2.0 · JSON