feat(lsp): support textDocument/onTypeFormatting (#34637)

Implements [on-type
formatting](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.18/specification/#textDocument_onTypeFormatting)
using a `vim.on_key()` approach to listen to typed keys. It will listen
to keys on the *left hand side* of mappings. The `on_key` callback is
cleared when detaching the last on-type formatting client. This feature
is disabled by default.

Co-authored-by: Maria José Solano <majosolano99@gmail.com>
This commit is contained in:
Riley Bruins
2025-08-31 14:09:12 -07:00
committed by GitHub
parent f311c96973
commit 77e3efecee
8 changed files with 472 additions and 0 deletions

View File

@@ -286,6 +286,7 @@ local config = {
'inline_completion.lua',
'linked_editing_range.lua',
'log.lua',
'on_type_formatting.lua',
'rpc.lua',
'semantic_tokens.lua',
'tagfunc.lua',