vscode-supercollider
vscode-supercollider copied to clipboard
Method name completion should support parenthesized expressions as well
Probably already a known issue -- I just wanted to add an issue for tracking it.
Method completion after .
works fine when the token preceding the dot is a numeric literal or an identifier:
// all method calls here get full autocompletion behavior
1 + 1.asFloat()
1 + 1.asFloat.rand()
1.0.rand()
Point.new(x, y)
\abc.asString.findRegexp("bc")
x = 1 + 1;
x.asFloat()
But autocompletion doesn't happen if the character preceding .
is a closing delimiter:
(1 + 1).asF
x = 1 + 1;
x.asFloat().ra // "x." autocomp is fine; "asFloat()." then "rand" failed to autocomplete
// ^^ chaining method calls is a common idiom;
// ideally autocompletion would fully support it
[1, 2, 3].wrapE
"abc".findR
'abc'.asStr
{}.pl // not even Function:play
It might auto complete the method name if the name exists elsewhere in the same document, but it would be nicer if the behavior were consistent.
(As an aside, my first impression of SC-vscodium in Linux is: very impressive!)