Parse ContentChangeEvent in apply_change
Parse ContentChangeEvent in apply_change

Performs either INCREMENTAL, FULL, or NONE synchronization based on both
the Client request and server capabilities for
TextDocumentContentChangeEvent. Conditional logic is confined to the
apply_change method.

Three boolean values are placed in __init__():

* _is_sync_kind_full
* _is_sync_kind_incremental
* _is_sync_kind_none

These can be computed on document creation; by computing them once in
the initializer, precious machine resources can be saved during the
frequent calls to the apply_change method.

The final else clause should never be reached. That said, an existing
test would fail if I did not perform a full text update here, so I
relaxed my parser to simply log an error and perform a full update at
the end. I recommend revisiting protocol.py in the near future, which
may simplify many of this server's deserialization checks by
consolidating them in one place.

openlawlibrary/pygls,openlawlibrary/pygls,openlawlibrary/pygls