I’d like to be able to “freeze” some text in the
TextEditor element so that it becomes uneditable, undeletable, but still selectable and syntax-highlighted.
Is there some kind of quick way to do it? Some method perhaps which I have overlooked.
If not, then it probably can be done with the events such as
onDidChange. But it only gives a chance to call a certain callback, how can I prevent the change from happening in a particular region of the text?