feat(lsp): vim.lsp.buf.format() supports textDocument/rangesFormatting #27323

While this relies on a proposed LSP 3.18 feature, it's fully backwards
compatible, so IMO there's no harm in adding this already.

Looks like some servers already support for this e.g.
- gopls: https://go-review.googlesource.com/c/tools/+/510235
- clangd: https://github.com/llvm/llvm-project/pull/80180

Fixes #27293
This commit is contained in:
Tom Praschan
2024-06-24 16:54:56 +02:00
committed by GitHub
parent b0e5990907
commit 5581a95534
7 changed files with 158 additions and 11 deletions

View File

@@ -425,6 +425,7 @@ function protocol.make_client_capabilities()
},
rangeFormatting = {
dynamicRegistration = true,
rangesSupport = true,
},
completion = {
dynamicRegistration = false,