misc: fix statix errors

This commit is contained in:
Gaetan Lepage 2023-09-17 01:02:46 +02:00 committed by Gaétan Lepage
parent 69ba62aa36
commit 6152cc9504
4 changed files with 28 additions and 21 deletions

View file

@ -1136,8 +1136,7 @@ in {
];
autoCmd =
[]
++ (optional autoOpenEnabled {
(optional autoOpenEnabled {
event = "VimEnter";
callback = helpers.mkRaw "open_nvim_tree";
})

View file

@ -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})
'';

View file

@ -73,9 +73,11 @@
plugins = {
lsp = {
enable = true;
servers.rnix-lsp.enable = true;
servers.rust-analyzer.enable = true;
servers.jsonls.enable = true;
servers = {
rnix-lsp.enable = true;
rust-analyzer.enable = true;
jsonls.enable = true;
};
};
nvim-tree = {

View file

@ -59,9 +59,11 @@
# you can specify only the sections you want to change
{
name = "filename";
extraConfig.newfile_status = true;
extraConfig.path = 1;
extraConfig.shorting_target = 60;
extraConfig = {
newfile_status = true;
path = 1;
shorting_target = 60;
};
}
];
lualine_z = [