Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Syntax-forgiving Parser (auto-complete/diagnostics when syntax invalid) #765

Open
machty opened this issue Sep 23, 2024 · 0 comments
Open

Comments

@machty
Copy link
Contributor

machty commented Sep 23, 2024

Currently, in both Glint 1 and Volar-ized Glint 2, the presence of any kind of syntax error within a <template> tag (in a gts file) breaks all auto-complete/auto-import functionality. Basically it's very difficult to start typing in a component name within a <template> tag and see any auto-complete/auto-import suggestions unless you awkwardly make the syntax valid for long enough to finish an auto-complete. Examples:

invalid syntax due to unclosed <: no autocomplete:
Image

no < at all, ... less obvious case, but guessing we'd still want an auto-complete suggestion?
Image

auto complete suggestions kick in, but only after awkwardly typing in correct syntax and going back to open element
Image

How to implement

There may be somewhat hacky ways to get this working without changing our gts/glimmer parser to be more forgiving; need to check in the Volar discord. But perhaps we do need/want a forgiving Glimmer parser. Haven't looked into that too deeply though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant