Shopify / Shopify/theme-tools

Support `content_for` block `closest.metaobject` param completion

Open
#776 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area:language-server enhancement
Dominant language
TypeScript
Stars
234
Forks
92
Avg merge
1d 3h
Merged PRs (30d)
6

Description

Is your feature request related to a problem? Please describe.

This feature was generated by this comment.

Describe the solution you'd like

Most context.* params are static. However, metaobjects are dynamically defined on the shop-level. When you want to auto-complete that param, you must first fetch metaobjects from the shop.

{% content_for "block", id: 5, context.metaobject.foo█ %}  -> `foobar`

NOTE: This will require metaobject completion before starting this ticket.

Checklist

  • I have checked and made sure that the proposal adheres to this plugin's principles

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the metaobject completion work required by this issue and review the linked comment from issue 570. Then trace completion for content_for and context.metaobject.foo; done means dynamically fetched shop-level metaobjects can provide the expected completion such as foobar.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
developer-experience, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.