mirror of
https://github.com/nix-community/nixvim.git
synced 2025-08-09 04:15:14 +02:00
nvim-autopairs: package option
This commit is contained in:
parent
58d08b20df
commit
30dd9054e1
1 changed files with 7 additions and 1 deletions
|
@ -8,6 +8,12 @@ in
|
||||||
options.plugins.nvim-autopairs = {
|
options.plugins.nvim-autopairs = {
|
||||||
enable = mkEnableOption "Enable nvim-autopairs";
|
enable = mkEnableOption "Enable nvim-autopairs";
|
||||||
|
|
||||||
|
package = mkOption {
|
||||||
|
type = types.package;
|
||||||
|
default = pkgs.vimPlugins.nvim-autopairs;
|
||||||
|
description = "Plugin to use for nvim-autopairs";
|
||||||
|
};
|
||||||
|
|
||||||
pairs = mkOption {
|
pairs = mkOption {
|
||||||
type = types.nullOr (types.attrsOf types.str);
|
type = types.nullOr (types.attrsOf types.str);
|
||||||
default = null;
|
default = null;
|
||||||
|
@ -50,7 +56,7 @@ in
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
mkIf cfg.enable {
|
mkIf cfg.enable {
|
||||||
extraPlugins = [ pkgs.vimPlugins.nvim-autopairs ];
|
extraPlugins = [ cfg.package ];
|
||||||
|
|
||||||
extraConfigLua = ''
|
extraConfigLua = ''
|
||||||
require('nvim-autopairs').setup(${helpers.toLuaObject options})
|
require('nvim-autopairs').setup(${helpers.toLuaObject options})
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue