A fast, friendly, functional language. https://roc-lang.org
Find a file
Etienne Latendresse-Tremblay 0426fe4a93
Add document storage and didOpen/didChange to LSP (#8453)
* Add documents storage

Currently using a StringHashMap to store the different project documents. Might investigate into doing some caching later down the line.

* Integrate document store and notifications

Add the document store to the Server struct. Also separate the handlers into request and notifications as their data structure and expected response differ.

* Separate values assignment to different files

In order to remove the need to modify `initialize.zig` and `protocol.zig` whenever a new version or new server capabilities is implemented, version was moved to the Server struct and capabilities to a separate file.

* Add support for incremental change

Document store now supports incremental change of files which mean it's possible to change a part of the file without inserting the whole file each time.

* Add notification for didOpen and didChange

Currently just stores opened buffer into a StringHashMap which will allow parsing them later on.

* Fix enum conversion

The text document sync type was being sent as a string instead of its integer equivalent.

* Add tests for document store

* Ensure test wiring

* Add more documentation to README.md

---------

Co-authored-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>
2025-11-29 11:28:10 +01:00
.cargo Fix some tests 2025-01-10 20:49:53 -05:00
.devcontainer used roc image for devcontainer 2025-01-07 23:07:29 +00:00
.github Restore build to origin/main 2025-11-27 17:41:31 -05:00
.reuse s/rtfeldman/roc-lang/g in links to GitHub repos 2022-08-12 15:24:09 -04:00
ci fix permissions + no old CI 2025-11-27 22:27:33 +01:00
crates Bump node-forge from 1.3.1 to 1.3.2 in /crates/compiler/checkmate/www (#8462) 2025-11-27 10:40:55 +01:00
design glossary: type signature + typos upgrade (#7776) 2025-05-07 17:35:56 +02:00
devtools Update debug_tips.md (#8127) 2025-07-28 15:37:19 +02:00
docker ditch old_linux + references (#7639) 2025-02-26 12:22:07 +01:00
examples correct link 2025-03-31 18:26:20 +02:00
nix add licenses subcommand (#7787) 2025-05-17 10:30:41 +02:00
src Add document storage and didOpen/didChange to LSP (#8453) 2025-11-29 11:28:10 +01:00
test Merge pull request #8495 from roc-lang/fix-arrow 2025-11-29 04:39:08 -05:00
.gitattributes add snapshots to .gitattributes 2025-06-16 12:44:19 +02:00
.gitignore Revert .gitignore 2025-11-09 20:18:55 -05:00
.llvmenv start with flake updates 2024-07-28 15:55:36 +10:00
.rules Merge origin/main 2025-11-22 15:45:17 -05:00
AGENT.md wip 2025-07-04 21:59:03 -04:00
authors Lowercased some files (#7713) 2025-03-24 16:43:18 +01:00
build.zig fix PlatformNotSupported linux 2025-11-28 20:41:36 +01:00
build.zig.zon Simplify DecompressingHashReader 2025-10-21 15:32:53 +00:00
BUILDING_FROM_SOURCE.md Update Zig version from 0.15.1 to 0.15.2 2025-10-31 18:21:26 +01:00
Cargo.lock Bump tracing-subscriber from 0.3.19 to 0.3.20 (#8232) 2025-09-06 18:00:22 +00:00
Cargo.toml Bump tracing-subscriber from 0.3.19 to 0.3.20 (#8232) 2025-09-06 18:00:22 +00:00
code_of_conduct.md Lowercased some files (#7713) 2025-03-24 16:43:18 +01:00
CONTRIBUTING.md better error msg when no main.roc (#8251) 2025-09-29 19:02:26 +02:00
default.nix don't use flakehub input for flake-compat and update a comment 2023-11-15 23:30:15 -05:00
flake.lock nix flake cleanup (#7576) 2025-02-04 19:05:57 +01:00
flake.nix website has moved to https://github.com/roc-lang/www.roc-lang.org (#8094) 2025-07-22 18:53:15 +02:00
Glossary.md Update Glossary.md 2025-08-12 17:39:21 +10:00
legal_details Lowercased some files (#7713) 2025-03-24 16:43:18 +01:00
LICENSE Use © instead of (c) for copyright symbol 2021-05-03 21:18:36 -04:00
mlc_config.json ignore local html files 2023-08-02 11:28:20 +02:00
README.md Update sponsors in readme 2025-07-14 11:24:45 -04:00
rust-toolchain.toml glossary: type signature + typos upgrade (#7776) 2025-05-07 17:35:56 +02:00
shell.nix feat(nix): make buildRocPackage fetch dependencies recursively (#7729) 2025-04-18 20:11:09 +02:00
typos.toml more Result>Try updates (#8382) 2025-11-14 17:10:55 +01:00
version.txt Restore version.txt 2025-08-11 22:52:07 -04:00

Work in progress!

Roc is not ready for a 0.1 release yet, but we do have:

If you'd like to contribute, get started here. Don't hesitate to ask for help on our group chat, we're friendly!

Sponsors

You can 💜 sponsor 💜 Roc on:

We are very grateful for our corporate sponsors Lambda Class, ohne-makler, and Decem:

Lambda Class logo      ohne-makler logo      Decem logo

If you would like your company to become a corporate sponsor of Roc's development, please DM Richard Feldman on Zulip!

We'd also like to express our gratitude to our generous individual sponsors! A special thanks to those sponsoring $25/month or more:

Thank you all so much for helping Roc progress!