`Unknown object` warnings for global Liquid objects in editor when using `{% doc %}` tag
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 234
- Forks
- 92
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 6
Description
Description:
When using the Liquid {% doc %} tag in a .liquid snippet, a warning is generated for global objects. For example the section object.
Warning: Unknown object ‘section’ used.
Steps to Reproduce:
- Use the
{% doc %}tag syntax in a.liquidsnippet file. - Observe the warning message in Cursor / Visual Studio Code.
Expected Behavior:
The {% doc %} tag should not give warnings for global available liquid objects.
Actual Behavior:
A warning is shown for section, predictive_search and more.
Warning: Unknown object ‘section’ used.
Additional Context:
This may indicate that the {% doc %} tag does not correctly recognize global objects when used inside snippet files.
I tried adding and passing the global object to the doc declaration and snippet, but that doesn’t solve the issue because the parameter name conflicts with a built-in Liquid tag. That error is good and makes sense.
The parameter 'section' shares the same name with a liquid tag.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the warning in a .liquid snippet containing a {% doc %} tag, using Cursor or Visual Studio Code, and compare handling of global objects such as section and predictive_search. Trace the editor warning path for doc-tag parameters and verify that valid global Liquid objects no longer produce unknown-object warnings while the documented name-conflict error remains.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- developer-experience, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100