Skip to content

[LS] Add hover documentation for keywords, operators, and other syntax #101

Open
@turbolent

Description

@turbolent

Issue To Be Solved

Make it easier to read and learn Cadence code by allowing users to discover the meaning of source code elements, for example by providing hover documentation, for keywords, operators, and other syntax, in the language server.

As the language server is integrated into the Playground, this would provide way for a new user to understand tutorial code and existing contracts.

This idea is nicely described in https://oleb.net/2021/swift-language-reference/

Suggest A Solution

  • Implement hover for keywords and tokens
    • transaction, prepare, and execute
    • pre, post, and result
    • AuthAccount
    • Resources:
      • resource keyword
      • Resource type annotation (@)
      • Move operator <-
      • create and destroy keyword
      • Shift statement (double move operator)
    • Restricted types
    • Access modifiers
    • Force-unwrap operator (!)
    • Optional chaining (?.)
    • ...

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions