You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tab Completion is a bottomless rabbithole. At its simplest implementation, we could just return a list of built-in types when a new variable is declared. At its most complex, we'd be recreating Github Copilot.
The purpose of this ticket is to find the right spot along this spectrum to target, and then track completion of our progress towards this point.
NOTE: In examples of in-editor code, the | symbol will be used to indicate cursor position|.
LSP API Methods
textDocument/completion
Variable Declaration Type Completion
When a user is declaring a new variable, whether at contract or local scope, we can provide a list of types, ordered by some opinionated usage-likelihood metric. For example, the most common types used are likely address, uint256, and bool. After these, its probably "custom types" (i.e. structs) used the most.
So when a user is declaring a new variable, we can present this list of types, containing any number of types, whether built-in or user-defined.
Contract Scope
# Foo.vyowner: |
Local Scope
owner: address@externaldeffoo():
x: |
The text was updated successfully, but these errors were encountered:
Tab Completion is a bottomless rabbithole. At its simplest implementation, we could just return a list of built-in types when a new variable is declared. At its most complex, we'd be recreating Github Copilot.
The purpose of this ticket is to find the right spot along this spectrum to target, and then track completion of our progress towards this point.
LSP API Methods
textDocument/completion
Variable Declaration Type Completion
When a user is declaring a new variable, whether at contract or local scope, we can provide a list of types, ordered by some opinionated usage-likelihood metric. For example, the most common types used are likely
address
,uint256
, andbool
. After these, its probably "custom types" (i.e. structs) used the most.So when a user is declaring a new variable, we can present this list of types, containing any number of types, whether built-in or user-defined.
Contract Scope
Local Scope
The text was updated successfully, but these errors were encountered: