2023-02-01 19:11:37 +00:00
|
|
|
{
|
2023-02-01 20:59:35 +00:00
|
|
|
description = "A neovim flake with a modular configuration";
|
|
|
|
outputs = {
|
|
|
|
nixpkgs,
|
|
|
|
flake-utils,
|
|
|
|
...
|
|
|
|
} @ inputs: let
|
|
|
|
modulesWithInputs = import ./modules {inherit inputs;};
|
|
|
|
|
|
|
|
neovimConfiguration = {
|
|
|
|
modules ? [],
|
|
|
|
pkgs,
|
|
|
|
lib ? pkgs.lib,
|
|
|
|
check ? true,
|
|
|
|
extraSpecialArgs ? {},
|
|
|
|
}:
|
|
|
|
modulesWithInputs {
|
|
|
|
inherit pkgs lib check extraSpecialArgs;
|
|
|
|
configuration = {...}: {
|
|
|
|
imports = modules;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
nvimBin = pkg: "${pkg}/bin/nvim";
|
|
|
|
|
|
|
|
buildPkg = pkgs: modules:
|
|
|
|
(neovimConfiguration {
|
|
|
|
inherit pkgs modules;
|
|
|
|
})
|
|
|
|
.neovim;
|
|
|
|
|
|
|
|
tidalConfig = {
|
|
|
|
config = {
|
|
|
|
vim.tidal.enable = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
mainConfig = isMaximal: {
|
|
|
|
config = {
|
2023-02-03 21:46:19 +00:00
|
|
|
vim = {
|
2023-02-05 13:58:42 +00:00
|
|
|
viAlias = true;
|
2023-02-03 21:46:19 +00:00
|
|
|
vimAlias = true;
|
|
|
|
};
|
2023-02-01 20:59:35 +00:00
|
|
|
vim.lsp = {
|
|
|
|
enable = true;
|
|
|
|
formatOnSave = true;
|
|
|
|
lightbulb.enable = true;
|
|
|
|
lspsaga.enable = false;
|
|
|
|
nvimCodeActionMenu.enable = true;
|
|
|
|
trouble.enable = true;
|
|
|
|
lspSignature.enable = true;
|
|
|
|
rust.enable = isMaximal;
|
|
|
|
python = isMaximal;
|
|
|
|
clang.enable = isMaximal;
|
|
|
|
sql = isMaximal;
|
|
|
|
ts = isMaximal;
|
|
|
|
go = isMaximal;
|
|
|
|
zig.enable = isMaximal;
|
2023-02-03 15:54:54 +00:00
|
|
|
nix = {
|
|
|
|
enable = true;
|
|
|
|
formatter = "alejandra";
|
|
|
|
};
|
2023-02-01 20:59:35 +00:00
|
|
|
};
|
|
|
|
vim.visuals = {
|
|
|
|
enable = true;
|
|
|
|
nvimWebDevicons.enable = true;
|
2023-02-03 19:53:48 +00:00
|
|
|
scrollBar.enable = true;
|
2023-02-03 21:20:20 +00:00
|
|
|
smoothScroll.enable = true;
|
2023-02-05 13:14:25 +00:00
|
|
|
cellularAutomaton.enable = true;
|
2023-02-01 20:59:35 +00:00
|
|
|
lspkind.enable = true;
|
|
|
|
indentBlankline = {
|
|
|
|
enable = true;
|
|
|
|
fillChar = "";
|
|
|
|
eolChar = "";
|
|
|
|
showCurrContext = true;
|
|
|
|
};
|
|
|
|
cursorWordline = {
|
|
|
|
enable = true;
|
|
|
|
lineTimeout = 0;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
vim.statusline.lualine = {
|
|
|
|
enable = true;
|
|
|
|
theme = "catppuccin";
|
|
|
|
};
|
|
|
|
vim.theme = {
|
|
|
|
enable = true;
|
|
|
|
name = "catppuccin";
|
|
|
|
style = "mocha";
|
|
|
|
};
|
|
|
|
vim.autopairs.enable = true;
|
|
|
|
vim.autocomplete = {
|
|
|
|
enable = true;
|
|
|
|
type = "nvim-cmp";
|
|
|
|
};
|
2023-02-03 15:54:54 +00:00
|
|
|
vim.filetree = {
|
|
|
|
nvimTreeLua = {
|
|
|
|
enable = true;
|
|
|
|
view = {
|
|
|
|
width = 25;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2023-02-01 20:59:35 +00:00
|
|
|
vim.tabline.nvimBufferline.enable = true;
|
|
|
|
vim.treesitter = {
|
|
|
|
enable = true;
|
|
|
|
context.enable = true;
|
|
|
|
};
|
2023-02-03 22:45:31 +00:00
|
|
|
vim.binds = {
|
2023-02-01 20:59:35 +00:00
|
|
|
whichKey.enable = true;
|
2023-02-03 22:45:31 +00:00
|
|
|
cheatsheet.enable = true;
|
2023-02-01 20:59:35 +00:00
|
|
|
};
|
|
|
|
vim.telescope = {
|
|
|
|
enable = true;
|
|
|
|
};
|
|
|
|
vim.markdown = {
|
|
|
|
enable = true;
|
|
|
|
glow.enable = true;
|
|
|
|
};
|
|
|
|
vim.git = {
|
|
|
|
enable = true;
|
|
|
|
gitsigns.enable = true;
|
|
|
|
};
|
|
|
|
vim.minimap = {
|
2023-02-05 22:09:12 +00:00
|
|
|
minimap-vim.enable = false;
|
|
|
|
codewindow.enable = true; # lighter, faster, and uses lua for configuration
|
2023-02-01 20:59:35 +00:00
|
|
|
};
|
2023-02-03 07:36:08 +00:00
|
|
|
vim.dashboard = {
|
|
|
|
dashboard-nvim.enable = false;
|
2023-02-03 13:03:41 +00:00
|
|
|
alpha.enable = true;
|
2023-02-03 07:36:08 +00:00
|
|
|
};
|
2023-02-03 21:20:20 +00:00
|
|
|
vim.notify = {
|
|
|
|
nvim-notify.enable = true;
|
|
|
|
};
|
2023-02-03 22:45:31 +00:00
|
|
|
vim.utility = {
|
|
|
|
colorizer.enable = true;
|
2023-02-05 20:57:19 +00:00
|
|
|
icon-picker.enable = true;
|
2023-02-05 22:09:12 +00:00
|
|
|
venn-nvim.enable = false; # FIXME throws an error when its commands are ran manually
|
|
|
|
};
|
|
|
|
|
|
|
|
vim.notes = {
|
|
|
|
obsidian.enable = false; # FIXME neovim fails to build if obsidian is enabled
|
|
|
|
orgmode.enable = true;
|
2023-02-03 22:45:31 +00:00
|
|
|
};
|
2023-02-01 20:59:35 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
nixConfig = mainConfig false;
|
|
|
|
maximalConfig = mainConfig true;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
lib = {
|
|
|
|
nvim = (import ./modules/lib/stdlib-extended.nix nixpkgs.lib).nvim;
|
|
|
|
inherit neovimConfiguration;
|
|
|
|
};
|
|
|
|
|
|
|
|
overlays.default = final: prev: {
|
|
|
|
inherit neovimConfiguration;
|
|
|
|
neovim-nix = buildPkg prev [nixConfig];
|
|
|
|
neovim-maximal = buildPkg prev [maximalConfig];
|
|
|
|
neovim-tidal = buildPkg prev [tidalConfig];
|
|
|
|
};
|
|
|
|
}
|
|
|
|
// (flake-utils.lib.eachDefaultSystem (system: let
|
|
|
|
pkgs = import nixpkgs {
|
|
|
|
inherit system;
|
|
|
|
overlays = [
|
|
|
|
inputs.tidalcycles.overlays.default
|
|
|
|
(final: prev: {
|
|
|
|
rnix-lsp = inputs.rnix-lsp.defaultPackage.${system};
|
|
|
|
nil = inputs.nil.packages.${system}.default;
|
|
|
|
})
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
docs = import ./docs {
|
|
|
|
inherit pkgs;
|
|
|
|
nmdSrc = inputs.nmd;
|
|
|
|
};
|
|
|
|
|
|
|
|
tidalPkg = buildPkg pkgs [tidalConfig];
|
|
|
|
nixPkg = buildPkg pkgs [nixConfig];
|
|
|
|
maximalPkg = buildPkg pkgs [maximalConfig];
|
|
|
|
in {
|
|
|
|
apps =
|
|
|
|
rec {
|
|
|
|
nix = {
|
|
|
|
type = "app";
|
|
|
|
program = nvimBin nixPkg;
|
|
|
|
};
|
|
|
|
maximal = {
|
|
|
|
type = "app";
|
|
|
|
program = nvimBin maximalPkg;
|
|
|
|
};
|
|
|
|
default = nix;
|
|
|
|
}
|
|
|
|
// (
|
|
|
|
if !(builtins.elem system ["aarch64-darwin" "x86_64-darwin"])
|
|
|
|
then {
|
|
|
|
tidal = {
|
|
|
|
type = "app";
|
|
|
|
program = nvimBin tidalPkg;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
else {}
|
|
|
|
);
|
|
|
|
|
|
|
|
devShells.default = pkgs.mkShell {nativeBuildInputs = [nixPkg];};
|
|
|
|
|
|
|
|
packages =
|
|
|
|
{
|
|
|
|
docs-html = docs.manual.html;
|
|
|
|
docs-manpages = docs.manPages;
|
|
|
|
docs-json = docs.options.json;
|
|
|
|
default = nixPkg;
|
|
|
|
nix = nixPkg;
|
|
|
|
maximal = maximalPkg;
|
|
|
|
}
|
|
|
|
// (
|
|
|
|
if !(builtins.elem system ["aarch64-darwin" "x86_64-darwin"])
|
|
|
|
then {
|
|
|
|
tidal = tidalPkg;
|
|
|
|
}
|
|
|
|
else {}
|
|
|
|
);
|
|
|
|
}));
|
2023-02-01 19:11:37 +00:00
|
|
|
inputs = {
|
|
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
|
|
|
flake-utils.url = "github:numtide/flake-utils";
|
2023-02-03 22:45:31 +00:00
|
|
|
|
2023-02-01 19:11:37 +00:00
|
|
|
# For generating documentation website
|
|
|
|
nmd = {
|
|
|
|
url = "gitlab:rycee/nmd";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
|
|
|
|
# LSP plugins
|
|
|
|
nvim-lspconfig = {
|
|
|
|
# url = "github:neovim/nvim-lspconfig?ref=v0.1.3";
|
|
|
|
# Use master for nil_ls
|
|
|
|
url = "github:neovim/nvim-lspconfig";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
lspsaga = {
|
|
|
|
url = "github:tami5/lspsaga.nvim";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
lspkind = {
|
|
|
|
url = "github:onsails/lspkind-nvim";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
trouble = {
|
|
|
|
url = "github:folke/trouble.nvim";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
nvim-treesitter-context = {
|
|
|
|
url = "github:lewis6991/nvim-treesitter-context";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
nvim-lightbulb = {
|
|
|
|
url = "github:kosayoda/nvim-lightbulb";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
|
|
|
|
nvim-code-action-menu = {
|
|
|
|
url = "github:weilbith/nvim-code-action-menu";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
lsp-signature = {
|
|
|
|
url = "github:ray-x/lsp_signature.nvim";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
null-ls = {
|
|
|
|
url = "github:jose-elias-alvarez/null-ls.nvim";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
sqls-nvim = {
|
|
|
|
url = "github:nanotee/sqls.nvim";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
rust-tools = {
|
|
|
|
url = "github:simrat39/rust-tools.nvim";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
|
|
|
|
# Copying/Registers
|
|
|
|
registers = {
|
|
|
|
url = "github:tversteeg/registers.nvim";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
nvim-neoclip = {
|
|
|
|
url = "github:AckslD/nvim-neoclip.lua";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
|
|
|
|
# Telescope
|
|
|
|
telescope = {
|
|
|
|
url = "github:nvim-telescope/telescope.nvim";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
|
|
|
|
# Langauge server (use master instead of nixpkgs)
|
|
|
|
rnix-lsp.url = "github:nix-community/rnix-lsp";
|
|
|
|
nil = {
|
|
|
|
url = "github:oxalica/nil";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
inputs.flake-utils.follows = "flake-utils";
|
|
|
|
};
|
|
|
|
|
|
|
|
# Filetrees
|
|
|
|
nvim-tree-lua = {
|
2023-02-03 07:36:08 +00:00
|
|
|
url = "github:nvim-tree/nvim-tree.lua";
|
2023-02-01 19:11:37 +00:00
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
|
|
|
|
# Tablines
|
|
|
|
nvim-bufferline-lua = {
|
|
|
|
url = "github:akinsho/nvim-bufferline.lua?ref=v3.0.1";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
|
|
|
|
# Statuslines
|
|
|
|
lualine = {
|
|
|
|
url = "github:hoob3rt/lualine.nvim";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
|
|
|
|
# Autocompletes
|
|
|
|
nvim-compe = {
|
|
|
|
url = "github:hrsh7th/nvim-compe";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
nvim-cmp = {
|
|
|
|
url = "github:hrsh7th/nvim-cmp";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
cmp-buffer = {
|
|
|
|
url = "github:hrsh7th/cmp-buffer";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
cmp-nvim-lsp = {
|
|
|
|
url = "github:hrsh7th/cmp-nvim-lsp";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
cmp-vsnip = {
|
|
|
|
url = "github:hrsh7th/cmp-vsnip";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
cmp-path = {
|
|
|
|
url = "github:hrsh7th/cmp-path";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
cmp-treesitter = {
|
|
|
|
url = "github:ray-x/cmp-treesitter";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
|
|
|
|
# snippets
|
|
|
|
vim-vsnip = {
|
|
|
|
url = "github:hrsh7th/vim-vsnip";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
|
2023-02-05 20:57:19 +00:00
|
|
|
# Presence
|
|
|
|
discord-nvim = {
|
|
|
|
url = "github:andweeb/presence.nvim";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
|
2023-02-01 19:11:37 +00:00
|
|
|
# Autopairs
|
|
|
|
nvim-autopairs = {
|
|
|
|
url = "github:windwp/nvim-autopairs";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
nvim-ts-autotag = {
|
|
|
|
url = "github:windwp/nvim-ts-autotag";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
|
|
|
|
# Commenting
|
|
|
|
kommentary = {
|
|
|
|
url = "github:b3nj5m1n/kommentary";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
todo-comments = {
|
|
|
|
url = "github:folke/todo-comments.nvim";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
|
|
|
|
# Buffer tools
|
|
|
|
bufdelete-nvim = {
|
|
|
|
url = "github:famiu/bufdelete.nvim";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
|
2023-02-03 07:36:08 +00:00
|
|
|
# Dashboard Utilities
|
|
|
|
dashboard-nvim = {
|
|
|
|
url = "github:glepnir/dashboard-nvim";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
|
|
|
|
alpha-nvim = {
|
|
|
|
url = "github:goolord/alpha-nvim";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
|
2023-02-01 19:11:37 +00:00
|
|
|
# Themes
|
|
|
|
tokyonight = {
|
|
|
|
url = "github:folke/tokyonight.nvim";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
|
|
|
|
onedark = {
|
|
|
|
url = "github:navarasu/onedark.nvim";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
|
|
|
|
catppuccin = {
|
|
|
|
url = "github:catppuccin/nvim";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
|
|
|
|
# Rust crates
|
|
|
|
crates-nvim = {
|
|
|
|
url = "github:Saecki/crates.nvim";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
|
|
|
|
# Visuals
|
|
|
|
nvim-cursorline = {
|
|
|
|
url = "github:yamatsum/nvim-cursorline";
|
|
|
|
flake = false;
|
|
|
|
};
|
2023-02-03 19:53:48 +00:00
|
|
|
|
|
|
|
scrollbar-nvim = {
|
|
|
|
url = "github:petertriho/nvim-scrollbar";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
|
2023-02-03 21:20:20 +00:00
|
|
|
cinnamon-nvim = {
|
|
|
|
url = "github:declancm/cinnamon.nvim";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
|
2023-02-05 13:14:25 +00:00
|
|
|
cellular-automaton = {
|
|
|
|
url = "github:Eandrju/cellular-automaton.nvim";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
|
2023-02-01 19:11:37 +00:00
|
|
|
indent-blankline = {
|
|
|
|
url = "github:lukas-reineke/indent-blankline.nvim";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
nvim-web-devicons = {
|
|
|
|
url = "github:kyazdani42/nvim-web-devicons";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
gitsigns-nvim = {
|
|
|
|
url = "github:lewis6991/gitsigns.nvim";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
|
|
|
|
# Key binding help
|
|
|
|
which-key = {
|
|
|
|
url = "github:folke/which-key.nvim";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
|
2023-02-03 22:45:31 +00:00
|
|
|
cheatsheet-nvim = {
|
|
|
|
url = "github:sudormrfbin/cheatsheet.nvim";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
|
2023-02-01 19:11:37 +00:00
|
|
|
# Markdown
|
|
|
|
glow-nvim = {
|
|
|
|
url = "github:ellisonleao/glow.nvim";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
|
|
|
|
# Tidal cycles
|
|
|
|
tidalcycles = {
|
|
|
|
url = "github:mitchmindtree/tidalcycles.nix";
|
|
|
|
inputs.vim-tidal-src.url = "github:tidalcycles/vim-tidal";
|
|
|
|
};
|
|
|
|
|
2023-02-01 20:59:35 +00:00
|
|
|
# Minimap
|
|
|
|
minimap-vim = {
|
|
|
|
url = "github:wfxr/minimap.vim";
|
|
|
|
flake = false;
|
2023-02-01 19:11:37 +00:00
|
|
|
};
|
2023-02-03 21:20:20 +00:00
|
|
|
|
|
|
|
codewindow-nvim = {
|
|
|
|
url = "github:gorbit99/codewindow.nvim";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
|
|
|
|
# Notifications
|
|
|
|
nvim-notify = {
|
|
|
|
url = "github:rcarriga/nvim-notify";
|
|
|
|
flake = false;
|
|
|
|
};
|
2023-02-03 22:45:31 +00:00
|
|
|
|
|
|
|
# Utilities
|
|
|
|
colorizer = {
|
|
|
|
url = "github:uga-rosa/ccc.nvim";
|
|
|
|
flake = false;
|
|
|
|
};
|
2023-02-03 23:12:41 +00:00
|
|
|
|
|
|
|
venn-nvim = {
|
|
|
|
url = "github:jbyuki/venn.nvim";
|
|
|
|
flake = false;
|
|
|
|
};
|
2023-02-05 20:57:19 +00:00
|
|
|
|
|
|
|
icon-picker-nvim = {
|
|
|
|
url = "github:ziontee113/icon-picker.nvim";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
|
2023-02-05 22:09:12 +00:00
|
|
|
# Note-taking
|
|
|
|
|
|
|
|
obsidian-nvim = {
|
|
|
|
url = "github:epwalsh/obsidian.nvim";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
|
|
|
|
orgmode-nvim = {
|
|
|
|
url = "github:nvim-orgmode/orgmode";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
|
2023-02-05 20:57:19 +00:00
|
|
|
# Dependencies
|
|
|
|
plenary-nvim = {
|
|
|
|
# (required by crates-nvim)
|
|
|
|
url = "github:nvim-lua/plenary.nvim";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
|
|
|
|
dressing-nvim = {
|
|
|
|
# (required by icon-picker-nvim)
|
|
|
|
url = "github:stevearc/dressing.nvim";
|
|
|
|
flake = false;
|
|
|
|
};
|
2023-02-05 22:09:12 +00:00
|
|
|
|
|
|
|
vim-markdown = {
|
|
|
|
# (required by obsidian-nvim)
|
|
|
|
url = "github:preservim/vim-markdown";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
|
|
|
|
tabular = {
|
|
|
|
# (required by vim-markdown)
|
|
|
|
url = "github:godlygeek/tabular";
|
|
|
|
flake = false;
|
|
|
|
};
|
2023-02-01 20:59:35 +00:00
|
|
|
};
|
2023-02-01 19:11:37 +00:00
|
|
|
}
|