From 822dbb5796060800d3ee515046f6026e2a8d9dc3 Mon Sep 17 00:00:00 2001 From: Santo Cariotti Date: Tue, 5 Jul 2022 17:42:49 +0200 Subject: Fix capabilities offset encoding --- .config/nvim/lua/lsp_conf.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to '.config/nvim') diff --git a/.config/nvim/lua/lsp_conf.lua b/.config/nvim/lua/lsp_conf.lua index 291aaf3..a64839e 100644 --- a/.config/nvim/lua/lsp_conf.lua +++ b/.config/nvim/lua/lsp_conf.lua @@ -57,9 +57,11 @@ end local servers = { 'pyright', 'rust_analyzer', 'tsserver', 'clangd' } +local capabilities = vim.lsp.protocol.make_client_capabilities() +capabilities.offsetEncoding = { "utf-16" } for _, lsp in ipairs(servers) do nvim_lsp[lsp].setup { - capabilities = coq.lsp_ensure_capabilities(), + capabilities = capabilities, on_attach = common_on_attach, flags = { debounce_text_changes = 150, -- cgit v1.2.3-18-g5258