aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/lsp/protocol.lua
diff options
context:
space:
mode:
authorRiley Bruins <ribru17@hotmail.com>2025-08-31 14:09:12 -0700
committerGitHub <noreply@github.com>2025-08-31 14:09:12 -0700
commit77e3efecee4e9948044ec02caeaf6fec496c6c02 (patch)
tree714d77ad67ee34d796f4fb33ceba65da52cc4a83 /runtime/lua/vim/lsp/protocol.lua
parentf311c96973a561ba5e664f46e758a97fd10acdcb (diff)
downloadrneovim-77e3efecee4e9948044ec02caeaf6fec496c6c02.tar.gz
rneovim-77e3efecee4e9948044ec02caeaf6fec496c6c02.tar.bz2
rneovim-77e3efecee4e9948044ec02caeaf6fec496c6c02.zip
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>
Diffstat (limited to 'runtime/lua/vim/lsp/protocol.lua')
-rw-r--r--runtime/lua/vim/lsp/protocol.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/runtime/lua/vim/lsp/protocol.lua b/runtime/lua/vim/lsp/protocol.lua
index f724d6fc66..d8e721d732 100644
--- a/runtime/lua/vim/lsp/protocol.lua
+++ b/runtime/lua/vim/lsp/protocol.lua
@@ -572,6 +572,9 @@ function protocol.make_client_capabilities()
linkedEditingRange = {
dynamicRegistration = false,
},
+ onTypeFormatting = {
+ dynamicRegistration = false,
+ },
},
workspace = {
symbol = {