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

Docstrings sometimes doesn't highlight #10

Open
rdbende opened this issue Apr 7, 2023 · 5 comments · May be fixed by #35
Open

Docstrings sometimes doesn't highlight #10

rdbende opened this issue Apr 7, 2023 · 5 comments · May be fixed by #35
Assignees
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@rdbende
Copy link
Owner

rdbende commented Apr 7, 2023

@Moosems:

If I have docstrings and I type them in line by line they don't highlight as such but if I paste it in then it is highlighted properly

@Moosems
Copy link
Collaborator

Moosems commented Apr 7, 2023

This is due to it not rendering all at once because doing that every time an edit is made would be incredibly time expensive. The viewport-only tags may help alleviate the slowness of tagging all but overall could be slower. Tests into this idea will have to be some time. We could also just look for """ but that could lead to a myriad of other bugs.

@Moosems
Copy link
Collaborator

Moosems commented Apr 10, 2023

Fixed in #20

@Moosems Moosems closed this as completed Apr 10, 2023
@Moosems Moosems reopened this Apr 10, 2023
@Moosems
Copy link
Collaborator

Moosems commented Apr 10, 2023

Maybe we want to set up something to use highlight_area() when it detects things like this @rdbende. What do you think? This might not be worth the time but its always a bug I can tackle.

@Moosems Moosems added bug Something isn't working good first issue Good for newcomers labels Apr 10, 2023
@rdbende
Copy link
Owner Author

rdbende commented Apr 10, 2023

Yes, maybe if it detects a Comment.Multiline or Literal.String.Doc token, it should cleverly look around.

@Moosems
Copy link
Collaborator

Moosems commented Apr 10, 2023

My worry is if there're multiple docstrings near each other.

@Moosems Moosems self-assigned this Apr 11, 2023
@Moosems Moosems linked a pull request May 8, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants