Skip to content
This repository has been archived by the owner on Apr 24, 2021. It is now read-only.

Fix issue where values declared with type annotation would not show u… #65

Merged
merged 1 commit into from
Feb 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
- Add support for autocomplete for decorators such as `@module` and `@val`.
- Fix issue for uncurried functions where the internal definition of `Js.Fn.arity` is shown on hover. (See https://github.com/rescript-lang/rescript-editor-support/issues/62).
- Fix type hint when hovering over labeled arguments of components (See https://github.com/rescript-lang/rescript-editor-support/issues/63).
- Fix issue where values declared with type annotation would not show up in autocomplete, and would show no doc comment on hover. (See https://github.com/rescript-lang/rescript-vscode/issues/72).


## Release 1.0.5 of rescript-vscode
This [commit](https://github.com/rescript-lang/rescript-editor-support/commit/6bdd10f6af259edc5f9cbe5b9df06836de3ab865) is vendored in [rescript-vscode 1.0.5](https://github.com/rescript-lang/rescript-vscode/releases/tag/1.0.5).
Expand Down
5 changes: 4 additions & 1 deletion examples/example-project/src/ZZ.res
Original file line number Diff line number Diff line change
Expand Up @@ -94,4 +94,7 @@ module Inner = {

type typeInner = Inner.tInner;

let valueInner = Inner.vInner;
let valueInner = Inner.vInner;

@ocaml.doc("Doc comment for functionWithTypeAnnotation")
let functionWithTypeAnnotation : unit => int = () => 1
3 changes: 2 additions & 1 deletion src/rescript-editor-support/ProcessCmt.re
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,8 @@ let rec forItem = (~env, ~exported: exported, item) =>
({vb_loc, vb_pat: {pat_desc, pat_type}, vb_attributes}) =>
/* TODO get all the things out of the var. */
switch (pat_desc) {
| Tpat_var(ident, name) =>
| Tpat_var(ident, name)
| Tpat_alias({pat_desc: Tpat_any}, ident, name) /* let x : t = ... */ =>
let item = pat_type;
let declared =
addItem(
Expand Down