+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
#69Is there support for inlay hints for function arguments and structures?12 comments · 2025-06-22#65Guile Scheme support8 comments · 2025-02-23#78Integration with data files from index.scheme.org project3 comments · 2026-02-12#76[Doc] Mason package3 comments · 2025-12-08#77Failed to cooperate with helix editor2 comments · 2026-02-05#79Are you aware of scheme-lsp-server?1 comments · 2026-02-25
Discussions
#84How do you sovle these problems1 comments · 2026-06-14#81My Vibe Coding Journey with Scheme-Langserver0 comments · 2026-05-29#64What do scheme-langserver+magic-scheme look like?0 comments · 2025-02-21#61Error happening every time the file is changed in neovim0 comments · 2025-01-29#58How to quickly address identifications between symbols before and after macro expansion?0 comments · 2025-01-04#46How Do I Use Scheme in Production Environment?0 comments · 2024-06-27#34What is scheme-langserver thinking about now?0 comments · 2024-02-02#27What's the modest behavior for .ss and .sps extensions?1 comments · 2023-01-23