represent LS documents more sophisticated #17

Open
opened 2026-03-18 13:11:10 +01:00 by EatOreo · 0 comments
Owner

Right now we represent the contents of the source file (.imp) as just a big string. We should probably use something more sophisticated in the future, both for better performance and easier lookup. A simple thing could be an array of lines but there must exist even better data structures implemented in a rust crate. Like easy to look up with lsp position (https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#position), line and character number. Will make it easier to do incremental document sync, create and forward diagnostics, hover and so on.

Right now we represent the contents of the source file (.imp) as just a big string. We should probably use something more sophisticated in the future, both for better performance and easier lookup. A simple thing could be an array of lines but there must exist even better data structures implemented in a rust crate. Like easy to look up with lsp position (https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#position), line and character number. Will make it easier to do incremental document sync, create and forward diagnostics, hover and so on.
EatOreo added this to the Kanban project 2026-03-18 13:36:17 +01:00
Commenting is not possible because the repository is archived.
No labels
No milestone
No project
No assignees
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
code2rocq/imp2rocq#17
No description provided.