This commit is contained in:
meml0rz
2024-11-13 01:15:31 +01:00
parent be65bd0248
commit e32f338024
6 changed files with 149 additions and 127 deletions

View File

@ -1,43 +1,48 @@
{ config, pkgs, nixvim, ... }:
{ {
programs.nixvim = { config,
plugins = { pkgs,
alpha = { nixvim,
enable = true; ...
layout = [ }:
{ {
type = "padding"; programs.nixvim = {
val = 2; plugins = {
} alpha = {
{ enable = true;
opts = { layout = [
hl = "Type"; {
position = "center"; type = "padding";
}; val = 2;
type = "text"; }
val = [ {
" " opts = {
" " hl = "Type";
" " position = "center";
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
];
}
{
type = "padding";
val = 2;
}
];
}; };
}; type = "text";
val = [
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
];
}
{
type = "padding";
val = 2;
}
];
};
}; };
};
} }

View File

@ -26,6 +26,8 @@ in
"<C-Space>" = "cmp.mapping.complete()"; "<C-Space>" = "cmp.mapping.complete()";
"<C-e>" = "cmp.mapping.abort()"; "<C-e>" = "cmp.mapping.abort()";
"<C-Left>" = "cmp.mapping.abort()"; "<C-Left>" = "cmp.mapping.abort()";
"<Up>" = "cmp.mapping.select_prev_item()";
"<Down>" = "cmp.mapping.select_next_item()";
"<CR>" = "cmp.mapping.confirm({ select = false })"; "<CR>" = "cmp.mapping.confirm({ select = false })";
}; };

View File

@ -1,10 +1,15 @@
{ config, pkgs, nixvim, ... }:
{ {
programs.nixvim = { config,
plugins = { pkgs,
toggleterm.enable = true; nixvim,
autoclose.enable = true; ...
web-devicons.enable = true; }:
}; {
programs.nixvim = {
plugins = {
toggleterm.enable = true;
autoclose.enable = true;
web-devicons.enable = true;
}; };
};
} }

View File

@ -1,10 +1,15 @@
{ config, pkgs, nixvim, ... }:
{ {
programs.nixvim = { config,
plugins = { pkgs,
lualine = { nixvim,
enable = true; ...
}; }:
}; {
}; programs.nixvim = {
plugins = {
lualine = {
enable = true;
};
};
};
} }

View File

@ -1,16 +1,21 @@
{ config, pkgs, nixvim, ... }:
{ {
programs.nixvim = { config,
plugins = { pkgs,
neo-tree = { nixvim,
enable = true; ...
enableDiagnostics = true; }:
enableGitStatus = true; {
window = { programs.nixvim = {
position = "right"; plugins = {
width = 40; neo-tree = {
}; enable = true;
}; enableDiagnostics = true;
}; enableGitStatus = true;
}; window = {
position = "right";
width = 40;
};
};
};
};
} }

View File

@ -1,62 +1,62 @@
{ pkgs, ... }: { pkgs, ... }:
{ {
programs.nixvim.plugins.none-ls = { programs.nixvim.plugins.none-ls = {
enable = true; enable = true;
enableLspFormat = true; enableLspFormat = true;
settings = { settings = {
updateInInsert = false; updateInInsert = false;
};
sources = {
code_actions = {
gitsigns.enable = true;
statix.enable = true;
};
diagnostics = {
statix.enable = true;
yamllint.enable = true;
};
formatting = {
nixfmt = {
enable = true;
package = pkgs.nixfmt-rfc-style;
};
black = {
enable = true;
settings = ''
{
extra_args = { "--fast" },
}
'';
};
prettier = {
enable = true;
disableTsServerFormatter = true;
settings = ''
{
extra_args = { "--no-semi" },
}
'';
};
stylua.enable = true;
yamlfmt = {
enable = true;
};
hclfmt.enable = true;
};
};
}; };
programs.nixvim.keymaps = [ sources = {
{ code_actions = {
mode = [ gitsigns.enable = true;
"n" statix.enable = true;
"v" };
]; diagnostics = {
key = "<leader>cf"; statix.enable = true;
action = "<cmd>lua vim.lsp.buf.format()<cr>"; yamllint.enable = true;
options = { };
silent = true; formatting = {
desc = "Format"; nixfmt = {
}; enable = true;
} package = pkgs.nixfmt-rfc-style;
]; };
black = {
enable = true;
settings = ''
{
extra_args = { "--fast" },
}
'';
};
prettier = {
enable = true;
disableTsServerFormatter = true;
settings = ''
{
extra_args = { "--no-semi" },
}
'';
};
stylua.enable = true;
yamlfmt = {
enable = true;
};
hclfmt.enable = true;
};
};
};
programs.nixvim.keymaps = [
{
mode = [
"n"
"v"
];
key = "<leader>cf";
action = "<cmd>lua vim.lsp.buf.format()<cr>";
options = {
silent = true;
desc = "Format";
};
}
];
} }