[#1675] Add module signatures on hover
Motivation and Context
Problem
Right now there is a (* ... *)
placeholder for module signatures
on hover. Let's fill it with the right signature.
Solution
Propagate signatures like types inside types pass in the scopes module.
Decompile these Ast_typed.signature
and use pretty printers to show
them to the user.
Related issues
Resolves #1675 (closed) .

Checklist for the LIGO Language Server

- I checked whether I need to update the
README.md
file for the plugin and did so if necessary:-
If I implemented a new LSP request, I added it to the list of supported features that may be disabled -
If I implemented a new LSP method, I added it to the list of supported functionality
-
-
I checked that my changes work in Emacs, Vim, and Visual Studio Code -
(Before merging) The commit history is squashed and prettified, and follows the Serokell commit policy, or the MR is set to squash the commits
Description
Component
-
compiler -
website -
webide -
vscode-plugin -
debugger
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)
Changelog
Added signatures for modules on hovering. They're displayed like:
module Bytes : sig
val concats : bytes list -> bytes
val pack : a -> bytes
val unpack : bytes -> a option
val length : bytes -> nat
val concat : bytes -> bytes -> bytes
val sub : nat -> nat -> bytes -> bytes
end
Checklist:
-
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).
Merge request reports
Activity
added directionLanguage Server label
requested review from @heitor.toledo
assigned to @DK318
- Resolved by Heitor Toledo Lassarote de Paula
added 1 commit
- 024ee60c - fixup! [#1675 (closed)] Add module signatures on hover
marked this merge request as draft from 024ee60c
- Resolved by Heitor Toledo Lassarote de Paula
- Resolved by Heitor Toledo Lassarote de Paula
- Resolved by Heitor Toledo Lassarote de Paula
- Resolved by Heitor Toledo Lassarote de Paula
- Resolved by Heitor Toledo Lassarote de Paula
mentioned in merge request !2961 (merged)
added 103 commits
-
024ee60c...54c24fcc - 100 commits from branch
dev
- d6dd9740 - [#1675 (closed)] Add module signatures on hover
- 71992a5f - fixup! [#1675 (closed)] Add module signatures on hover
- 44c9df0e - fixup! fixup! [#1675 (closed)] Add module signatures on hover
Toggle commit list-
024ee60c...54c24fcc - 100 commits from branch
- Resolved by Heitor Toledo Lassarote de Paula
- Resolved by Heitor Toledo Lassarote de Paula
- Resolved by Heitor Toledo Lassarote de Paula
added 1 commit
- a7656b51 - fixup! fixup! fixup! [#1675 (closed)] Add module signatures on hover
added 13 commits
-
a7656b51...aa0c156c - 12 commits from branch
dev
- 4ec0f67e - [#1675 (closed)] Add module signatures on hover
-
a7656b51...aa0c156c - 12 commits from branch
mentioned in commit ea80b652
added 2 commits
- ea80b652 - Merge branch 'dk318/#1675 (closed)-module-signatures-on-hover' into 'dev'
- 5e07bfb5 - [Bot] add changelog entry
enabled automatic add to merge train when the pipeline for d1d81bc4 succeeds
A new deploy preview is available on Netlify at https://2953-b02fa41b--ligolang.netlify.app, you can view the logs at https://app.netlify.com/sites/ligolang/deploys/654bb9c09ffa780697ff9020
Edited by Ligo Langmentioned in commit 71256b57