2022-09-15 01:22:06 +03:00
|
|
|
{
|
|
|
|
inputs = {
|
|
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
|
|
|
utils.url = "github:numtide/flake-utils";
|
2022-09-19 18:44:57 +03:00
|
|
|
|
2022-09-24 17:21:16 +03:00
|
|
|
# Plenary (required by crates-nvim)
|
|
|
|
plenary-nvim = {
|
|
|
|
url = "github:nvim-lua/plenary.nvim";
|
2022-09-21 08:23:46 +03:00
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
|
2022-09-24 17:21:16 +03:00
|
|
|
# config
|
2022-09-19 19:03:40 +03:00
|
|
|
|
2022-09-24 17:21:16 +03:00
|
|
|
# https://github.com/gpanders/editorconfig.nvim
|
2022-09-19 19:03:40 +03:00
|
|
|
editorconfig-nvim = {
|
2022-11-08 11:31:10 +03:00
|
|
|
url = "github:gpanders/editorconfig.nvim?rev=e72d2331b43e3f08d0ecca44cecded4e20c01fab";
|
2022-09-19 19:03:40 +03:00
|
|
|
flake = false;
|
|
|
|
};
|
2022-09-19 19:25:59 +03:00
|
|
|
|
2022-09-24 17:21:16 +03:00
|
|
|
# explorer
|
|
|
|
|
|
|
|
# https://github.com/kyazdani42/nvim-tree.lua
|
|
|
|
nvim-tree-lua = {
|
2022-11-17 23:37:46 +03:00
|
|
|
url = "github:kyazdani42/nvim-tree.lua?rev=1837751efb5fcfc584cb0ee900f09ff911cd6c0b";
|
2022-09-24 17:21:16 +03:00
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
|
|
|
|
# https://github.com/nvim-telescope/telescope.nvim
|
|
|
|
telescope-nvim = {
|
2022-10-11 08:19:36 +03:00
|
|
|
url = "github:nvim-telescope/telescope.nvim?rev=f174a0367b4fc7cb17710d867e25ea792311c418";
|
2022-09-24 17:21:16 +03:00
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
|
|
|
|
# https://github.com/nvim-telescope/telescope-live-grep-args.nvim
|
2022-09-19 19:25:59 +03:00
|
|
|
telescope-live-grep-args-nvim = {
|
|
|
|
url = "github:nvim-telescope/telescope-live-grep-args.nvim?rev=32b633b062d1168a2d18ad27994e5b4ef97f0a74";
|
|
|
|
flake = false;
|
|
|
|
};
|
2022-09-19 20:43:20 +03:00
|
|
|
|
2022-09-24 17:21:16 +03:00
|
|
|
# formatter
|
|
|
|
|
|
|
|
# https://github.com/sbdchd/neoformat
|
|
|
|
neoformat = {
|
|
|
|
url = "github:sbdchd/neoformat?rev=0ae951121da29a157d80db70c32679b428afffdc";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
|
|
|
|
# git
|
|
|
|
|
|
|
|
# https://github.com/lewis6991/gitsigns.nvim
|
|
|
|
gitsigns-nvim = {
|
|
|
|
url = "github:lewis6991/gitsigns.nvim?rev=f98c85e7c3d65a51f45863a34feb4849c82f240f";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
|
|
|
|
# lsp
|
|
|
|
|
|
|
|
# https://github.com/neovim/nvim-lspconfig
|
|
|
|
nvim-lspconfig = {
|
|
|
|
url = "github:neovim/nvim-lspconfig?rev=d4eb971db353ccf78cefb3be1b05483b69ec1e69";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
|
2022-11-10 00:01:34 +03:00
|
|
|
# https://github.com/tamago324/nlsp-settings.nvim
|
|
|
|
nlsp-settings-nvim = {
|
|
|
|
url = "github:tamago324/nlsp-settings.nvim?rev=effb5f50b2ad7d6070e429635384345ca4be078e";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
|
2022-09-24 17:21:16 +03:00
|
|
|
# https://github.com/glepnir/lspsaga.nvim
|
2022-09-19 20:43:20 +03:00
|
|
|
lspsaga-nvim = {
|
2022-10-11 08:19:36 +03:00
|
|
|
url = "github:glepnir/lspsaga.nvim?rev=f33bc99d0ed3ed691a58b3339decf4e1933c3f9e";
|
2022-09-19 20:43:20 +03:00
|
|
|
flake = false;
|
|
|
|
};
|
2022-09-24 17:21:16 +03:00
|
|
|
|
|
|
|
# https://github.com/L3MON4D3/LuaSnip
|
2022-11-01 11:23:55 +03:00
|
|
|
luasnip = {
|
2022-09-24 17:21:16 +03:00
|
|
|
url = "github:L3MON4D3/LuaSnip?rev=d36c063b7f6e701852f7880f1314656592a61b4f";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
|
|
|
|
# https://github.com/hrsh7th/nvim-cmp
|
|
|
|
nvim-cmp = {
|
|
|
|
url = "github:hrsh7th/nvim-cmp?rev=17a55b3d5498c617855d015bbcad0c872d10c879";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
|
|
|
|
# https://github.com/hrsh7th/cmp-nvim-lsp
|
|
|
|
cmp-nvim-lsp = {
|
|
|
|
url = "github:hrsh7th/cmp-nvim-lsp?rev=affe808a5c56b71630f17aa7c38e15c59fd648a8";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
|
|
|
|
# https://github.com/saadparwaiz1/cmp_luasnip
|
|
|
|
cmp-luasnip = {
|
|
|
|
url = "github:saadparwaiz1/cmp_luasnip?rev=a9de941bcbda508d0a45d28ae366bb3f08db2e36";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
|
|
|
|
# syntax
|
|
|
|
|
|
|
|
# https://github.com/nvim-treesitter/nvim-treesitter
|
|
|
|
nvim-treesitter = {
|
|
|
|
url = "github:nvim-treesitter/nvim-treesitter?rev=a60aa7b2e1dd9219c6356f65ba48bdbd50090abd";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
|
|
|
|
# theme
|
|
|
|
|
|
|
|
# https://github.com/nanozuki/tabby.nvim
|
|
|
|
tabby-nvim = {
|
|
|
|
url = "github:nanozuki/tabby.nvim?rev=916c9e56d043906a441cd9f905e2ca1f5c4dddb0";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
|
|
|
|
# https://github.com/nvim-lualine/lualine.nvim
|
|
|
|
lualine-nvim = {
|
|
|
|
url = "github:nvim-lualine/lualine.nvim?rev=a52f078026b27694d2290e34efa61a6e4a690621";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
|
|
|
|
# https://github.com/arkav/lualine-lsp-progress
|
|
|
|
lualine-lsp-progress = {
|
|
|
|
url = "github:/arkav/lualine-lsp-progress?rev=56842d097245a08d77912edf5f2a69ba29f275d7";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
|
|
|
|
# https://github.com/kyazdani42/nvim-web-devicons
|
|
|
|
nvim-web-devicons = {
|
|
|
|
url = "github:kyazdani42/nvim-web-devicons?rev=969728506c0175644a1d448f55e311ccdada7eaf";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
|
|
|
|
# https://github.com/catppuccin/nvim
|
|
|
|
theme = {
|
|
|
|
url = "github:catppuccin/nvim?rev=9ac18414f0446478024b19018d73b7ea14f6fc96";
|
|
|
|
flake = false;
|
|
|
|
};
|
2022-10-22 23:35:27 +03:00
|
|
|
|
|
|
|
# ux
|
|
|
|
|
|
|
|
# https://github.com/phaazon/hop.nvim
|
|
|
|
hop-nvim = {
|
|
|
|
url = "github:phaazon/hop.nvim?rev=6591b3656b75ff313cc38dc662a7ee8f75f1c165";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
|
|
|
|
# https://github.com/nvim-orgmode/orgmode
|
|
|
|
nvim-orgmode = {
|
|
|
|
url = "github:nvim-orgmode/orgmode?rev=806b8b9b81eaaf9b236f0a20d8e0486da23f448c";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
|
|
|
|
# https://github.com/akinsho/org-bullets.nvim
|
|
|
|
org-bullets-nvim = {
|
|
|
|
url = "github:akinsho/org-bullets.nvim";
|
|
|
|
flake = false;
|
|
|
|
};
|
2022-09-15 01:22:06 +03:00
|
|
|
};
|
|
|
|
|
2022-09-19 18:44:57 +03:00
|
|
|
outputs = inputs @ { self, nixpkgs, utils, ... }:
|
2022-09-24 23:46:15 +03:00
|
|
|
let
|
|
|
|
inputPlugins = [
|
|
|
|
"plenary-nvim"
|
|
|
|
# config
|
|
|
|
"editorconfig-nvim"
|
|
|
|
# explorer
|
|
|
|
"nvim-tree-lua"
|
|
|
|
"telescope-nvim"
|
|
|
|
"telescope-live-grep-args-nvim"
|
|
|
|
# formatter
|
|
|
|
"neoformat"
|
|
|
|
# git
|
|
|
|
"gitsigns-nvim"
|
|
|
|
# lsp
|
|
|
|
"nvim-lspconfig"
|
2022-11-10 00:01:34 +03:00
|
|
|
"nlsp-settings-nvim"
|
2022-09-24 23:46:15 +03:00
|
|
|
"lspsaga-nvim"
|
2022-11-01 11:23:55 +03:00
|
|
|
"luasnip"
|
2022-09-24 23:46:15 +03:00
|
|
|
"nvim-cmp"
|
|
|
|
"cmp-nvim-lsp"
|
|
|
|
"cmp-luasnip"
|
|
|
|
# syntax
|
|
|
|
"nvim-treesitter"
|
|
|
|
# theme
|
|
|
|
"tabby-nvim"
|
|
|
|
"lualine-nvim"
|
|
|
|
"lualine-lsp-progress"
|
|
|
|
"nvim-web-devicons"
|
|
|
|
"theme"
|
2022-10-22 23:35:27 +03:00
|
|
|
# ux
|
|
|
|
"hop-nvim"
|
|
|
|
"nvim-orgmode"
|
|
|
|
"org-bullets-nvim"
|
2022-09-24 23:46:15 +03:00
|
|
|
];
|
|
|
|
|
|
|
|
mkNvimPlugins = { lib, vimUtils, vimPlugins, ... }:
|
|
|
|
let
|
2022-11-02 01:14:06 +03:00
|
|
|
inherit (builtins) getAttr attrNames pathExists readDir;
|
2022-09-24 23:46:15 +03:00
|
|
|
inherit (lib) listToAttrs nameValuePair;
|
|
|
|
|
|
|
|
buildPlugin = name: vimUtils.buildVimPluginFrom2Nix {
|
|
|
|
name = name;
|
|
|
|
src = getAttr name inputs;
|
2022-11-02 04:04:35 +03:00
|
|
|
patches = lib.optional
|
2022-11-02 01:14:06 +03:00
|
|
|
(pathExists ./patches/${name})
|
|
|
|
(map
|
2022-11-02 04:00:12 +03:00
|
|
|
(fn: ./patches/${name}/${fn})
|
2022-11-02 01:14:06 +03:00
|
|
|
(attrNames (readDir ./patches/${name}))
|
|
|
|
);
|
2022-09-24 23:46:15 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
buildPluginValuePair = n: nameValuePair n (buildPlugin n);
|
|
|
|
|
2022-11-17 23:44:45 +03:00
|
|
|
neovimPlugins = (listToAttrs (map buildPluginValuePair inputPlugins));
|
2022-09-24 23:46:15 +03:00
|
|
|
in
|
2022-11-17 23:44:45 +03:00
|
|
|
{ inherit neovimPlugins; };
|
2022-09-24 23:46:15 +03:00
|
|
|
in
|
2022-09-24 23:27:30 +03:00
|
|
|
{
|
|
|
|
overlays = {
|
|
|
|
default = final: prev: {
|
2022-10-22 23:35:27 +03:00
|
|
|
myneovim = prev.callPackage self (mkNvimPlugins prev);
|
2022-09-24 23:27:30 +03:00
|
|
|
};
|
|
|
|
};
|
|
|
|
} //
|
2022-09-15 01:22:06 +03:00
|
|
|
utils.lib.eachDefaultSystem (system:
|
|
|
|
let
|
2022-09-24 23:46:15 +03:00
|
|
|
pkgs = import nixpkgs { inherit system; };
|
2022-09-15 01:22:06 +03:00
|
|
|
|
2022-10-22 23:35:27 +03:00
|
|
|
neovim = pkgs.callPackage self (mkNvimPlugins pkgs);
|
|
|
|
|
|
|
|
testNeovim = (neovim.override {
|
|
|
|
enableDevIcons = true;
|
|
|
|
enableTabby = true;
|
|
|
|
enableOrgMode = true;
|
|
|
|
grammarFileTypes = [ "nix" "lua" "org" ];
|
|
|
|
});
|
2022-09-15 01:22:06 +03:00
|
|
|
in
|
|
|
|
{
|
2022-09-17 17:52:12 +03:00
|
|
|
apps.default = {
|
|
|
|
type = "app";
|
|
|
|
program = "${neovim}/bin/nvim";
|
|
|
|
};
|
2022-10-22 23:35:27 +03:00
|
|
|
apps.test = {
|
|
|
|
type = "app";
|
|
|
|
program = "${testNeovim}/bin/nvim";
|
|
|
|
};
|
2022-09-17 17:52:12 +03:00
|
|
|
|
|
|
|
packages.default = neovim;
|
2022-10-22 23:35:27 +03:00
|
|
|
packages.test = testNeovim;
|
2022-09-17 17:52:12 +03:00
|
|
|
|
2022-09-15 01:22:06 +03:00
|
|
|
devShells.default = pkgs.mkShell {
|
2022-09-16 23:42:53 +03:00
|
|
|
packages = [
|
|
|
|
pkgs.stylua # lua formatter
|
|
|
|
];
|
2022-09-15 01:22:06 +03:00
|
|
|
};
|
|
|
|
});
|
|
|
|
}
|