[LS] Add hover documentation for keywords, operators, and other syntax
turbolent opened this issue · 0 comments
turbolent commented
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
, andexecute
-
pre
,post
, andresult
-
AuthAccount
- Resources:
-
resource
keyword - Resource type annotation (
@
) - Move operator
<-
-
create
anddestroy
keyword - Shift statement (double move operator)
-
- Restricted types
- Access modifiers
- Force-unwrap operator (
!
) - Optional chaining (
?.
) - ...
-