aboutsummaryrefslogtreecommitdiff
path: root/data/core/doc/highlighter.lua
AgeCommit message (Collapse)Author
2022-06-11Add `Highlighter:update_notify` to keep track of retokenized linesGuldoman
This is helpful for plugins that need to know when a line has been retokenized.
2021-11-23Merge pull request #681 from Guldoman/prepopulate_highlighterAdam
Prepopulate highlighter
2021-11-22Speed up highlighter notifyGuldoman
Avoid calling `table.{insert,remove}` multiple times, as this causes multiple shifts in the `self.lines` table.
2021-11-20Add `soft_reset` to highlighterGuldoman
This allows clearing the `lines` table without removing entries.
2021-10-26Don't insert `nil` in highlighter lines tableGuldoman
When `highlighter:insert_notify` was called, a hole in the array was created. If another call to `highlighter:insert_notify` happened before the hole was filled, a `Position out of bounds` error could have been raised.
2021-10-08Improve highlither for document editsFrancesco Abbate
The syntax highlighter keep a cache of the documents like tokenization. In order to minimize the amount of tokenize re-computations we insert some emtty lines or remove some lines in the highlither lines corresponding to the lines added or removed to the document.
2021-10-08Fix error in incremental syntax highlighterFrancesco Abbate
In the highlither thread We should accept a previously generated line tokenization past first_invalid_line only if the text is the same. The text can change because of insert or remove operations. Close #573.
2020-06-02Fixed bug in Highlighter.invalidate() when setting first_invalid_linerxi
The value should not be updated if the current first_invalid_line is less than the new invalid line index
2020-05-10Removed redundant line from syntax highlighterrxi
2020-05-10Whitespacerxi
2020-05-09Fixed highlighter resetting of syntax on doc filename changerxi
2020-05-09Fixed rare case where core.doc.highlighter would iterate out of line boundsrxi
2020-05-08Moved `syntax` from `doc.highlighter` to `doc`rxi
2020-05-07Moved highlighter code from `DocView` to `Doc`rxi
* Only one highlighter state is kept per-document as opposed to one per-docview * Fixes a bug with retaining older highlighter state as a DocView wasn't able to detect lines changing above it's viewport * Renames `highlighter` module to more descriptive `tokenizer`