mirror of
https://github.com/nix-community/nixvim.git
synced 2025-07-09 16:54:36 +02:00
misc: fix statix errors
This commit is contained in:
parent
69ba62aa36
commit
6152cc9504
4 changed files with 28 additions and 21 deletions
|
@ -213,23 +213,27 @@ in {
|
|||
You should set `plugins.lsp.enable = true` to make use of the clangd-extensions' features.
|
||||
'';
|
||||
|
||||
plugins.lsp.servers.clangd.extraOptions = mkIf cfg.enableOffsetEncodingWorkaround {
|
||||
capabilities = {__raw = "__clangdCaps";};
|
||||
plugins.lsp = {
|
||||
servers.clangd = {
|
||||
# Enable the clangd language server
|
||||
enable = true;
|
||||
|
||||
extraOptions = mkIf cfg.enableOffsetEncodingWorkaround {
|
||||
capabilities = {__raw = "__clangdCaps";};
|
||||
};
|
||||
};
|
||||
|
||||
preConfig =
|
||||
optionalString
|
||||
cfg.enableOffsetEncodingWorkaround
|
||||
''
|
||||
local __clangdCaps = vim.lsp.protocol.make_client_capabilities()
|
||||
__clangdCaps.offsetEncoding = { "utf-16" }
|
||||
'';
|
||||
};
|
||||
|
||||
extraPlugins = [cfg.package];
|
||||
|
||||
# Enable the clangd language server
|
||||
plugins.lsp.servers.clangd.enable = true;
|
||||
|
||||
plugins.lsp.preConfig =
|
||||
optionalString
|
||||
cfg.enableOffsetEncodingWorkaround
|
||||
''
|
||||
local __clangdCaps = vim.lsp.protocol.make_client_capabilities()
|
||||
__clangdCaps.offsetEncoding = { "utf-16" }
|
||||
'';
|
||||
|
||||
plugins.lsp.postConfig = ''
|
||||
require("clangd_extensions").setup(${helpers.toLuaObject setupOptions})
|
||||
'';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue