neovim: add plugins & config

This commit is contained in:
notohh 2024-11-01 07:21:24 -04:00
parent 5d479b444e
commit 95cd793a00
Signed by: notohh
GPG key ID: BD47506D475EE86D
14 changed files with 142 additions and 0 deletions

View file

@ -21,6 +21,23 @@
command = "Neotree"; command = "Neotree";
} }
]; ];
keymaps = [
{
action = "<cmd>LazyGit<CR>";
key = "<C-l>";
mode = "n";
}
{
action = "<cmd>ToggleTerm<CR>";
key = "<C-t>";
mode = "n";
}
{
action = "<cmd>Telescope<CR>";
key = "<C-f>";
mode = "n";
}
];
extraConfigLua = '' extraConfigLua = ''
vim.wo.relativenumber = true vim.wo.relativenumber = true
''; '';

View file

@ -6,15 +6,23 @@ _: {
./editor/bufferline.nix ./editor/bufferline.nix
./editor/autosave.nix ./editor/autosave.nix
./editor/treesitter.nix ./editor/treesitter.nix
./editor/guessindent.nix
./editor/luasnip.nix
./editor/cmp.nix
./lsp/lsp.nix ./lsp/lsp.nix
./lsp/conform.nix ./lsp/conform.nix
./misc/wakatime.nix ./misc/wakatime.nix
./misc/direnv.nix ./misc/direnv.nix
./misc/presence.nix ./misc/presence.nix
./misc/lazygit.nix
./misc/vimbbye.nix
./ui/lualine.nix ./ui/lualine.nix
./ui/mini.nix ./ui/mini.nix
./ui/transparent.nix ./ui/transparent.nix
./ui/telescope.nix ./ui/telescope.nix
./ui/fidget.nix
./ui/dashboard.nix
./ui/toggleterm.nix
]; ];
programs.nixvim.plugins.web-devicons.enable = true; programs.nixvim.plugins.web-devicons.enable = true;
} }

View file

@ -0,0 +1,27 @@
_: {
programs.nixvim.plugins = {
cmp = {
enable = true;
autoEnableSources = true;
settings = {
sources = [
{name = "nvim_lsp";}
{name = "path";}
{name = "buffer";}
{name = "luasnip";}
];
mapping = {
__raw = ''
cmp.mapping.preset.insert({
['<C-b>'] = cmp.mapping.scroll_docs(-4),
['<C-f>'] = cmp.mapping.scroll_docs(4),
['<C-Space>'] = cmp.mapping.complete(),
['<C-e>'] = cmp.mapping.abort(),
['<CR>'] = cmp.mapping.confirm({ select = true }),
})
'';
};
};
};
};
}

View file

@ -0,0 +1,3 @@
_: {
programs.nixvim.plugins.guess-indent.enable = true;
}

View file

@ -0,0 +1,9 @@
_: {
programs.nixvim.plugins.luasnip = {
enable = true;
settings = {
enable_autosnippets = true;
store_selection_keys = "<Tab>";
};
};
}

View file

@ -2,5 +2,13 @@ _: {
programs.nixvim.plugins.neo-tree = { programs.nixvim.plugins.neo-tree = {
enable = true; enable = true;
enableDiagnostics = true; enableDiagnostics = true;
extraOptions = {
filesystem = {
filtered_items = {
visible = true;
hide_fotfiles = false;
};
};
};
}; };
} }

View file

@ -11,6 +11,13 @@
toml toml
xml xml
yaml yaml
rust
go
gomod
]; ];
settings = {
highlight.enable = true;
indent.enable = false;
};
}; };
} }

View file

@ -12,6 +12,21 @@
"alejandra" "alejandra"
] ]
]; ];
rust = [
[
"rustfmt"
]
];
go = [
[
"gofmt"
]
];
lua = [
[
"stylua"
]
];
}; };
format_on_save = '' format_on_save = ''
function(bufnr) function(bufnr)
@ -49,6 +64,15 @@
alejandra = { alejandra = {
commmand = "${lib.getExe pkgs.alejandra}"; commmand = "${lib.getExe pkgs.alejandra}";
}; };
rustfmt = {
commmand = "${lib.getExe pkgs.rustfmt}";
};
gofmt = {
commmand = "${lib.getExe pkgs.go}";
};
stylua = {
commmand = "${lib.getExe pkgs.stylua}";
};
}; };
}; };
}; };

View file

@ -27,6 +27,13 @@ _: {
installCargo = true; installCargo = true;
installRustc = true; installRustc = true;
}; };
gopls = {
enable = true;
autostart = true;
};
nushell = {
enable = true;
};
}; };
}; };
}; };

View file

@ -0,0 +1,3 @@
_: {
programs.nixvim.plugins.lazygit.enable = true;
}

View file

@ -0,0 +1,3 @@
_: {
programs.nixvim.plugins.vim-bbye.enable = true;
}

View file

@ -0,0 +1,5 @@
_: {
programs.nixvim.plugins.dashboard = {
enable = true;
};
}

View file

@ -0,0 +1,8 @@
_: {
programs.nixvim.plugins.fidget = {
enable = true;
notification.window = {
winblend = 0;
};
};
}

View file

@ -0,0 +1,13 @@
_: {
programs.nixvim.plugins.toggleterm = {
enable = true;
settings = {
direction = "float";
float_opts = {
border = "curved";
height = 30;
width = 130;
};
};
};
}