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 = [ imports = [
./plugins ./plugins
@ -13,7 +12,16 @@
luaLoader.enable = true; luaLoader.enable = true;
performance = { performance = {
combinePlugins.enable = true; combinePlugins = {
byteCompileLua.enable = true; 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."; options.desc = "Look through yank history with telescope.";
} }
{ {
action = '':lua require("yazi").yazi()<CR>''; action = '':Oil<CR>'';
key = "<Leader>e"; key = "<Leader>e";
options = { 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; noremap = true;
silent = 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>"; # action = "<cmd>lua require'conform'.format({ bufnr = args.bf })<CR>";
# key = "<Leader>cf"; # key = "<Leader>cf";
# options = { # options = {

View file

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

View file

@ -28,6 +28,16 @@
plugins.conform-nvim = { plugins.conform-nvim = {
enable = true; 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 = { settings = {
format_on_save = { format_on_save = {
timeoutMs = 500; timeoutMs = 500;

View file

@ -1,4 +1,5 @@
# Getting around REALLY FAST # Getting around REALLY FAST
{ pkgs, ... }:
{ {
plugins = { plugins = {
telescope = { telescope = {
@ -37,9 +38,21 @@
}; };
yazi = { yazi = {
enable = true; enable = true;
settings = { # settings = {
open_for_directories = true; # 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 = { harpoon = {
enable = true; enable = true;

View file

@ -22,6 +22,38 @@
enableTelescope = true; enableTelescope = true;
}; };
trouble.enable = 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; crates-nvim.enable = true;
# git stuff # git stuff
lazygit.enable = true; lazygit.enable = true;

View file

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