Skip to content
Snippets Groups Projects

[#1675] Add module signatures on hover

Merged [#1675] Add module signatures on hover
All threads resolved!
Merged Leonid Vasilev requested to merge dk318/#1675-module-signatures-on-hover into dev
All threads resolved!

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) .

:white_check_mark: 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

Merge train pipeline #1065565534 passed with warnings

Merge train pipeline passed with warnings for b02fa41b

Approved by

All merge request dependencies have been merged (1 merged)

Merged by Leonid VasilevLeonid Vasilev 1 year ago (Nov 8, 2023 4:43pm UTC)

Merge details

Pipeline #1065575739 passed with warnings

Pipeline passed with warnings for 71256b57 on dev

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Leonid Vasilev added 1 commit

    added 1 commit

    Compare with previous version

  • Leonid Vasilev marked this merge request as draft from 024ee60c

    marked this merge request as draft from 024ee60c

  • Heitor Toledo Lassarote de Paula
  • Heitor Toledo Lassarote de Paula
  • Heitor Toledo Lassarote de Paula
  • I'm not done with the review yet; will complete it later. Here are some thoughts so far (the code looks pretty good though, good job!)

  • I think your changes look pretty solid, well done. Approving.

  • Heitor Toledo Lassarote de Paula approved this merge request

    approved this merge request

  • Leonid Vasilev mentioned in merge request !2961 (merged)

    mentioned in merge request !2961 (merged)

  • Rémi deleted the print_module_signature branch. This merge request now targets the dev branch

    deleted the print_module_signature branch. This merge request now targets the dev branch

  • Leonid Vasilev added 103 commits

    added 103 commits

    Compare with previous version

  • resolved all threads

  • Heitor Toledo Lassarote de Paula
  • Heitor Toledo Lassarote de Paula
  • Leonid Vasilev added 1 commit

    added 1 commit

    Compare with previous version

  • resolved all threads

  • Leonid Vasilev added 13 commits

    added 13 commits

    Compare with previous version

  • Leonid Vasilev marked this merge request as ready

    marked this merge request as ready

  • Leonid Vasilev mentioned in commit ea80b652

    mentioned in commit ea80b652

  • Laurent Canis added 2 commits

    added 2 commits

    Compare with previous version

  • Leonid Vasilev enabled automatic add to merge train when the pipeline for d1d81bc4 succeeds

    enabled automatic add to merge train when the pipeline for d1d81bc4 succeeds

  • Edited by Ligo Lang
  • Leonid Vasilev started a merge train

    started a merge train

  • merged

  • Leonid Vasilev mentioned in commit 71256b57

    mentioned in commit 71256b57

  • Please register or sign in to reply
    Loading