mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-09-06 02:11:33 +00:00
treewide: begin restructuring the module tree
This commit is contained in:
parent
e1835f6c46
commit
7c730a78e5
254 changed files with 749 additions and 664 deletions
5
modules/plugins/autopairs/default.nix
Normal file
5
modules/plugins/autopairs/default.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
imports = [
|
||||
./nvim-autopairs
|
||||
];
|
||||
}
|
20
modules/plugins/autopairs/nvim-autopairs/config.nix
Normal file
20
modules/plugins/autopairs/nvim-autopairs/config.nix
Normal file
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (lib.strings) optionalString;
|
||||
inherit (lib.nvim.dag) entryAnywhere;
|
||||
inherit (lib.nvim.lua) toLuaObject;
|
||||
|
||||
cfg = config.vim.autopairs;
|
||||
in {
|
||||
config = mkIf cfg.enable {
|
||||
vim.startPlugins = ["nvim-autopairs"];
|
||||
|
||||
vim.luaConfigRC.autopairs = entryAnywhere ''
|
||||
require("nvim-autopairs").setup{}
|
||||
'';
|
||||
};
|
||||
}
|
6
modules/plugins/autopairs/nvim-autopairs/default.nix
Normal file
6
modules/plugins/autopairs/nvim-autopairs/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
imports = [
|
||||
./config.nix
|
||||
./nvim-autopairs.nix
|
||||
];
|
||||
}
|
21
modules/plugins/autopairs/nvim-autopairs/nvim-autopairs.nix
Normal file
21
modules/plugins/autopairs/nvim-autopairs/nvim-autopairs.nix
Normal file
|
@ -0,0 +1,21 @@
|
|||
{lib, ...}: let
|
||||
inherit (lib) mkRemovedOptionModule;
|
||||
inherit (lib.options) mkEnableOption mkOption;
|
||||
inherit (lib.types) enum;
|
||||
in {
|
||||
imports = [
|
||||
(mkRemovedOptionModule ["vim" "autopairs" "nvim-compe"] "nvim-compe is deprecated and no longer suported.")
|
||||
];
|
||||
|
||||
options.vim = {
|
||||
autopairs = {
|
||||
enable = mkEnableOption "autopairs" // {default = false;};
|
||||
|
||||
type = mkOption {
|
||||
type = enum ["nvim-autopairs"];
|
||||
default = "nvim-autopairs";
|
||||
description = "Set the autopairs type. Options: nvim-autopairs [nvim-autopairs]";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue