autoload/lsp/lspserver.vim | 11 ++++++++++- diff --git a/autoload/lsp/lspserver.vim b/autoload/lsp/lspserver.vim index fc22eec30b3f38029132588e7ca36c9507948cea..b7da5371154e85d70d76669b45199b9e9a5c4a33 100644 --- a/autoload/lsp/lspserver.vim +++ b/autoload/lsp/lspserver.vim @@ -438,7 +438,16 @@ } } }, window: {}, - general: {} + general: { + # Currently we always send character count as position offset, + # which meanas only utf-32 is supported. + # Adding utf-16 simply for good mesure, as I'm scared some servers will + # give up if they don't support utf-32 only. + positionEncodings: ['utf-32', 'utf-16'] + }, + # This is the way clangd expects to be informated about supported encodings: + # https://clangd.llvm.org/extensions#utf-8-offsets + offsetEncoding: ['utf-32', 'utf-16'] } # interface 'InitializeParams'