Update formating.

This commit is contained in:
CronyAkatsuki 2024-03-01 08:23:28 +01:00
parent b6476accfa
commit 906719cd3b

View File

@ -1,8 +1,5 @@
{ inputs, pkgs, ... }: { inputs, pkgs, ... }: {
{ imports = [ inputs.nixvim.homeManagerModules.nixvim ];
imports = [
inputs.nixvim.homeManagerModules.nixvim
];
# Nixvim # Nixvim
programs.nixvim = { programs.nixvim = {
@ -10,15 +7,11 @@
viAlias = true; viAlias = true;
vimAlias = true; vimAlias = true;
keymaps = [ keymaps = [{
{ action = "<cmd>Oil<cr>";
action = "<cmd>Oil<cr>"; key = "<leader>e";
key = "<leader>e"; options = { silent = true; };
options = { }];
silent = true;
};
}
];
options = { options = {
hlsearch = false; hlsearch = false;
@ -52,16 +45,25 @@
maplocalleader = ";"; maplocalleader = ";";
}; };
extraConfigLuaPre = ''
vim.loader.enable()
'';
extraConfigLuaPost = '' extraConfigLuaPost = ''
vim.notify = require("mini.notify").make_notify() vim.notify = require("mini.notify").make_notify()
''; '';
plugins = { plugins = {
harpoon = { harpoon = {
enable = true; enable = true;
keymaps = { keymaps = {
addFile = "<leader>a"; addFile = "<leader>a";
toggleQuickMenu = "<C-e>"; toggleQuickMenu = "<C-e>";
navFile = { "1" = "<C-j>"; "2" = "<C-k>"; "3" = "<C-l>"; "4" = "<C-;>"; }; navFile = {
"1" = "<C-j>";
"2" = "<C-k>";
"3" = "<C-l>";
"4" = "<C-;>";
};
}; };
}; };
@ -77,11 +79,11 @@
enable = true; enable = true;
signs = { signs = {
add.text = ""; add.text = "";
change.text = ""; change.text = "";
changedelete.text = ""; changedelete.text = "";
delete.text = ""; delete.text = "";
topdelete.text = ""; topdelete.text = "";
untracked.text = ""; untracked.text = "";
}; };
onAttach.function = '' onAttach.function = ''
function(buffer) function(buffer)
@ -95,32 +97,30 @@
map("n", "]g", gs.next_hunk, "Next git hunk") map("n", "]g", gs.next_hunk, "Next git hunk")
map("n", "[g", gs.prev_hunk, "Previous git hunk") map("n", "[g", gs.prev_hunk, "Previous git hunk")
end end
''; '';
}; };
mini = { mini = {
enable = true; enable = true;
modules = { modules = {
statusline = { statusline = { set_vim_settings = false; };
set_vim_settings = false; comment = { };
}; notify = { };
comment = {}; };
notify = {};
};
}; };
telescope = { telescope = {
enable = true; enable = true;
extensions = { extensions = {
fzf-native = { fzf-native = {
enable = true; enable = true;
fuzzy = true; fuzzy = true;
overrideGenericSorter = true; overrideGenericSorter = true;
overrideFileSorter = true; overrideFileSorter = true;
caseMode = "smart_case"; caseMode = "smart_case";
}; };
ui-select.enable = true; ui-select.enable = true;
}; };
keymaps = { keymaps = {
"<leader>pf" = "find_files"; "<leader>pf" = "find_files";
"<C-p>" = "git_files"; "<C-p>" = "git_files";
@ -166,41 +166,38 @@
sign_define({ name = "DiagnosticSignWarn", text = "W" }) sign_define({ name = "DiagnosticSignWarn", text = "W" })
sign_define({ name = "DiagnosticSignHint", text = "H" }) sign_define({ name = "DiagnosticSignHint", text = "H" })
sign_define({ name = "DiagnosticSignInfo", text = "I" }) sign_define({ name = "DiagnosticSignInfo", text = "I" })
''; '';
}; };
nvim-cmp = { nvim-cmp = {
enable = true; enable = true;
autoEnableSources = true; autoEnableSources = true;
sources = [ sources =
{name = "nvim_lsp";} [ { name = "nvim_lsp"; } { name = "path"; } { name = "snippy"; } ];
{name = "path";}
{name = "snippy";}
];
snippet.expand = "snippy"; snippet.expand = "snippy";
mapping = { mapping = {
"<C-l>" = "cmp.mapping.confirm({ select = false })"; "<C-l>" = "cmp.mapping.confirm({ select = false })";
"<C-j>" = { "<C-j>" = {
action = '' action = ''
function(fallback) function(fallback)
if cmp.visible then if cmp.visible then
cmp.select_next_item() cmp.select_next_item()
else else
fallback() fallback()
end end
end end
''; '';
modes = [ "i" "s" ]; modes = [ "i" "s" ];
}; };
"<C-k>" = { "<C-k>" = {
action = '' action = ''
function(fallback) function(fallback)
if cmp.visible then if cmp.visible then
cmp.select_prev_item() cmp.select_prev_item()
else else
fallback() fallback()
end end
end end
''; '';
modes = [ "i" "s" ]; modes = [ "i" "s" ];
}; };
@ -216,8 +213,6 @@
keywords = [ "bold" ]; keywords = [ "bold" ];
}; };
}; };
extraPlugins = with pkgs.vimPlugins; [ extraPlugins = with pkgs.vimPlugins; [ vim-snippets ];
vim-snippets
];
}; };
} }