Merge pull request #86 from horriblename/fix-clangd-offset-encoding

fix(clangd): use same offsetEncoding as null-ls
This commit is contained in:
NotAShelf 2023-06-12 10:27:56 +03:00 committed by GitHub
commit efe5905c41
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -24,8 +24,11 @@ with builtins; let
clangd = {
package = pkgs.clang-tools;
lspConfig = ''
local clangd_cap = capabilities
-- use same offsetEncoding as null-ls
clangd_cap.offsetEncoding = {"utf-16"}
lspconfig.clangd.setup{
capabilities = capabilities;
capabilities = clangd_cap;
on_attach=default_on_attach;
cmd = {"${cfg.lsp.package}/bin/clangd"};
${optionalString (cfg.lsp.opts != null) "init_options = ${cfg.lsp.opts}"}