A decoration is a range of the document that has a specific Mark dynamically applied to it based on its content or some other external state. It is not actually reflected in the document's structure itself. This can be useful for cases like syntax highlighting, or search result highlighting.
Decorations implement the Range interface, but also contain a mark.