Shopify / theme-check

The Ultimate Shopify Theme Linter
Other
333 stars 96 forks source link

[Intelligent code completion] Introduce the `AssignmentsCompletionProvider` to suggest variables #659

Closed karreiro closed 1 year ago

karreiro commented 1 year ago

Analog to the ObjectCompletionProvider, the new AssignmentsCompletionProvider will be pretty much the same thing, however it will rely on the AssignmentsFinder to suggest variables for users.

In the example below, target must be suggested:

{%- liquid
  assign target = cart
%}
{{ tar█ }}

The editor already suggests that kind of term by default. However, if we suggest it, we may show the cart documentation for the target variable.