Skip to content

Commit

Permalink
Merge pull request #1318 from voodoos/construct-part-I-no-emacs
Browse files Browse the repository at this point in the history
[Construct] Part I : add the new command and a simple VIM plugin
  • Loading branch information
voodoos authored Jun 14, 2021
2 parents 415739a + 5c56477 commit 84d909d
Show file tree
Hide file tree
Showing 27 changed files with 2,232 additions and 57 deletions.
8 changes: 8 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@ git version
- fix location of module definitions done via functors (#1329, fixes #1199)
- fix -cmt-path dirs mistakenly added to build path (#1330)
- add new module holes that can replace module expressions (#1333)
- add a new command `construct` that builds a list of possible terms when
called on a typed hole (#1318)
+ editor modes
- vim: add a simple interface to the new `construct` command:
`MerlinConstruct`. When several results are suggested, `<c-i>` and `<c-u>`
to show more or less deep results. (#1318)
+ test suite
- cover the new `construct` command (#1318)

merlin 4.2
==========
Expand Down
16 changes: 16 additions & 0 deletions doc/dev/PROTOCOL.md
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,17 @@ Entries is the list of possible completion. Each entry is made of:
- a description, most of the time a type or a definition line, to be put next to the name in completion box
- optional information which might not fit in the completion box, like signatures for modules or documentation string.

### `construct -position <position> [ -with-values <none|local> -depth <int> ]`

-position <position> Position where construct should happen
-with-values <none|local> Use values from the environment (defaults to none)
-depth <int> Depth of the search (defaults to 1)

When the position determined by `-position` is a hole (`_`), this command
returns a list of possible terms that could replace it given its type.
When `-with-values` is set to local, values in the current environment will be
used in the constructed terms.

### `document -position <position> [ -identifier <string> ]`

-position <position> Position to complete
Expand Down Expand Up @@ -296,6 +307,11 @@ Returns all known findlib packages as a list of string.

Returns supported compiler flags.The purpose of this command is to implement interactive completion of compiler settings in an IDE.

### `holes`

This command will return the ordered list of the positions and types of all
holes in the current document.

### `jump -target <string> -position <position>`

-target <string> Entity to jump to
Expand Down
Loading

0 comments on commit 84d909d

Please sign in to comment.