Text Synchronization
Nadeeshaan Gunasinghe, Nipuna Marcus · Apress eBooks · 2021
In this chapter, we are going to have a look at text synchronization capabilities available in the language server protocol. When the user opens a document in the client (editor/IDE), source editing is initiated through the client. Clients are responsible for syncing the source content with the file system or maintaining an in-memory copy. Not all clients automatically sync the source content periodically with the file system. Clients such as Vim keep the up-to-date content in memory, and the user can decide whether to persist the content or discard them (users can install plugins such as vim-auto-save or configure the Vim editor to periodically save buffer on text changes to sync the content). Clients such as VSCode and Eclipse expose configuration options for the user to determine whether to auto-save the content or not.