Skip to content

[#1653] Implement document link request, add `get_cst` function

Sorokin-Anton requested to merge Sorokin-Anton/#1653-document-link into dev

Motivation and Context

We want to support more LSP requests


Add support for document link request Add get_cst function that returns CST of a code from a text document, even if document was edited but not saved. To do this, we need to keep file contents in memory when text document did update happened. Also lexer was unable to read input from string (not from file/channel), this was fixed in first 2 commits.

Also added a module for testing handlers using mocked env.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Performance improvement (non-breaking change that improves performance)
  • None (change with no changelog)


Added support for document link request to ligo lsp


  • Changes follow the existing coding style (use dune @fmt to check).
  • Tests for the changes have been added (for bug fixes / feature).
  • Documentation has been updated.
  • Changelog description has been added (if appropriate).
  • Start titles under ## Changelog section with #### (if appropriate).
  • There is no image or uploaded file in changelog
  • Examples in changed behaviour have been added to the changelog (for breaking change / feature).
Edited by Sorokin-Anton

Merge request reports