mirror of
https://github.com/nix-community/nixvim.git
synced 2025-07-02 21:34:33 +02:00
treewide: Reformat with nixfmt
This commit is contained in:
parent
c6281260dc
commit
62f32bfc71
459 changed files with 28139 additions and 26377 deletions
|
@ -5,7 +5,8 @@
|
|||
config,
|
||||
...
|
||||
}:
|
||||
with lib; {
|
||||
with lib;
|
||||
{
|
||||
options.plugins.vim-matchup = {
|
||||
enable = mkEnableOption "vim-matchup";
|
||||
|
||||
|
@ -15,7 +16,7 @@ with lib; {
|
|||
enable = mkEnableOption "treesitter integration";
|
||||
disable =
|
||||
helpers.defaultNullOpts.mkNullable (types.listOf types.str) "[]"
|
||||
"Languages for each to disable this module";
|
||||
"Languages for each to disable this module";
|
||||
|
||||
disableVirtualText = helpers.defaultNullOpts.mkBool false ''
|
||||
Do not use virtual text to highlight the virtual end of a block, for languages without
|
||||
|
@ -34,36 +35,38 @@ with lib; {
|
|||
If matchParen is not enabled fallback to the standard vim matchparen.
|
||||
'';
|
||||
|
||||
singleton =
|
||||
helpers.defaultNullOpts.mkBool false
|
||||
"Whether to highlight known words even if there is no match";
|
||||
singleton = helpers.defaultNullOpts.mkBool false "Whether to highlight known words even if there is no match";
|
||||
|
||||
offscreen =
|
||||
helpers.defaultNullOpts.mkNullable
|
||||
(types.submodule {
|
||||
options = {
|
||||
method = helpers.defaultNullOpts.mkEnumFirstDefault ["status" "popup" "status_manual"] ''
|
||||
'status': Replace the status-line for off-screen matches.
|
||||
offscreen = helpers.defaultNullOpts.mkNullable (types.submodule {
|
||||
options = {
|
||||
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
|
||||
syntax-highlighted in the status line along with the line number (if line numbers
|
||||
are enabled). If the match is above the screen border, an additional Δ symbol will
|
||||
be shown to indicate that the matching line is really above the cursor line.
|
||||
If a match is off of the screen, the line belonging to that match will be displayed
|
||||
syntax-highlighted in the status line along with the line number (if line numbers
|
||||
are enabled). If the match is above the screen border, an additional Δ symbol will
|
||||
be shown to indicate that the matching line is really above the cursor line.
|
||||
|
||||
'popup': Show off-screen matches in a popup (vim) or floating (neovim) window.
|
||||
'popup': Show off-screen matches in a popup (vim) or floating (neovim) window.
|
||||
|
||||
'status_manual': Compute the string which would be displayed in the status-line or
|
||||
popup, but do not display it. The function MatchupStatusOffscreen() can be used to
|
||||
get the text.
|
||||
'';
|
||||
scrolloff = helpers.defaultNullOpts.mkBool false ''
|
||||
When enabled, off-screen matches will not be shown in the statusline while the
|
||||
cursor is at the screen edge (respects the value of 'scrolloff').
|
||||
This is intended to prevent flickering while scrolling with j and k.
|
||||
'';
|
||||
};
|
||||
})
|
||||
''{method = "status";}'' "Dictionary controlling the behavior with off-screen matches.";
|
||||
'status_manual': Compute the string which would be displayed in the status-line or
|
||||
popup, but do not display it. The function MatchupStatusOffscreen() can be used to
|
||||
get the text.
|
||||
'';
|
||||
scrolloff = helpers.defaultNullOpts.mkBool false ''
|
||||
When enabled, off-screen matches will not be shown in the statusline while the
|
||||
cursor is at the screen edge (respects the value of 'scrolloff').
|
||||
This is intended to prevent flickering while scrolling with j and k.
|
||||
'';
|
||||
};
|
||||
}) ''{method = "status";}'' "Dictionary controlling the behavior with off-screen matches.";
|
||||
|
||||
stopline = helpers.defaultNullOpts.mkInt 400 ''
|
||||
The number of lines to search in either direction while highlighting matches.
|
||||
|
@ -72,11 +75,11 @@ with lib; {
|
|||
|
||||
timeout =
|
||||
helpers.defaultNullOpts.mkInt 300
|
||||
"Adjust timeouts in milliseconds for matchparen highlighting";
|
||||
"Adjust timeouts in milliseconds for matchparen highlighting";
|
||||
|
||||
insertTimeout =
|
||||
helpers.defaultNullOpts.mkInt 60
|
||||
"Adjust timeouts in milliseconds for matchparen highlighting";
|
||||
"Adjust timeouts in milliseconds for matchparen highlighting";
|
||||
|
||||
deferred = {
|
||||
enable = helpers.defaultNullOpts.mkBool false ''
|
||||
|
@ -121,44 +124,59 @@ with lib; {
|
|||
enable = helpers.defaultNullOpts.mkBool true "Controls text objects";
|
||||
|
||||
linewiseOperators =
|
||||
helpers.defaultNullOpts.mkNullable (types.listOf types.str)
|
||||
''["d" "y"]'' "Modify the set of operators which may operate line-wise";
|
||||
helpers.defaultNullOpts.mkNullable (types.listOf types.str) ''["d" "y"]''
|
||||
"Modify the set of operators which may operate line-wise";
|
||||
};
|
||||
|
||||
enableSurround =
|
||||
helpers.defaultNullOpts.mkBool false
|
||||
"To enable the delete surrounding (ds%) and change surrounding (cs%) maps";
|
||||
enableSurround = helpers.defaultNullOpts.mkBool false "To enable the delete surrounding (ds%) and change surrounding (cs%) maps";
|
||||
|
||||
enableTransmute =
|
||||
helpers.defaultNullOpts.mkBool false "To enable the experimental transmute module";
|
||||
enableTransmute = helpers.defaultNullOpts.mkBool false "To enable the experimental transmute module";
|
||||
|
||||
delimStopline = helpers.defaultNullOpts.mkInt 1500 ''
|
||||
To configure the number of lines to search in either direction while using motions and text
|
||||
objects. Does not apply to match highlighting (see matchParenStopline instead)
|
||||
'';
|
||||
|
||||
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
|
||||
- 2: don't recognize anything in comments
|
||||
'';
|
||||
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
|
||||
- 2: don't recognize anything in comments
|
||||
'';
|
||||
};
|
||||
|
||||
# TODO introduced 2024-03-07: remove 2024-05-07
|
||||
imports = [
|
||||
(
|
||||
mkRenamedOptionModule
|
||||
["plugins" "vim-matchup" "matchParen" "deffered"]
|
||||
["plugins" "vim-matchup" "matchParen" "deferred"]
|
||||
(mkRenamedOptionModule
|
||||
[
|
||||
"plugins"
|
||||
"vim-matchup"
|
||||
"matchParen"
|
||||
"deffered"
|
||||
]
|
||||
[
|
||||
"plugins"
|
||||
"vim-matchup"
|
||||
"matchParen"
|
||||
"deferred"
|
||||
]
|
||||
)
|
||||
];
|
||||
|
||||
config = let
|
||||
cfg = config.plugins.vim-matchup;
|
||||
in
|
||||
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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue