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
|
@ -1136,8 +1136,7 @@ in {
|
|||
];
|
||||
|
||||
autoCmd =
|
||||
[]
|
||||
++ (optional autoOpenEnabled {
|
||||
(optional autoOpenEnabled {
|
||||
event = "VimEnter";
|
||||
callback = helpers.mkRaw "open_nvim_tree";
|
||||
})
|
||||
|
|
|
@ -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})
|
||||
'';
|
||||
|
|
|
@ -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 = {
|
||||
|
|
|
@ -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 = [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue