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 = autoCmd =
[] (optional autoOpenEnabled {
++ (optional autoOpenEnabled {
event = "VimEnter"; event = "VimEnter";
callback = helpers.mkRaw "open_nvim_tree"; 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. You should set `plugins.lsp.enable = true` to make use of the clangd-extensions' features.
''; '';
plugins.lsp.servers.clangd.extraOptions = mkIf cfg.enableOffsetEncodingWorkaround { plugins.lsp = {
capabilities = {__raw = "__clangdCaps";}; 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]; 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 = '' plugins.lsp.postConfig = ''
require("clangd_extensions").setup(${helpers.toLuaObject setupOptions}) require("clangd_extensions").setup(${helpers.toLuaObject setupOptions})
''; '';

View file

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

View file

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