santaclose / ImGuiColorTextEdit

Colorizing text editor for ImGui
MIT License
69 stars 19 forks source link

Wrap in namespace, add YAML support, and only colorize viewport #7

Open S41L0R opened 1 year ago

S41L0R commented 1 year ago

Okay, sorry to bundle three things one PR, but I only thought to do a PR after I had already made all these changes.

  1. I wrapped the whole library under a namespace named after it. It was really annoying to have it just be a class with a somewhat generic name. If you want, I guess you can remove this, but I personally think it should be under a namespace.
  2. I added basic YAML support.
  3. I found that in my 63k line test file colorization performance was very slow. I modified it to only colorize the visible viewport.
santaclose commented 1 year ago

how are you handling multiline comments? I imagine syntax highlighting won't work properly when the beginning of the comment is not visible?