From: Andreas Louv Date: Fri, 31 Mar 2023 16:07:10 +0000 (+0200) Subject: Inform language servers that we really only supports utf-32 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=0da0b0bacbd652d0b6b6e5b168358de90fda0af7;p=vim-lsp.git Inform language servers that we really only supports utf-32 --- diff --git a/autoload/lsp/lspserver.vim b/autoload/lsp/lspserver.vim index fc22eec..b7da537 100644 --- a/autoload/lsp/lspserver.vim +++ b/autoload/lsp/lspserver.vim @@ -438,7 +438,16 @@ def InitServer(lspserver: dict) } }, 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'