yoshiki / yaml-mode

The emacs major mode for editing files in the YAML data serialization format.
GNU General Public License v3.0
482 stars 132 forks source link

Speed up syntax-propertize-function in files with large JSON strings #76

Closed dgutov closed 4 years ago

wasamasa commented 4 years ago

Thanks, the code looks good, the function doesn't seem to work consistently yet though. Here's how it looks right after opening a buffer, compared to after changing a character in the key, then adding it back.

20200510_102802 20200510_102916

Could this be some wonky font-lock customization in the major mode preventing jit-lock from fontifying the entire region?

dgutov commented 4 years ago

It... seems to do with syntax-ppss cache, actually. Though I don't understand why this doesn't affect subsequent parses.

dgutov commented 4 years ago

Good catch, thank you.

dgutov commented 4 years ago

Should be fixed now.

wasamasa commented 4 years ago

Thanks, that did indeed fix it.