feat: minor overhaul

* switch to oil.nvim from yazi
* use lualine with custom config
* optimize settings
This commit is contained in:
Youwen Wu 2024-09-16 23:48:33 -07:00
parent aaa7fb7c07
commit 414e46dd15
Signed by: youwen5
GPG key ID: 865658ED1FE61EC3
7 changed files with 85 additions and 17 deletions

View file

@ -1,4 +1,3 @@
{ pkgs, ... }:
{
imports = [
./plugins
@ -13,7 +12,16 @@
luaLoader.enable = true;
performance = {
combinePlugins.enable = true;
byteCompileLua.enable = true;
combinePlugins = {
enable = true;
standalonePlugins = [
"nvim-treesitter"
];
};
byteCompileLua = {
enable = true;
plugins = true;
nvimRuntime = true;
};
};
}

View file

@ -323,10 +323,19 @@
options.desc = "Look through yank history with telescope.";
}
{
action = '':lua require("yazi").yazi()<CR>'';
action = '':Oil<CR>'';
key = "<Leader>e";
options = {
desc = "Open Yazi current nvim working directory";
desc = "Open oil file explorer in current nvim working directory";
noremap = true;
silent = true;
};
}
{
action = '':Oil<CR>'';
key = "<Leader>e";
options = {
desc = "Open oil file explorer in current nvim working directory";
noremap = true;
silent = true;
};
@ -377,15 +386,6 @@
};
}
# {
# action = ":Yazi<CR>";
# key = "<Leader>mf";
# options = {
# desc = "Open Yazi at current file";
# noremap = true;
# silent = true;
# };
# }
# {
# action = "<cmd>lua require'conform'.format({ bufnr = args.bf })<CR>";
# key = "<Leader>cf";
# options = {

View file

@ -1,5 +1,9 @@
{
plugins = {
lspkind = {
enable = true;
cmp.enable = true;
};
cmp-async-path.enable = true;
cmp = {
enable = true;

View file

@ -28,6 +28,16 @@
plugins.conform-nvim = {
enable = true;
# because combinePlugins.enable = true, the collision of `doc` is
# unavoidable. this renames them.
package = pkgs.vimPlugins.conform-nvim.overrideAttrs (oldAttrs: {
postInstall =
(oldAttrs.postInstall or "")
+ ''
mv $out/doc/recipes.md $out/doc/conform-nvim_recipes.md
'';
});
# package = pkgs.vimPlugins.conform-nvim;
settings = {
format_on_save = {
timeoutMs = 500;

View file

@ -1,4 +1,5 @@
# Getting around REALLY FAST
{ pkgs, ... }:
{
plugins = {
telescope = {
@ -37,9 +38,21 @@
};
yazi = {
enable = true;
settings = {
open_for_directories = true;
# settings = {
# open_for_directories = true;
# };
};
oil = {
enable = true;
# because combinePlugins.enable = true, the collision of `doc` is
# unavoidable. this renames them.
package = pkgs.vimPlugins.oil-nvim.overrideAttrs (oldAttrs: {
postInstall =
(oldAttrs.postInstall or "")
+ ''
mv $out/doc/recipes.md $out/doc/oil_recipes.md
'';
});
};
harpoon = {
enable = true;

View file

@ -22,6 +22,38 @@
enableTelescope = true;
};
trouble.enable = true;
barbecue.enable = true;
lualine = {
enable = true;
sections = {
lualine_a = [ "branch" ];
lualine_b = [ "diff" ];
lualine_c = [
# {
# __unkeyed-1 = {
# __raw = ''
# function()
# local bufnr = vim.api.nvim_get_current_buf()
#
# local clients = vim.lsp.buf_get_clients(bufnr)
# if next(clients) == nil then
# return ""
# end
#
# local c = {}
# for _, client in pairs(clients) do
# table.insert(c, client.name)
# end
# return '\u{f085} ' .. table.concat(c, '|')
# end
# '';
# icon = "";
# };
# }
];
};
globalstatus = true;
};
crates-nvim.enable = true;
# git stuff
lazygit.enable = true;

View file

@ -54,6 +54,7 @@
nvim = nixvim'.makeNixvimWithModule nixvimModule;
in
{
formatter = pkgs.nixfmt-rfc-style;
checks = {
default = nixvimLib.check.mkTestDerivationFromNixvimModule nixvimModule;