vmware-archive / scripted

The Scripted code editor
Eclipse Public License 1.0
1.56k stars 166 forks source link

Completions trigger with '$' in it is not supported #251

Closed bkbonner closed 11 years ago

bkbonner commented 11 years ago

Here's my completion file. If I swap out the '\$http' for 'blah', then I can type blah followed by ctrl+space and it generates: $http('${1:GET|POST|PUT|DELETE}');

However, leaving the trigger as \$http, or $http, or \$http, none of these tigger the completion.

any ideas??

{
        "scope": "text.html - source - meta.tag, punctuation.definition.tag.begin",

        "completions":
        [
                { "trigger" : "\$http", "contents": "$http('${1:GET|POST|PUT|DELETE}');"}
        ]
}
kdvolder commented 11 years ago

Not 'my area' of the code. But Andrew's on leave for a bit so I'll take a look.

bkbonner commented 11 years ago

It's fine... It can wait. On Mar 4, 2013 1:19 PM, "Kris De Volder" notifications@github.com wrote:

Not 'my area' of the code. But Andrew's on leave for a bit so I'll take a look.

— Reply to this email directly or view it on GitHubhttps://github.com/scripted-editor/scripted/issues/251#issuecomment-14395772 .

kdvolder commented 11 years ago

I'll just take a peek anyway. If its not a hard thing to fix we may still get it into 0.4 release.

aeisenberg commented 11 years ago

For now, this is not supported, having a $ as part of the trigger. Best I can suggest now is to remove the '$' at the beginning and it will work.

But another thing, does the syntax ${1:GET|POST|PUT|DELETE} mean that when you tab through, an additional completions drop-down appears with the 4 possibilities in it? This is not supported either, but would be quite nice.

kdvolder commented 11 years ago

I've got a fix. I just changed the regexp to find the 'start' of the trigger to include $.

kdvolder commented 11 years ago

Of course that only fixes the 'trigger' issue... not the ${1:GET|POST|PUT|DELETE} support.

aeisenberg commented 11 years ago

Thanks. Looks right to me. I'll raise a new bug for linked editing choices. This would be a bit of a major feature since there is no infra for invoking content assist inside of linked editing.