Compare commits

..

No commits in common. "958e91c836d664cf79a7d0d98072561b678e35b8" and "b81735b8858b27772d8b33461deebebf11067505" have entirely different histories.

4 changed files with 46 additions and 54 deletions

View file

@ -13,34 +13,4 @@ lib.makeExtensible (self: rec {
rev = input.shortRev or "dirty";
in
"unstable-${date}_${rev}";
mapModules = f: dir:
let
filter = name: type:
let
isPublic = !(lib.hasPrefix "_" name);
isSomething = type != null;
isModule =
let
path = "${toString dir}/${name}";
isDefault = type == "directory" && builtins.pathExists "${path}/default.nix";
isFile = type == "regular" && lib.hasSuffix ".nix" name && name != "default.nix";
in
isDefault || isFile;
in
isPublic && isSomething && isModule;
mkModule = name: _:
let
path = "${toString dir}/${name}";
normalizedName =
if name == "default.nix"
then name
else lib.removeSuffix ".nix" name;
in
lib.nameValuePair normalizedName (f path);
in
lib.mapAttrs' mkModule (lib.filterAttrs filter (builtins.readDir dir));
mapModules' = f: dir: lib.attrValues (mapModules f dir);
})

View file

@ -85,12 +85,12 @@ in
bezier = circ, 0.785, 0.135, 0.15, 0.86
bezier = back, 0.68, -0.55, 0.265, 1.55
animation = windows, 1, 4, default, slide
animation = windowsIn, 1, 4, circ, slide
animation = windowsOut, 1, 4, circ, slide
animation = windows, 1, 3, circ
animation = windowsOut, 1, 2, quint
animation = border, 1, 2, sine
animation = fade, 1, 4, sine
animation = workspaces, 1, 5, circ, fade
animation = fade, 1, 2, sine
animation = workspaces, 1, 5, circ
}
dwindle {

View file

@ -1,6 +1,7 @@
{ config
, lib
, pkgs
, inputs
, ...
}:
@ -8,18 +9,12 @@ with lib;
let
cfg = config.my.programs.nvim;
mkPlugin = fileName:
let
path = ./plugins + "/${fileName}";
pluginName = lib.removeSuffix ".lua" fileName;
in
{
plugin = pkgs.vimPlugins.${pluginName};
mkPlugin = name: {
plugin = pkgs.vimPlugins.${name};
type = "lua";
config = lib.readFile path;
config = lib.readFile (./plugins + "/${name}.lua");
};
pluginFileNames = builtins.attrNames (builtins.readDir ./plugins);
pluginsWithConfig = builtins.map mkPlugin pluginFileNames;
in
{
options.my.programs.nvim.enable = mkEnableOption "nvim";
@ -56,7 +51,29 @@ in
taplo
yamlfmt
];
plugins = with pkgs.vimPlugins; [
plugins = builtins.map mkPlugin [
"catppuccin-nvim"
"comment-nvim"
"copilot-lua"
"dashboard-nvim"
"formatter-nvim"
"gitsigns-nvim"
"lualine-nvim"
"noice-nvim"
"nvim-autopairs"
"nvim-lastplace"
"nvim-surround"
"nvim-tree-lua"
"nvim-treesitter-textsubjects"
"nvim-ts-context-commentstring"
"orgmode"
"smartcolumn-nvim"
"telescope-fzf-native-nvim"
"telescope-nvim"
"telescope-zoxide"
"which-key-nvim"
"todo-comments-nvim"
] ++ (with pkgs.vimPlugins; [
cmp-nvim-lsp
cmp_luasnip
copilot-cmp
@ -67,17 +84,17 @@ in
lspsaga-nvim-original
lualine-lsp-progress
luasnip
nui-nvim
nui-nvim # for noice-nvim
nvim-cmp
nvim-lspconfig
nvim-treesitter.withAllGrammars
nvim-ufo
nvim-web-devicons
plenary-nvim
nvim-web-devicons # for dashboard-nvim
plenary-nvim # for telescope, neogit
popup-nvim
promise-async
vim-lion
] ++ pluginsWithConfig;
]);
};
};
};

View file

@ -1,4 +1,9 @@
{ inputs, lib }:
lib.composeManyExtensions
(lib.my.mapModules' (file: import file { inherit inputs lib; }) ./.)
lib.composeManyExtensions [
(import ./channels.nix { inherit inputs lib; })
(import ./packages.nix { inherit inputs lib; })
(import ./vimPlugins.nix { inherit inputs lib; })
(import ./wayland.nix { inherit inputs lib; })
(import ./lib.nix { inherit inputs lib; })
]