nvim_runtime_lua

vim.lsp.CTGroupState

LSP has 3 different sync modes:

  • None (Servers will read the files themselves when needed)
  • Full (Client sends the full buffer content on updates)
  • Incremental (Client sends only the changed parts)

Changes are tracked per buffer. A buffer can have multiple clients attached and each client needs to send the changes To minimize the amount of changesets to compute, computation is grouped:

None: One group for all clients Full: One group for all clients Incremental: One group per position_encoding

Sending changes can be debounced per buffer. To simplify the implementation the smallest debounce interval is used and we don't group clients by different intervals.

Fields3

CTGroupState.buffers : {integer, vim.lsp.CTBufferState}
CTGroupState.debounce : integer

debounce duration in ms

CTGroupState.clients : {integer, vim.lsp.Client}

clients using this state. {client_id, client}