profiles: add recommended plugins

This commit is contained in:
Dmitriy Pleshevskiy 2024-05-06 12:30:41 +03:00
parent 4b9f76b764
commit 8940daadb9
Signed by: pleshevskiy
GPG key ID: 17041163DA10A9A2
2 changed files with 65 additions and 4 deletions

View file

@ -13,16 +13,25 @@
, ...
} @ inputs:
let
inherit (builtins) listToAttrs readDir attrNames;
inherit (nixpkgs) lib;
mkNixeovim = { system, config }:
let pkgs = import nixpkgs { inherit system; }; in
import ./. { inherit config pkgs nix2lua; };
mkNixeovimPackage = args: (mkNixeovim args).build.neovim.toplevel;
profiles = listToAttrs
(map
(fileName:
lib.nameValuePair (lib.removeSuffix ".nix" fileName) (./modules/profiles + "/${fileName}")
)
(attrNames (readDir ./modules/profiles))
);
in
{
lib = { inherit mkNixeovim mkNixeovimPackage; };
profiles = {
base = ./modules/profiles/base.nix;
};
inherit profiles;
}
// flake-utils.lib.eachDefaultSystem (
system:
@ -30,7 +39,8 @@
{
packages = {
default = nixeovimPackage { };
base = nixeovimPackage ./modules/profiles/base.nix;
base = nixeovimPackage profiles.base;
recommended-plugins = nixeovimPackage profiles.recommended-plugins;
};
}
);

View file

@ -0,0 +1,51 @@
{ lib, ... }:
let inherit (lib.nix2lua) nf; in
{
plugin.editorconfig-nvim.isDependency = lib.mkDefault true;
plugins = {
interface.lualine = {
enable = lib.mkDefault true;
settings = lib.mkDefault {
sections = {
lualine_a = [
[ "filename" (nf "path" 1) ]
];
lualine_b = [ "branch" "diff" "diagnostics" ];
lualine_c = [ "lsp_progress" ];
lualine_x = [ "filesize" "filetype" ];
lualine_y = [ "progress" ];
lualine_z = [ "location" "mode" ];
};
};
};
language-server.lspconfig.enable = lib.mkDefault true;
navigation = {
hop-nvim.enable = lib.mkDefault true;
nvim-tree.enable = lib.mkDefault true;
telescope = {
enable = lib.mkDefault true;
extensions = lib.mkDefault {
telescope-live-grep-args-nvim = { name = "live_grep_args"; };
};
};
};
style = {
neoformat.enable = lib.mkDefault true;
nvim-treesitter.enable = lib.mkDefault true;
};
theme.catppuccin = {
enable = lib.mkDefault true;
settings = lib.mkDefault {
flavour = "frappe";
};
};
gitsigns.enable = lib.mkDefault true;
};
}