This commit is contained in:
Pedro Alves 2023-02-20 10:43:13 +00:00
parent 8798a622cf
commit 3e73b2900c

View file

@ -1,12 +1,12 @@
{ pkgs
, config
, lib
, ...
{
pkgs,
config,
lib,
...
} @ args:
with lib; let
helpers = import ../helpers.nix args;
in
{
in {
options.plugins.vim-matchup = {
enable = mkEnableOption "Enable vim-matchup";
@ -43,7 +43,7 @@ in
helpers.defaultNullOpts.mkNullable
(types.submodule {
options = {
method = helpers.defaultNullOpts.mkEnumFirstDefault [ "status" "popup" "status_manual" ] ''
method = helpers.defaultNullOpts.mkEnumFirstDefault ["status" "popup" "status_manual"] ''
'status': Replace the status-line for off-screen matches.
If a match is off of the screen, the line belonging to that match will be displayed
@ -138,7 +138,7 @@ in
objects. Does not apply to match highlighting (see matchParenStopline instead)
'';
delimNoSkips = helpers.defaultNullOpts.mkNullable (types.enum [ 0 1 2 ]) "0" ''
delimNoSkips = helpers.defaultNullOpts.mkNullable (types.enum [0 1 2]) "0" ''
To disable matching within strings and comments:
- 0: matching is enabled within strings and comments
- 1: recognize symbols within comments
@ -146,12 +146,11 @@ in
'';
};
config =
let
config = let
cfg = config.plugins.vim-matchup;
in
mkIf cfg.enable {
extraPlugins = [ cfg.package ];
extraPlugins = [cfg.package];
plugins.treesitter.moduleConfig.matchup = mkIf cfg.treesitterIntegration.enable {
inherit (cfg.treesitterIntegration) enable disable;