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

Empty outline on newly opened files #46

Open
j4k0xb opened this issue Aug 6, 2023 · 1 comment · May be fixed by #54
Open

Empty outline on newly opened files #46

j4k0xb opened this issue Aug 6, 2023 · 1 comment · May be fixed by #54

Comments

@j4k0xb
Copy link

j4k0xb commented Aug 6, 2023

Steps to reproduce:

  1. Open a pegjs file
  2. See that the outline is empty:
    image
  3. Only after editing something it gets initialized:
    image

Expected: show all symbols directly after opening

After debugging a bit I found out it was introduced in #33 because validateTextDocument always delays the AST parsing but in the meantime onDocumentSymbol gets called which can't find the cached AST

@hildjj
Copy link
Contributor

hildjj commented Oct 13, 2024

OK, I've found this. Worked around it by ensuring we have waited for parsing to finish before replying to the request that the editor sends.
There's an outside chance that they way I solved it will leave the outline unchanged after you rename something, so if you happen to see that, re-open this.

hildjj added a commit to hildjj/code-peggy-language that referenced this issue Oct 13, 2024
Wait for parsing to finish before updating outline.
Depends on peggyjs#53.
@hildjj hildjj linked a pull request Oct 13, 2024 that will close this issue
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

Successfully merging a pull request may close this issue.

2 participants