2023-02-06 18:57:35 +00:00
|
|
|
{lib}:
|
|
|
|
with lib; let
|
|
|
|
# Plugin must be same as input name from flake.nix
|
|
|
|
availablePlugins = [
|
|
|
|
# TODO: sort by category
|
|
|
|
"nvim-treesitter-context"
|
|
|
|
"gitsigns-nvim"
|
|
|
|
"plenary-nvim"
|
|
|
|
"nvim-lspconfig"
|
|
|
|
"nvim-treesitter"
|
|
|
|
"lspsaga"
|
|
|
|
"lspkind"
|
|
|
|
"nvim-lightbulb"
|
|
|
|
"lsp-signature"
|
|
|
|
"nvim-tree-lua"
|
|
|
|
"nvim-bufferline-lua"
|
|
|
|
"lualine"
|
|
|
|
"nvim-compe"
|
|
|
|
"nvim-autopairs"
|
|
|
|
"nvim-ts-autotag"
|
|
|
|
"nvim-web-devicons"
|
|
|
|
"tokyonight"
|
|
|
|
"bufdelete-nvim"
|
|
|
|
"nvim-cmp"
|
|
|
|
"cmp-nvim-lsp"
|
|
|
|
"cmp-buffer"
|
|
|
|
"cmp-vsnip"
|
|
|
|
"cmp-path"
|
|
|
|
"cmp-treesitter"
|
|
|
|
"crates-nvim"
|
|
|
|
"vim-vsnip"
|
|
|
|
"nvim-code-action-menu"
|
|
|
|
"trouble"
|
2023-10-21 10:35:39 +00:00
|
|
|
"none-ls"
|
2023-02-06 18:57:35 +00:00
|
|
|
"which-key"
|
|
|
|
"indent-blankline"
|
|
|
|
"nvim-cursorline"
|
|
|
|
"sqls-nvim"
|
|
|
|
"glow-nvim"
|
|
|
|
"telescope"
|
|
|
|
"rust-tools"
|
|
|
|
"onedark"
|
|
|
|
"catppuccin"
|
2023-04-17 23:01:45 +00:00
|
|
|
"dracula"
|
2023-10-20 22:19:29 +00:00
|
|
|
"oxocarbon"
|
2024-01-17 20:08:36 +00:00
|
|
|
"gruvbox"
|
2024-02-13 20:41:13 +00:00
|
|
|
"rose-pine"
|
2023-02-06 18:57:35 +00:00
|
|
|
"minimap-vim"
|
|
|
|
"dashboard-nvim"
|
|
|
|
"alpha-nvim"
|
|
|
|
"scrollbar-nvim"
|
|
|
|
"codewindow-nvim"
|
|
|
|
"nvim-notify"
|
|
|
|
"cinnamon-nvim"
|
|
|
|
"cheatsheet-nvim"
|
2023-06-04 06:41:10 +00:00
|
|
|
"ccc"
|
2023-02-06 18:57:35 +00:00
|
|
|
"cellular-automaton"
|
2024-01-05 16:24:02 +00:00
|
|
|
"neocord"
|
2023-02-06 18:57:35 +00:00
|
|
|
"icon-picker-nvim"
|
|
|
|
"dressing-nvim"
|
|
|
|
"orgmode-nvim"
|
|
|
|
"obsidian-nvim"
|
|
|
|
"vim-markdown"
|
|
|
|
"tabular"
|
|
|
|
"toggleterm-nvim"
|
|
|
|
"noice-nvim"
|
|
|
|
"nui-nvim"
|
|
|
|
"copilot-lua"
|
|
|
|
"tabnine-nvim"
|
|
|
|
"nvim-session-manager"
|
|
|
|
"gesture-nvim"
|
2023-02-16 20:32:46 +00:00
|
|
|
"comment-nvim"
|
|
|
|
"kommentary"
|
2023-02-16 20:57:56 +00:00
|
|
|
"mind-nvim"
|
2023-02-28 10:00:38 +00:00
|
|
|
"fidget-nvim"
|
2023-03-01 09:08:24 +00:00
|
|
|
"diffview-nvim"
|
2023-03-01 10:27:17 +00:00
|
|
|
"todo-comments"
|
2023-04-02 18:38:54 +00:00
|
|
|
"flutter-tools"
|
2023-06-25 12:09:12 +00:00
|
|
|
"flutter-tools-patched"
|
2023-03-09 10:28:02 +00:00
|
|
|
"hop-nvim"
|
2023-04-04 23:14:13 +00:00
|
|
|
"leap-nvim"
|
2023-04-04 20:33:36 +00:00
|
|
|
"modes-nvim"
|
2023-04-04 23:14:13 +00:00
|
|
|
"vim-repeat"
|
2023-04-05 13:59:08 +00:00
|
|
|
"smartcolumn"
|
2023-04-07 17:31:43 +00:00
|
|
|
"project-nvim"
|
2023-09-23 13:36:26 +00:00
|
|
|
"neodev-nvim"
|
2023-04-15 09:43:50 +00:00
|
|
|
"elixir-ls"
|
2023-04-15 19:51:13 +00:00
|
|
|
"elixir-tools"
|
2023-06-04 07:24:06 +00:00
|
|
|
"nvim-colorizer-lua"
|
2023-06-06 00:05:05 +00:00
|
|
|
"vim-illuminate"
|
2023-06-07 11:28:27 +00:00
|
|
|
"nvim-surround"
|
2023-05-04 15:41:11 +00:00
|
|
|
"nvim-dap"
|
|
|
|
"nvim-dap-ui"
|
2023-07-19 19:49:06 +00:00
|
|
|
"nvim-navic"
|
|
|
|
"nvim-navbuddy"
|
2023-07-24 13:51:24 +00:00
|
|
|
"copilot-cmp"
|
2023-07-30 16:54:43 +00:00
|
|
|
"lsp-lines"
|
2023-08-10 15:51:00 +00:00
|
|
|
"vim-dirtytalk"
|
2023-10-21 22:22:31 +00:00
|
|
|
"highlight-undo"
|
2023-10-26 12:03:58 +00:00
|
|
|
"nvim-docs-view"
|
2024-02-17 00:19:38 +00:00
|
|
|
"image-nvim"
|
2023-02-06 18:57:35 +00:00
|
|
|
];
|
|
|
|
# You can either use the name of the plugin or a package.
|
2023-07-21 13:30:03 +00:00
|
|
|
pluginType = with types;
|
|
|
|
nullOr (
|
|
|
|
either
|
|
|
|
package
|
|
|
|
(enum availablePlugins)
|
2023-04-04 20:33:36 +00:00
|
|
|
);
|
2023-07-18 19:21:36 +00:00
|
|
|
|
2023-07-21 13:30:03 +00:00
|
|
|
pluginsType = types.listOf pluginType;
|
|
|
|
|
2023-07-18 19:21:36 +00:00
|
|
|
extraPluginType = with types;
|
|
|
|
submodule {
|
|
|
|
options = {
|
|
|
|
package = mkOption {
|
2023-07-21 13:30:03 +00:00
|
|
|
type = pluginType;
|
2023-11-05 20:01:43 +00:00
|
|
|
description = "Plugin Package.";
|
2023-07-18 19:21:36 +00:00
|
|
|
};
|
2024-02-17 00:19:38 +00:00
|
|
|
|
2023-07-26 13:27:08 +00:00
|
|
|
after = mkOption {
|
2023-07-18 19:21:36 +00:00
|
|
|
type = listOf str;
|
|
|
|
default = [];
|
2023-07-26 13:27:34 +00:00
|
|
|
description = "Setup this plugin after the following ones.";
|
2023-07-18 19:21:36 +00:00
|
|
|
};
|
2024-02-17 00:19:38 +00:00
|
|
|
|
2023-07-18 19:21:36 +00:00
|
|
|
setup = mkOption {
|
|
|
|
type = lines;
|
|
|
|
default = "";
|
2023-07-26 13:27:34 +00:00
|
|
|
description = "Lua code to run during setup.";
|
|
|
|
example = "require('aerial').setup {}";
|
2023-07-18 19:21:36 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2023-02-06 18:57:35 +00:00
|
|
|
in {
|
2023-07-18 19:21:36 +00:00
|
|
|
inherit extraPluginType;
|
|
|
|
|
2023-02-06 18:57:35 +00:00
|
|
|
pluginsOpt = {
|
|
|
|
description,
|
|
|
|
default ? [],
|
|
|
|
}:
|
|
|
|
mkOption {
|
|
|
|
inherit description default;
|
|
|
|
type = pluginsType;
|
|
|
|
};
|
2024-01-02 23:54:49 +00:00
|
|
|
|
|
|
|
# opts is a attrset of options, example:
|
|
|
|
# ```
|
|
|
|
# mkPluginSetupOption "telescope" {
|
|
|
|
# file_ignore_patterns = mkOption {
|
|
|
|
# description = "...";
|
|
|
|
# type = types.listOf types.str;
|
|
|
|
# default = [];
|
|
|
|
# };
|
|
|
|
# layout_config.horizontal = mkOption {...};
|
|
|
|
# }
|
|
|
|
# ```
|
|
|
|
mkPluginSetupOption = pluginName: opts:
|
|
|
|
mkOption {
|
|
|
|
description = "Option table to pass into the setup function of " + pluginName;
|
|
|
|
default = {};
|
|
|
|
type = types.submodule {
|
|
|
|
freeformType = with types; attrsOf anything;
|
|
|
|
options = opts;
|
|
|
|
};
|
|
|
|
};
|
2023-02-06 18:57:35 +00:00
|
|
|
}
|