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

Js.arity<..> should not be visible #62

Closed
ryyppy opened this issue Feb 13, 2021 · 2 comments
Closed

Js.arity<..> should not be visible #62

ryyppy opened this issue Feb 13, 2021 · 2 comments

Comments

@ryyppy
Copy link
Member

ryyppy commented Feb 13, 2021

I just upgraded our vim setup to rescript-vscode 1.0.6, which comes with the updated ReScript Outcomeprinter.

Right now, when writing code like this:

let callbackU = (. a) => Js.log(a)

callbackU //<-- running dump on here

the triggered type hint output with coc-vim looks like this:

image

Running the editor-support binary directly shows me this:

Pos (l:c): 56:9
```rescript
(. 'a) => unit
```

```rescript
@unboxed @unboxed type arity1<'a> = {\"I1": 'a}
```

<root>/src/bar.res

Expected output:

Since type arity1 is an implementation detail, I'd only be interested in the syntax sugared (. 'a) => unit representation. IMO this extra @unboxed @unboxed type arity1<'a> = {\"I1": 'a} codesnippet should not show up, but I guess this has something to do with how alias showing works?

@ryyppy
Copy link
Member Author

ryyppy commented Feb 13, 2021

Update: I did something wrong in my coc-vim setup, so it picked up the wrong editor-support binary.

It now shows me this:

image

I still think the extra alias is more confusing than it helps for most users. If the goal is to explain what this construct is, I'd rather put it in words and write Uncurried function with 1 argument instead.

@cristianoc
Copy link
Contributor

cristianoc commented Feb 13, 2021

Fixed in:
68e8b18

cristianoc added a commit to rescript-lang/rescript-vscode that referenced this issue Mar 15, 2021
Sync up with rescript-lang/rescript-editor-support@c57ed6d

#### New features
- Add support for autocomplete for pipe-first `foo->`: the type of `foo` is used to determine the module to take completions from.
- Add support for autocomplete for decorators such as `@module` and `@val`.
- Add support for autocomplete of labelled arguments `foo(~label... )`.

#### Fixes

- Fix issue for uncurried functions where the internal definition of `Js.Fn.arity` is shown on hover. (See rescript-lang/rescript-editor-support#62).
- Fix type hint when hovering over labeled arguments of components (See rescript-lang/rescript-editor-support#63).
- Fix issue where values declared with type annotation would not show up in autocomplete, and would show no doc comment on hover. (See #72).
- Fix hover on definitions inside a react component module, or whenever multiple definitins for the same value exist in the module (See rescript-lang/rescript-editor-support#67).
- Fix autocomplete issue where multiple open's were considered in the wrong priority order (See rescript-lang/rescript-editor-support#72).
chenglou pushed a commit to rescript-lang/rescript-vscode that referenced this issue Mar 15, 2021
Sync up with rescript-lang/rescript-editor-support@c57ed6d

#### New features
- Add support for autocomplete for pipe-first `foo->`: the type of `foo` is used to determine the module to take completions from.
- Add support for autocomplete for decorators such as `@module` and `@val`.
- Add support for autocomplete of labelled arguments `foo(~label... )`.

#### Fixes

- Fix issue for uncurried functions where the internal definition of `Js.Fn.arity` is shown on hover. (See rescript-lang/rescript-editor-support#62).
- Fix type hint when hovering over labeled arguments of components (See rescript-lang/rescript-editor-support#63).
- Fix issue where values declared with type annotation would not show up in autocomplete, and would show no doc comment on hover. (See #72).
- Fix hover on definitions inside a react component module, or whenever multiple definitins for the same value exist in the module (See rescript-lang/rescript-editor-support#67).
- Fix autocomplete issue where multiple open's were considered in the wrong priority order (See rescript-lang/rescript-editor-support#72).
cristianoc added a commit to rescript-lang/rescript-vscode that referenced this issue Mar 29, 2021
Sync rescript-editor-support to commit rescript-lang/rescript-editor-support@ae455c7

Since release 1.0.5:

#### New features
- Add support for autocomplete for pipe-first `foo->`: the type of `foo` is used to determine the module to take completions from.
- Add support for autocomplete for decorators such as `@module` and `@val`.
- Add support for autocomplete of labelled arguments `foo(~label... )`.
- Add support for @deprecated attributes in autocomplete and hover.
- Support for upcoming `rescript` npm package for the compiler. Looks for `rescript` in addition to `bs-platform` in `node_modules`.

#### Fixes

- Fix issue for uncurried functions where the internal definition of `Js.Fn.arity` is shown on hover. (See rescript-lang/rescript-editor-support#62).
- Fix type hint when hovering over labeled arguments of components (See rescript-lang/rescript-editor-support#63).
- Fix issue where values declared with type annotation would not show up in autocomplete, and would show no doc comment on hover. (See #72).
- Fix hover on definitions inside a react component module, or whenever multiple definitins for the same value exist in the module (See rescript-lang/rescript-editor-support#67).
- Fix autocomplete issue where multiple open's were considered in the wrong priority order (See rescript-lang/rescript-editor-support#72).
- Autocomplete: add support for `open!` in addition to `open`.
chenglou pushed a commit to rescript-lang/rescript-vscode that referenced this issue Mar 30, 2021
* Sync rescript-editor-support

Sync rescript-editor-support to commit rescript-lang/rescript-editor-support@ae455c7

Since release 1.0.5:

#### New features
- Add support for autocomplete for pipe-first `foo->`: the type of `foo` is used to determine the module to take completions from.
- Add support for autocomplete for decorators such as `@module` and `@val`.
- Add support for autocomplete of labelled arguments `foo(~label... )`.
- Add support for @deprecated attributes in autocomplete and hover.
- Support for upcoming `rescript` npm package for the compiler. Looks for `rescript` in addition to `bs-platform` in `node_modules`.

#### Fixes

- Fix issue for uncurried functions where the internal definition of `Js.Fn.arity` is shown on hover. (See rescript-lang/rescript-editor-support#62).
- Fix type hint when hovering over labeled arguments of components (See rescript-lang/rescript-editor-support#63).
- Fix issue where values declared with type annotation would not show up in autocomplete, and would show no doc comment on hover. (See #72).
- Fix hover on definitions inside a react component module, or whenever multiple definitins for the same value exist in the module (See rescript-lang/rescript-editor-support#67).
- Fix autocomplete issue where multiple open's were considered in the wrong priority order (See rescript-lang/rescript-editor-support#72).
- Autocomplete: add support for `open!` in addition to `open`.

* Don't show deprecated message on hover.

Sync up with rescript-lang/rescript-editor-support@03ee0d9
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants