Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As with #393, this still doesn't solve our underlying "only syntactically-valid templates can produce completions" problem, but it does resolve the main issue called out in #436.
At a high level, several different related issues were coming together to produce the behavior described in #436:
CompletionTriggerKind.Invoked
(this is per the LSP, not just a weird choice on Code's part){{foo.}}
, we'd return the full list of hundreds of available globalsFixing those three errors, completion now looks like this:
(Note that in a loose-mode template we can't provide completions for
myHashObject
, as we have to assume during emit that e.g.myH
is referring to some global and not an incomplete reference to a local identifier)