Skip to content

Inlay hint shown before proc definition #381

@moigagoo

Description

@moigagoo

Consider this code sample (from the chronos examples):

import chronos/apps/http/httpclient

proc retrievePage*(uri: string): Future[string] {.async.} =
  let httpSession = HttpSessionRef.new()

  try:
    let resp = await httpSession.fetch(parseUri(uri))
    bytesToString(resp.data)
  finally:
    await noCancel(httpSession.closeWait())

echo waitFor retrievePage(
  "https://raw.githubusercontent.com/status-im/nim-chronos/master/README.md"
)

Inlay type hint for retrievePage is shown before the proc declaration:

  • VSCode:
Image
  • Helix:
Image
  1. The the hint is shown, it should be shown after the declaration.
  2. in this case, it shouldn't be shown at all: the return type is already specified for this proc.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions