cloudsmith/geppetto — Issue #265: improve code completion of variables in expression interpolation
Author: hlindberg
Created: 2012-01-09 13:55:56+00:00
State: open

The code completion for variables (Issue #223) does not work for more "complex" expressions in interpolations. As an example:

$a = "${1+$}"

The problem is that since 1+$ is incomplete, and thus not an expression, the proposal provider gets all of the expression text "1+$" as a prefix to the completion, and it searches for a variable called '1+$' (if anything at all). There are several variations on this theme to make it more complicated in practice.

A possible solution is to replace the checks for prefix (and last completed node) that continues with proposals if these start with $ or ${ with a backwards scan to find the right-most $ or ${ to the completion position.

In practice, I don't think this has a big impact, as such constructs are typically not used.

If you are bit by this issue and like to see it fixed, please chime in to raise the priority of this issue.