mirror of
https://github.com/neovim/neovim.git
synced 2026-05-04 04:55:16 +00:00
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:
@@ -56,6 +56,7 @@ lsp._request_name_to_capability = {
|
||||
[ms.workspace_symbol] = { 'workspaceSymbolProvider' },
|
||||
[ms.textDocument_references] = { 'referencesProvider' },
|
||||
[ms.textDocument_rangeFormatting] = { 'documentRangeFormattingProvider' },
|
||||
[ms.textDocument_rangesFormatting] = { 'documentRangeFormattingProvider', 'rangesSupport' },
|
||||
[ms.textDocument_formatting] = { 'documentFormattingProvider' },
|
||||
[ms.textDocument_completion] = { 'completionProvider' },
|
||||
[ms.textDocument_documentHighlight] = { 'documentHighlightProvider' },
|
||||
|
||||
Reference in New Issue
Block a user