F1 works when we select a full symbol OR when the cursor's on it. These should work the same, e.g. selection_is_symbol(target = "symbol") should return TRUE if the cursor is on a symbol OR if a symbol is fully selected, I think it should return FALSE also if a symbol is partially selected.
In this case target = "symbol" should become the default.
for target = "call" we need to delimit the call by moving the cursor to the left until we have a syntactic expression on the right, and consider this expression. Corner case (showing | as the cursor) : bar(foo(test = |baz())) should not return (test = |baz()) but foo(test = |baz()).
Should infix ops be considered as function calls ? What do we do with bar(foo(test = 1 + | 1)) by default ? is it overkill to add control over this detail ?
I think first we skip all infixes including of the form %infix%, except if explicitly selected.
So we don't have to select completely.
F1 works when we select a full symbol OR when the cursor's on it. These should work the same, e.g.
selection_is_symbol(target = "symbol")
should returnTRUE
if the cursor is on a symbol OR if a symbol is fully selected, I think it should return FALSE also if a symbol is partially selected.In this case
target = "symbol"
should become the default.for
target = "call"
we need to delimit the call by moving the cursor to the left until we have a syntactic expression on the right, and consider this expression. Corner case (showing|
as the cursor) :bar(foo(test = |baz()))
should not return(test = |baz())
butfoo(test = |baz())
.Should infix ops be considered as function calls ? What do we do with
bar(foo(test = 1 + | 1))
by default ? is it overkill to add control over this detail ?I think first we skip all infixes including of the form
%infix%
, except if explicitly selected.