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

Definition lists play poorly with soft-wrapping #394

Open
ag-eitilt opened this issue Jun 9, 2024 · 0 comments
Open

Definition lists play poorly with soft-wrapping #394

ag-eitilt opened this issue Jun 9, 2024 · 0 comments

Comments

@ag-eitilt
Copy link

I don't have a minimal reproducer since small documents are obviously not as affected, but I'm putting together a design requirements/algorithm sketch document that's grown to 60 KB with a lot of definition lists (used both for terms and for labeling branches), and there's a few lists in there that very noticeably chug -- there's one that's only five single-paragraph entries tall, where if I'm scrolling past with gk/gj NVim doesn't update at all for half a second until it catches back up with itself -- though oddly not every list is affected to the same degree.

As soon as I set g:pandoc#syntax#use_definition_lists=0 and reload, everything is immediately so much more snappy. I suspect this comes down to the same thing you mentioned in #257 of soft-wrap lines not being properly tested, compounded by definition lists being uncommon themselves and this file being larger than most; this is the first time I've had issues with the highlighting, so I think you've likely done a fair amount of optimization since that old issue was filed. A couple days ago I briefly tried hard-wrapping it all (hence the modeline) and I think I remember it being solved that way as well, but I ultimately decided I didn't like the formatting enough, and I can't remember now if it solved things as nicely as disabling that syntax option does.

I've uploaded the file in its current state to https://gist.github.com/ag-eitilt/5c94e24746afcb61c5965a2dfebc8b36#edit-target-ownership-checks if you want something to play with yourself, but you can ignore the content1; the worst offender is the list in "Edit target ownership tests", around line 150.

Footnotes

  1. In fact, I encourage you to ignore it. Not only is the document fundamentally incomplete, I'm also in the middle of two or three rewrites at once so there's a mix of styles, language, some algorithm steps are duplicated, ...

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