mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-22 00:48:58 +02:00
plugins/utils: normalize plugin defaults
This commit is contained in:
parent
b10a391bd0
commit
6ab2a39e6a
53 changed files with 1434 additions and 1221 deletions
|
@ -100,7 +100,6 @@ helpers.neovim-plugin.mkNeovimPlugin config {
|
||||||
|
|
||||||
window =
|
window =
|
||||||
helpers.defaultNullOpts.mkAttrsOf types.anything
|
helpers.defaultNullOpts.mkAttrsOf types.anything
|
||||||
''
|
|
||||||
{
|
{
|
||||||
relative = "editor";
|
relative = "editor";
|
||||||
width = "auto";
|
width = "auto";
|
||||||
|
@ -110,7 +109,6 @@ helpers.neovim-plugin.mkNeovimPlugin config {
|
||||||
style = "minimal";
|
style = "minimal";
|
||||||
border = "single";
|
border = "single";
|
||||||
}
|
}
|
||||||
''
|
|
||||||
''
|
''
|
||||||
Controls the appearance and position of an arrow window.
|
Controls the appearance and position of an arrow window.
|
||||||
See `:h nvim_open_win()` for all options.
|
See `:h nvim_open_win()` for all options.
|
||||||
|
@ -161,7 +159,7 @@ helpers.neovim-plugin.mkNeovimPlugin config {
|
||||||
Keys mapped to bookmark index.
|
Keys mapped to bookmark index.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
full_path_list = helpers.defaultNullOpts.mkListOf types.str ''[ "update_stuff" ]'' ''
|
full_path_list = helpers.defaultNullOpts.mkListOf types.str [ "update_stuff" ] ''
|
||||||
Filenames on this list will ALWAYS show the file path too
|
Filenames on this list will ALWAYS show the file path too
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
|
@ -31,16 +31,14 @@ in
|
||||||
|
|
||||||
executionMessage = {
|
executionMessage = {
|
||||||
message =
|
message =
|
||||||
helpers.defaultNullOpts.mkNullable (with types; either str helpers.nixvimTypes.rawLua)
|
helpers.defaultNullOpts.mkStr
|
||||||
''
|
|
||||||
{
|
{
|
||||||
__raw = \'\'
|
__raw = ''
|
||||||
function()
|
function()
|
||||||
return ("AutoSave: saved at " .. vim.fn.strftime("%H:%M:%S"))
|
return ("AutoSave: saved at " .. vim.fn.strftime("%H:%M:%S"))
|
||||||
end
|
end
|
||||||
\'\';
|
'';
|
||||||
}
|
}
|
||||||
''
|
|
||||||
''
|
''
|
||||||
The message to print en save.
|
The message to print en save.
|
||||||
This can be a lua function that returns a string.
|
This can be a lua function that returns a string.
|
||||||
|
@ -48,7 +46,7 @@ in
|
||||||
|
|
||||||
dim = helpers.defaultNullOpts.mkNullable (types.numbers.between 0
|
dim = helpers.defaultNullOpts.mkNullable (types.numbers.between 0
|
||||||
1
|
1
|
||||||
) "0.18" "Dim the color of `message`.";
|
) 0.18 "Dim the color of `message`.";
|
||||||
|
|
||||||
cleaningInterval = helpers.defaultNullOpts.mkInt 1250 ''
|
cleaningInterval = helpers.defaultNullOpts.mkInt 1250 ''
|
||||||
Time (in milliseconds) to wait before automatically cleaning MsgArea after displaying
|
Time (in milliseconds) to wait before automatically cleaning MsgArea after displaying
|
||||||
|
@ -58,7 +56,11 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
triggerEvents =
|
triggerEvents =
|
||||||
helpers.defaultNullOpts.mkNullable (with types; listOf str) ''["InsertLeave" "TextChanged"]''
|
helpers.defaultNullOpts.mkListOf types.str
|
||||||
|
[
|
||||||
|
"InsertLeave"
|
||||||
|
"TextChanged"
|
||||||
|
]
|
||||||
''
|
''
|
||||||
Vim events that trigger auto-save.
|
Vim events that trigger auto-save.
|
||||||
See `:h events`.
|
See `:h events`.
|
||||||
|
|
|
@ -31,10 +31,7 @@ in
|
||||||
Whether to enable the "last session" feature.
|
Whether to enable the "last session" feature.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
rootDir =
|
rootDir = helpers.defaultNullOpts.mkStr { __raw = "vim.fn.stdpath 'data' .. '/sessions/'"; } ''
|
||||||
helpers.defaultNullOpts.mkNullable (with types; either str helpers.nixvimTypes.rawLua)
|
|
||||||
"{__raw = \"vim.fn.stdpath 'data' .. '/sessions/'\";}"
|
|
||||||
''
|
|
||||||
Root directory for session files.
|
Root directory for session files.
|
||||||
Can be either a string or lua code (using `{__raw = 'foo';}`).
|
Can be either a string or lua code (using `{__raw = 'foo';}`).
|
||||||
'';
|
'';
|
||||||
|
@ -91,7 +88,7 @@ in
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
"false"
|
false
|
||||||
''
|
''
|
||||||
Config for handling the DirChangePre and DirChanged autocmds.
|
Config for handling the DirChangePre and DirChanged autocmds.
|
||||||
Set to `false` to disable the feature.
|
Set to `false` to disable the feature.
|
||||||
|
@ -108,9 +105,10 @@ in
|
||||||
`require("auto-session").setup_session_lens()` if they want to use session-lens.
|
`require("auto-session").setup_session_lens()` if they want to use session-lens.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
themeConf =
|
themeConf = helpers.defaultNullOpts.mkAttrsOf types.anything {
|
||||||
helpers.defaultNullOpts.mkNullable types.attrs "{winblend = 10; border = true;}"
|
winblend = 10;
|
||||||
"Theme configuration.";
|
border = true;
|
||||||
|
} "Theme configuration.";
|
||||||
|
|
||||||
previewer = helpers.defaultNullOpts.mkBool false ''
|
previewer = helpers.defaultNullOpts.mkBool false ''
|
||||||
Use default previewer config by setting the value to `null` if some sets previewer to
|
Use default previewer config by setting the value to `null` if some sets previewer to
|
||||||
|
@ -123,8 +121,7 @@ in
|
||||||
|
|
||||||
sessionControl = {
|
sessionControl = {
|
||||||
controlDir =
|
controlDir =
|
||||||
helpers.defaultNullOpts.mkNullable (with types; either str helpers.nixvimTypes.rawLua)
|
helpers.defaultNullOpts.mkStr { __raw = "vim.fn.stdpath 'data' .. '/auto_session/'"; }
|
||||||
"\"vim.fn.stdpath 'data' .. '/auto_session/'\""
|
|
||||||
''
|
''
|
||||||
Auto session control dir, for control files, like alternating between two sessions
|
Auto session control dir, for control files, like alternating between two sessions
|
||||||
with session-lens.
|
with session-lens.
|
||||||
|
|
|
@ -35,7 +35,7 @@ in
|
||||||
'';
|
'';
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
disabledFiletypes = helpers.defaultNullOpts.mkListOf types.str ''["text"]'' ''
|
disabledFiletypes = helpers.defaultNullOpts.mkListOf types.str [ "text" ] ''
|
||||||
The plugin will be disabled under the filetypes in this table.
|
The plugin will be disabled under the filetypes in this table.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
|
|
@ -153,14 +153,14 @@ helpers.neovim-plugin.mkNeovimPlugin config {
|
||||||
Whether to enable automatically on `BufEnter`.
|
Whether to enable automatically on `BufEnter`.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
filetypes = helpers.defaultNullOpts.mkListOf types.str "[]" ''
|
filetypes = helpers.defaultNullOpts.mkListOf types.str [ ] ''
|
||||||
File types for which highlighting is enabled.
|
File types for which highlighting is enabled.
|
||||||
It is only used for automatic highlighting by `ccc-option-highlighter-auto-enable`, and is
|
It is only used for automatic highlighting by `ccc-option-highlighter-auto-enable`, and is
|
||||||
ignored for manual activation.
|
ignored for manual activation.
|
||||||
An empty table means all file types.
|
An empty table means all file types.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
excludes = helpers.defaultNullOpts.mkListOf types.str "[]" ''
|
excludes = helpers.defaultNullOpts.mkListOf types.str [ ] ''
|
||||||
Used only when `ccc-option-highlighter-filetypes` is empty table.
|
Used only when `ccc-option-highlighter-filetypes` is empty table.
|
||||||
You can specify file types to be excludes.
|
You can specify file types to be excludes.
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -37,7 +37,9 @@ let
|
||||||
]
|
]
|
||||||
) "img" "Dir that will be inserted into text/buffer.";
|
) "img" "Dir that will be inserted into text/buffer.";
|
||||||
|
|
||||||
imgName = helpers.defaultNullOpts.mkStr ''{__raw = "function() return os.date('%Y-%m-%d-%H-%M-%S') end";}'' "Image's name.";
|
imgName = helpers.defaultNullOpts.mkStr {
|
||||||
|
__raw = "function() return os.date('%Y-%m-%d-%H-%M-%S') end";
|
||||||
|
} "Image's name.";
|
||||||
|
|
||||||
imgHandler = helpers.defaultNullOpts.mkLuaFn "function(img) end" ''
|
imgHandler = helpers.defaultNullOpts.mkLuaFn "function(img) end" ''
|
||||||
Function that will handle image after pasted.
|
Function that will handle image after pasted.
|
||||||
|
|
|
@ -64,7 +64,6 @@ helpers.neovim-plugin.mkNeovimPlugin config {
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
''
|
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -73,7 +72,6 @@ helpers.neovim-plugin.mkNeovimPlugin config {
|
||||||
replace = null;
|
replace = null;
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
''
|
|
||||||
''
|
''
|
||||||
List of pattern configurations.
|
List of pattern configurations.
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -203,12 +203,10 @@ helpers.neovim-plugin.mkNeovimPlugin config {
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
''
|
|
||||||
{
|
{
|
||||||
basic = true;
|
basic = true;
|
||||||
extra = true;
|
extra = true;
|
||||||
}
|
}
|
||||||
''
|
|
||||||
''
|
''
|
||||||
Enables keybindings.
|
Enables keybindings.
|
||||||
NOTE: If given 'false', then the plugin won't create any mappings.
|
NOTE: If given 'false', then the plugin won't create any mappings.
|
||||||
|
|
|
@ -41,7 +41,7 @@ helpers.neovim-plugin.mkNeovimPlugin config {
|
||||||
type = str;
|
type = str;
|
||||||
description = "Command to execute";
|
description = "Command to execute";
|
||||||
};
|
};
|
||||||
args = helpers.defaultNullOpts.mkListOf types.str "[]" ''
|
args = helpers.defaultNullOpts.mkListOf types.str [ ] ''
|
||||||
Arguments to the command.
|
Arguments to the command.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
@ -66,7 +66,7 @@ helpers.neovim-plugin.mkNeovimPlugin config {
|
||||||
type = str;
|
type = str;
|
||||||
description = "Command to execute.";
|
description = "Command to execute.";
|
||||||
};
|
};
|
||||||
args = helpers.defaultNullOpts.mkListOf types.str "[]" ''
|
args = helpers.defaultNullOpts.mkListOf types.str [ ] ''
|
||||||
Arguments to the command.
|
Arguments to the command.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
|
@ -81,53 +81,53 @@ in
|
||||||
commands = helpers.defaultNullOpts.mkBool true "If true, create commands.";
|
commands = helpers.defaultNullOpts.mkBool true "If true, create commands.";
|
||||||
|
|
||||||
highlights = {
|
highlights = {
|
||||||
covered =
|
covered = helpers.defaultNullOpts.mkAttributeSet {
|
||||||
helpers.defaultNullOpts.mkNullable types.attrs ''{fg = "#B7F071";}''
|
fg = "#B7F071";
|
||||||
"Highlight group for covered signs.";
|
} "Highlight group for covered signs.";
|
||||||
|
|
||||||
uncovered =
|
uncovered = helpers.defaultNullOpts.mkAttributeSet {
|
||||||
helpers.defaultNullOpts.mkNullable types.attrs ''{fg = "#F07178";}''
|
fg = "#F07178";
|
||||||
"Highlight group for uncovered signs.";
|
} "Highlight group for uncovered signs.";
|
||||||
|
|
||||||
partial =
|
partial = helpers.defaultNullOpts.mkAttributeSet {
|
||||||
helpers.defaultNullOpts.mkNullable types.attrs ''{fg = "#AA71F0";}''
|
fg = "#AA71F0";
|
||||||
"Highlight group for partial coverage signs.";
|
} "Highlight group for partial coverage signs.";
|
||||||
|
|
||||||
summaryBorder =
|
summaryBorder = helpers.defaultNullOpts.mkAttributeSet {
|
||||||
helpers.defaultNullOpts.mkNullable types.attrs ''{link = "FloatBorder";}''
|
link = "FloatBorder";
|
||||||
"Border highlight group of the summary pop-up.";
|
} "Border highlight group of the summary pop-up.";
|
||||||
|
|
||||||
summaryNormal =
|
summaryNormal = helpers.defaultNullOpts.mkAttributeSet {
|
||||||
helpers.defaultNullOpts.mkNullable types.attrs ''{link = "NormalFloat";}''
|
link = "NormalFloat";
|
||||||
"Normal text highlight group of the summary pop-up.";
|
} "Normal text highlight group of the summary pop-up.";
|
||||||
|
|
||||||
summaryCursorLine =
|
summaryCursorLine = helpers.defaultNullOpts.mkAttributeSet {
|
||||||
helpers.defaultNullOpts.mkNullable types.attrs ''{link = "CursorLine";}''
|
link = "CursorLine";
|
||||||
"Cursor line highlight group of the summary pop-up.";
|
} "Cursor line highlight group of the summary pop-up.";
|
||||||
|
|
||||||
summaryHeader =
|
summaryHeader = helpers.defaultNullOpts.mkAttributeSet {
|
||||||
helpers.defaultNullOpts.mkNullable types.attrs ''{ style = "bold,underline"; sp = "bg"; }''
|
style = "bold,underline";
|
||||||
"Header text highlight group of the summary pop-up.";
|
sp = "bg";
|
||||||
|
} "Header text highlight group of the summary pop-up.";
|
||||||
|
|
||||||
summaryPass =
|
summaryPass = helpers.defaultNullOpts.mkAttributeSet {
|
||||||
helpers.defaultNullOpts.mkNullable types.attrs ''{link = "CoverageCovered";}''
|
link = "CoverageCovered";
|
||||||
"Pass text highlight group of the summary pop-up.";
|
} "Pass text highlight group of the summary pop-up.";
|
||||||
|
|
||||||
summaryFail =
|
summaryFail = helpers.defaultNullOpts.mkAttributeSet {
|
||||||
helpers.defaultNullOpts.mkNullable types.attrs ''{link = "CoverageUncovered";}''
|
link = "CoverageUncovered";
|
||||||
"Fail text highlight group of the summary pop-up.";
|
} "Fail text highlight group of the summary pop-up.";
|
||||||
};
|
};
|
||||||
|
|
||||||
loadCoverageCb = helpers.defaultNullOpts.mkLuaFn "nil" ''
|
loadCoverageCb = helpers.defaultNullOpts.mkLuaFn' {
|
||||||
A lua function that will be called when a coverage file is loaded.
|
description = "A lua function that will be called when a coverage file is loaded.";
|
||||||
|
pluginDefault = "nil";
|
||||||
Example:
|
example = ''
|
||||||
```
|
|
||||||
function(ftype)
|
function(ftype)
|
||||||
vim.notify("Loaded " .. ftype .. " coverage")
|
vim.notify("Loaded " .. ftype .. " coverage")
|
||||||
end
|
end
|
||||||
```
|
|
||||||
'';
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
signs =
|
signs =
|
||||||
mapAttrs
|
mapAttrs
|
||||||
|
@ -173,11 +173,11 @@ in
|
||||||
summary = {
|
summary = {
|
||||||
widthPercentage = helpers.defaultNullOpts.mkNullable (types.numbers.between 0.0
|
widthPercentage = helpers.defaultNullOpts.mkNullable (types.numbers.between 0.0
|
||||||
1.0
|
1.0
|
||||||
) "0.70" "Width of the pop-up window.";
|
) 0.7 "Width of the pop-up window.";
|
||||||
|
|
||||||
heightPercentage = helpers.defaultNullOpts.mkNullable (types.numbers.between 0.0
|
heightPercentage = helpers.defaultNullOpts.mkNullable (types.numbers.between 0.0
|
||||||
1.0
|
1.0
|
||||||
) "0.50" "Height of the pop-up window.";
|
) 0.5 "Height of the pop-up window.";
|
||||||
|
|
||||||
borders = mapAttrs (optionName: default: helpers.defaultNullOpts.mkStr default "") {
|
borders = mapAttrs (optionName: default: helpers.defaultNullOpts.mkStr default "") {
|
||||||
topleft = "╭";
|
topleft = "╭";
|
||||||
|
@ -191,21 +191,22 @@ in
|
||||||
highlight = "Normal:CoverageSummaryBorder";
|
highlight = "Normal:CoverageSummaryBorder";
|
||||||
};
|
};
|
||||||
|
|
||||||
minCoverage = helpers.defaultNullOpts.mkNullable (types.numbers.between 0 100) "80" ''
|
minCoverage = helpers.defaultNullOpts.mkNullable (types.numbers.between 0 100) 80 ''
|
||||||
Minimum coverage percentage.
|
Minimum coverage percentage.
|
||||||
Values below this are highlighted with the fail group, values above are highlighted with
|
Values below this are highlighted with the fail group, values above are highlighted with
|
||||||
the pass group.
|
the pass group.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
lang = helpers.defaultNullOpts.mkNullable types.attrs "see upstream documentation" ''
|
lang = helpers.defaultNullOpts.mkAttributeSet' {
|
||||||
|
description = ''
|
||||||
Each key corresponds with the `filetype` of the language and maps to an attrs of
|
Each key corresponds with the `filetype` of the language and maps to an attrs of
|
||||||
configuration values that differ.
|
configuration values that differ.
|
||||||
See plugin documentation for language specific options.
|
|
||||||
|
|
||||||
Example:
|
See plugin documentation for language specific options.
|
||||||
```nix
|
'';
|
||||||
{
|
|
||||||
|
example = {
|
||||||
python = {
|
python = {
|
||||||
coverage_file = ".coverage";
|
coverage_file = ".coverage";
|
||||||
coverage_command = "coverage json --fail-under=0 -q -o -";
|
coverage_command = "coverage json --fail-under=0 -q -o -";
|
||||||
|
@ -213,9 +214,8 @@ in
|
||||||
ruby = {
|
ruby = {
|
||||||
coverage_file = "coverage/coverage.json";
|
coverage_file = "coverage/coverage.json";
|
||||||
};
|
};
|
||||||
}
|
};
|
||||||
```
|
};
|
||||||
'';
|
|
||||||
|
|
||||||
lcovFile = helpers.mkNullOrOption types.str "File that the plugin will try to read lcov coverage from.";
|
lcovFile = helpers.mkNullOrOption types.str "File that the plugin will try to read lcov coverage from.";
|
||||||
};
|
};
|
||||||
|
|
|
@ -27,9 +27,9 @@ in
|
||||||
|
|
||||||
minLength = helpers.defaultNullOpts.mkInt 3 "Minimum length for underlined words.";
|
minLength = helpers.defaultNullOpts.mkInt 3 "Minimum length for underlined words.";
|
||||||
|
|
||||||
hl =
|
hl = helpers.defaultNullOpts.mkAttrsOf types.anything {
|
||||||
helpers.defaultNullOpts.mkNullable types.attrs "{underline = true;}"
|
underline = true;
|
||||||
"Highliht definition map for cursorword highlighting.";
|
} "Highliht definition map for cursorword highlighting.";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -64,7 +64,7 @@ helpers.neovim-plugin.mkNeovimPlugin config {
|
||||||
If 'editor' or 'win', will default to being centered.
|
If 'editor' or 'win', will default to being centered.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
prefer_width = helpers.defaultNullOpts.mkNullable intOrRatio "40" ''
|
prefer_width = helpers.defaultNullOpts.mkNullable intOrRatio 40 ''
|
||||||
Can be an integer or a float between 0 and 1 (e.g. 0.4 for 40%).
|
Can be an integer or a float between 0 and 1 (e.g. 0.4 for 40%).
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
@ -73,7 +73,11 @@ helpers.neovim-plugin.mkNeovimPlugin config {
|
||||||
'';
|
'';
|
||||||
|
|
||||||
max_width =
|
max_width =
|
||||||
helpers.defaultNullOpts.mkNullable (with types; either intOrRatio (listOf intOrRatio)) "[140 0.9]"
|
helpers.defaultNullOpts.mkNullable (with types; either intOrRatio (listOf intOrRatio))
|
||||||
|
[
|
||||||
|
140
|
||||||
|
0.9
|
||||||
|
]
|
||||||
''
|
''
|
||||||
Max width of window.
|
Max width of window.
|
||||||
|
|
||||||
|
@ -82,7 +86,11 @@ helpers.neovim-plugin.mkNeovimPlugin config {
|
||||||
'';
|
'';
|
||||||
|
|
||||||
min_width =
|
min_width =
|
||||||
helpers.defaultNullOpts.mkNullable (with types; either intOrRatio (listOf intOrRatio)) "[20 0.2]"
|
helpers.defaultNullOpts.mkNullable (with types; either intOrRatio (listOf intOrRatio))
|
||||||
|
[
|
||||||
|
20
|
||||||
|
0.2
|
||||||
|
]
|
||||||
''
|
''
|
||||||
Min width of window.
|
Min width of window.
|
||||||
|
|
||||||
|
@ -90,22 +98,19 @@ helpers.neovim-plugin.mkNeovimPlugin config {
|
||||||
total."
|
total."
|
||||||
'';
|
'';
|
||||||
|
|
||||||
buf_options = helpers.defaultNullOpts.mkAttrsOf types.anything "{}" ''
|
buf_options = helpers.defaultNullOpts.mkAttrsOf types.anything { } ''
|
||||||
An attribute set of neovim buffer options.
|
An attribute set of neovim buffer options.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
win_options = helpers.defaultNullOpts.mkAttrsOf types.anything ''
|
win_options = helpers.defaultNullOpts.mkAttrsOf types.anything {
|
||||||
{
|
|
||||||
wrap = false;
|
wrap = false;
|
||||||
list = true;
|
list = true;
|
||||||
listchars = "precedes:...,extends:...";
|
listchars = "precedes:...,extends:...";
|
||||||
sidescrolloff = 0;
|
sidescrolloff = 0;
|
||||||
}
|
} "An attribute set of window options.";
|
||||||
'' "An attribute set of window options.";
|
|
||||||
|
|
||||||
mappings =
|
mappings =
|
||||||
helpers.defaultNullOpts.mkAttrsOf (with types; attrsOf (either str (enum [ false ])))
|
helpers.defaultNullOpts.mkAttrsOf (with types; attrsOf (either str (enum [ false ])))
|
||||||
''
|
|
||||||
{
|
{
|
||||||
n = {
|
n = {
|
||||||
"<Esc>" = "Close";
|
"<Esc>" = "Close";
|
||||||
|
@ -118,7 +123,6 @@ helpers.neovim-plugin.mkNeovimPlugin config {
|
||||||
"<Down>" = "HistoryNext";
|
"<Down>" = "HistoryNext";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
''
|
|
||||||
''
|
''
|
||||||
Mappings for defined modes.
|
Mappings for defined modes.
|
||||||
|
|
||||||
|
@ -144,9 +148,13 @@ helpers.neovim-plugin.mkNeovimPlugin config {
|
||||||
Enable the vim.ui.select implementation.
|
Enable the vim.ui.select implementation.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
backend = helpers.defaultNullOpts.mkListOf types.str ''
|
backend = helpers.defaultNullOpts.mkListOf types.str [
|
||||||
["telescope" "fzf_lua" "fzf" "builtin" "nui"]
|
"telescope"
|
||||||
'' "Priority list of preferred vim.select implementations. ";
|
"fzf_lua"
|
||||||
|
"fzf"
|
||||||
|
"builtin"
|
||||||
|
"nui"
|
||||||
|
] "Priority list of preferred vim.select implementations. ";
|
||||||
|
|
||||||
trim_prompt = helpers.defaultNullOpts.mkBool true ''
|
trim_prompt = helpers.defaultNullOpts.mkBool true ''
|
||||||
Trim trailing `:` from prompt.
|
Trim trailing `:` from prompt.
|
||||||
|
@ -165,20 +173,17 @@ helpers.neovim-plugin.mkNeovimPlugin config {
|
||||||
'';
|
'';
|
||||||
|
|
||||||
fzf = {
|
fzf = {
|
||||||
window = helpers.defaultNullOpts.mkAttrsOf types.anything ''
|
window = helpers.defaultNullOpts.mkAttrsOf types.anything {
|
||||||
{
|
|
||||||
width = 0.5;
|
width = 0.5;
|
||||||
height = 0.4;
|
height = 0.4;
|
||||||
}
|
} "Window options for fzf selector. ";
|
||||||
'' "Window options for fzf selector. ";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
fzf_lua = helpers.defaultNullOpts.mkAttrsOf types.anything "{}" ''
|
fzf_lua = helpers.defaultNullOpts.mkAttrsOf types.anything { } ''
|
||||||
Options for fzf-lua selector.
|
Options for fzf-lua selector.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
nui = helpers.defaultNullOpts.mkAttrsOf types.anything ''
|
nui = helpers.defaultNullOpts.mkAttrsOf types.anything {
|
||||||
{
|
|
||||||
position = "50%";
|
position = "50%";
|
||||||
size = null;
|
size = null;
|
||||||
relative = "editor";
|
relative = "editor";
|
||||||
|
@ -196,8 +201,7 @@ helpers.neovim-plugin.mkNeovimPlugin config {
|
||||||
max_height = 40;
|
max_height = 40;
|
||||||
min_width = 40;
|
min_width = 40;
|
||||||
min_height = 10;
|
min_height = 10;
|
||||||
}
|
} "Options for nui selector. ";
|
||||||
'' "Options for nui selector. ";
|
|
||||||
|
|
||||||
builtin = {
|
builtin = {
|
||||||
show_numbers = helpers.defaultNullOpts.mkBool true ''
|
show_numbers = helpers.defaultNullOpts.mkBool true ''
|
||||||
|
@ -218,23 +222,25 @@ helpers.neovim-plugin.mkNeovimPlugin config {
|
||||||
If 'editor' or 'win', will default to being centered.
|
If 'editor' or 'win', will default to being centered.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
buf_options = helpers.defaultNullOpts.mkAttrsOf types.anything "{}" ''
|
buf_options = helpers.defaultNullOpts.mkAttrsOf types.anything { } ''
|
||||||
An attribute set of buffer options.
|
An attribute set of buffer options.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
win_options = helpers.defaultNullOpts.mkAttrsOf types.anything ''
|
win_options = helpers.defaultNullOpts.mkAttrsOf types.anything {
|
||||||
{
|
|
||||||
cursorline = true;
|
cursorline = true;
|
||||||
cursorlineopt = "both";
|
cursorlineopt = "both";
|
||||||
}
|
} "An attribute set of window options.";
|
||||||
'' "An attribute set of window options.";
|
|
||||||
|
|
||||||
width = helpers.defaultNullOpts.mkNullable intOrRatio null ''
|
width = helpers.defaultNullOpts.mkNullable intOrRatio null ''
|
||||||
Can be an integer or a float between 0 and 1 (e.g. 0.4 for 40%).
|
Can be an integer or a float between 0 and 1 (e.g. 0.4 for 40%).
|
||||||
'';
|
'';
|
||||||
|
|
||||||
max_width =
|
max_width =
|
||||||
helpers.defaultNullOpts.mkNullable (with types; either intOrRatio (listOf intOrRatio)) "[140 0.8]"
|
helpers.defaultNullOpts.mkNullable (with types; either intOrRatio (listOf intOrRatio))
|
||||||
|
[
|
||||||
|
140
|
||||||
|
0.8
|
||||||
|
]
|
||||||
''
|
''
|
||||||
Max width of window.
|
Max width of window.
|
||||||
|
|
||||||
|
@ -243,7 +249,11 @@ helpers.neovim-plugin.mkNeovimPlugin config {
|
||||||
'';
|
'';
|
||||||
|
|
||||||
min_width =
|
min_width =
|
||||||
helpers.defaultNullOpts.mkNullable (with types; either intOrRatio (listOf intOrRatio)) "[40 0.2]"
|
helpers.defaultNullOpts.mkNullable (with types; either intOrRatio (listOf intOrRatio))
|
||||||
|
[
|
||||||
|
40
|
||||||
|
0.2
|
||||||
|
]
|
||||||
''
|
''
|
||||||
Min width of window.
|
Min width of window.
|
||||||
|
|
||||||
|
@ -256,7 +266,7 @@ helpers.neovim-plugin.mkNeovimPlugin config {
|
||||||
'';
|
'';
|
||||||
|
|
||||||
max_height =
|
max_height =
|
||||||
helpers.defaultNullOpts.mkNullable (with types; either intOrRatio (listOf intOrRatio)) "0.9"
|
helpers.defaultNullOpts.mkNullable (with types; either intOrRatio (listOf intOrRatio)) 0.9
|
||||||
''
|
''
|
||||||
Max height of window.
|
Max height of window.
|
||||||
|
|
||||||
|
@ -265,7 +275,11 @@ helpers.neovim-plugin.mkNeovimPlugin config {
|
||||||
'';
|
'';
|
||||||
|
|
||||||
min_height =
|
min_height =
|
||||||
helpers.defaultNullOpts.mkNullable (with types; either intOrRatio (listOf intOrRatio)) "[10 0.2]"
|
helpers.defaultNullOpts.mkNullable (with types; either intOrRatio (listOf intOrRatio))
|
||||||
|
[
|
||||||
|
10
|
||||||
|
0.2
|
||||||
|
]
|
||||||
''
|
''
|
||||||
Min height of window.
|
Min height of window.
|
||||||
|
|
||||||
|
@ -275,13 +289,11 @@ helpers.neovim-plugin.mkNeovimPlugin config {
|
||||||
|
|
||||||
mappings =
|
mappings =
|
||||||
helpers.defaultNullOpts.mkAttrsOf (with types; either str (enum [ false ]))
|
helpers.defaultNullOpts.mkAttrsOf (with types; either str (enum [ false ]))
|
||||||
''
|
|
||||||
{
|
{
|
||||||
"<Esc>" = "Close";
|
"<Esc>" = "Close";
|
||||||
"<C-c>" = "Close";
|
"<C-c>" = "Close";
|
||||||
"<CR>" = "Confirm";
|
"<CR>" = "Confirm";
|
||||||
}
|
}
|
||||||
''
|
|
||||||
''
|
''
|
||||||
Mappings in normal mode for the builtin selector.
|
Mappings in normal mode for the builtin selector.
|
||||||
|
|
||||||
|
@ -294,7 +306,7 @@ helpers.neovim-plugin.mkNeovimPlugin config {
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
format_item_override = helpers.defaultNullOpts.mkAttrsOf helpers.nixvimTypes.strLuaFn "{}" ''
|
format_item_override = helpers.defaultNullOpts.mkAttrsOf helpers.nixvimTypes.strLuaFn { } ''
|
||||||
Override the formatting/display for a specific "kind" when using vim.ui.select.
|
Override the formatting/display for a specific "kind" when using vim.ui.select.
|
||||||
For example, code actions from vim.lsp.buf.code_action use a kind="codeaction".
|
For example, code actions from vim.lsp.buf.code_action use a kind="codeaction".
|
||||||
You can override the format function when selecting for that kind, e.g.
|
You can override the format function when selecting for that kind, e.g.
|
||||||
|
|
|
@ -60,23 +60,20 @@ in
|
||||||
incremental = helpers.defaultNullOpts.mkBool false "behave like `incsearch`";
|
incremental = helpers.defaultNullOpts.mkBool false "behave like `incsearch`";
|
||||||
|
|
||||||
exclude =
|
exclude =
|
||||||
helpers.defaultNullOpts.mkNullable (with types; listOf (either str helpers.nixvimTypes.rawLua))
|
helpers.defaultNullOpts.mkListOf types.str
|
||||||
''
|
|
||||||
[
|
[
|
||||||
"notify"
|
"notify"
|
||||||
"cmp_menu"
|
"cmp_menu"
|
||||||
"noice"
|
"noice"
|
||||||
"flash_prompt"
|
"flash_prompt"
|
||||||
(
|
{
|
||||||
helpers.mkRaw
|
__raw = ''
|
||||||
'''
|
|
||||||
function(win)
|
function(win)
|
||||||
return not vim.api.nvim_win_get_config(win).focusable
|
return not vim.api.nvim_win_get_config(win).focusable
|
||||||
end
|
end
|
||||||
'''
|
'';
|
||||||
)
|
}
|
||||||
]
|
]
|
||||||
''
|
|
||||||
''
|
''
|
||||||
Excluded filetypes and custom window filters
|
Excluded filetypes and custom window filters
|
||||||
'';
|
'';
|
||||||
|
@ -87,7 +84,7 @@ in
|
||||||
'';
|
'';
|
||||||
|
|
||||||
maxLength =
|
maxLength =
|
||||||
helpers.defaultNullOpts.mkNullable (with types; either (enum [ false ]) types.int) "false"
|
helpers.defaultNullOpts.mkNullable (with types; either (enum [ false ]) types.int) false
|
||||||
''
|
''
|
||||||
max pattern length. If the pattern length is equal to this labels will no longer be
|
max pattern length. If the pattern length is equal to this labels will no longer be
|
||||||
skipped. When it exceeds this length it will either end in a jump or terminate the search
|
skipped. When it exceeds this length it will either end in a jump or terminate the search
|
||||||
|
@ -137,11 +134,11 @@ in
|
||||||
you can always jump to the first match with `<CR>`
|
you can always jump to the first match with `<CR>`
|
||||||
'';
|
'';
|
||||||
|
|
||||||
after = helpers.defaultNullOpts.mkNullable (with types; either bool (listOf int)) "true" ''
|
after = helpers.defaultNullOpts.mkNullable (with types; either bool (listOf int)) true ''
|
||||||
show the label after the match
|
show the label after the match
|
||||||
'';
|
'';
|
||||||
|
|
||||||
before = helpers.defaultNullOpts.mkNullable (with types; either bool (listOf int)) "false" ''
|
before = helpers.defaultNullOpts.mkNullable (with types; either bool (listOf int)) false ''
|
||||||
show the label before the match
|
show the label before the match
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
@ -185,7 +182,7 @@ in
|
||||||
Can be useful for visualizing Treesitter ranges.
|
Can be useful for visualizing Treesitter ranges.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
shade = helpers.defaultNullOpts.mkNullable (types.ints.between 1 9) "5" "";
|
shade = helpers.defaultNullOpts.mkNullable (types.ints.between 1 9) 5 "";
|
||||||
};
|
};
|
||||||
|
|
||||||
format =
|
format =
|
||||||
|
@ -245,19 +242,20 @@ in
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# Not sure what is the type...
|
# Not sure what is the type...
|
||||||
prefix = helpers.defaultNullOpts.mkNullable (types.listOf types.anything) ''
|
prefix = helpers.defaultNullOpts.mkListOf types.anything [
|
||||||
[ ["⚡" "FlashPromptIcon"] ]
|
[
|
||||||
'' "";
|
"⚡"
|
||||||
winConfig = helpers.defaultNullOpts.mkNullable (types.attrsOf types.anything) ''
|
"FlashPromptIcon"
|
||||||
{
|
]
|
||||||
|
] "";
|
||||||
|
winConfig = helpers.defaultNullOpts.mkAttrsOf types.anything {
|
||||||
relative = "editor";
|
relative = "editor";
|
||||||
width = 1;
|
width = 1;
|
||||||
height = 1;
|
height = 1;
|
||||||
row = -1;
|
row = -1;
|
||||||
col = 0;
|
col = 0;
|
||||||
zindex = 1000;
|
zindex = 1000;
|
||||||
}
|
} "See nvim_open_win for more details";
|
||||||
'' "See nvim_open_win for more details";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
remoteOp = {
|
remoteOp = {
|
||||||
|
@ -283,39 +281,47 @@ in
|
||||||
modes =
|
modes =
|
||||||
let
|
let
|
||||||
mkModeConfig =
|
mkModeConfig =
|
||||||
extra: default: desc:
|
{
|
||||||
|
extra ? { },
|
||||||
|
default,
|
||||||
|
description ? "",
|
||||||
|
}:
|
||||||
helpers.defaultNullOpts.mkNullable (types.submodule {
|
helpers.defaultNullOpts.mkNullable (types.submodule {
|
||||||
options = configOpts // extra;
|
options = configOpts // extra;
|
||||||
}) default desc;
|
}) default description;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
search =
|
search = mkModeConfig {
|
||||||
mkModeConfig
|
description = ''
|
||||||
{
|
options used when flash is activated through a regular search with `/` or `?`
|
||||||
|
'';
|
||||||
|
extra = {
|
||||||
enabled = helpers.defaultNullOpts.mkBool true ''
|
enabled = helpers.defaultNullOpts.mkBool true ''
|
||||||
when `true`, flash will be activated during regular search by default.
|
when `true`, flash will be activated during regular search by default.
|
||||||
You can always toggle when searching with `require("flash").toggle()`
|
You can always toggle when searching with `require("flash").toggle()`
|
||||||
'';
|
'';
|
||||||
}
|
};
|
||||||
''
|
default = {
|
||||||
{
|
|
||||||
enabled = true;
|
enabled = true;
|
||||||
highlight = { backdrop = false; };
|
highlight = {
|
||||||
jump = { history = true; register = true; nohlsearch = true; };
|
backdrop = false;
|
||||||
|
};
|
||||||
|
jump = {
|
||||||
|
history = true;
|
||||||
|
register = true;
|
||||||
|
nohlsearch = true;
|
||||||
|
};
|
||||||
/*
|
/*
|
||||||
forward will be automatically set to the search direction
|
forward will be automatically set to the search direction
|
||||||
mode is always set to 'search'
|
mode is always set to 'search'
|
||||||
incremental is set to 'true' when 'incsearch' is enabled
|
incremental is set to 'true' when 'incsearch' is enabled
|
||||||
*/
|
*/
|
||||||
search.automatic = true;
|
search.automatic = true;
|
||||||
}
|
};
|
||||||
''
|
};
|
||||||
''
|
char = mkModeConfig {
|
||||||
options used when flash is activated through a regular search with `/` or `?`
|
description = "options used when flash is activated through a regular search with `/` or `?`";
|
||||||
'';
|
extra = {
|
||||||
char =
|
|
||||||
mkModeConfig
|
|
||||||
{
|
|
||||||
enabled = helpers.defaultNullOpts.mkBool true "";
|
enabled = helpers.defaultNullOpts.mkBool true "";
|
||||||
|
|
||||||
autohide = helpers.defaultNullOpts.mkBool false ''
|
autohide = helpers.defaultNullOpts.mkBool false ''
|
||||||
|
@ -329,10 +335,16 @@ in
|
||||||
'';
|
'';
|
||||||
|
|
||||||
keys =
|
keys =
|
||||||
helpers.defaultNullOpts.mkNullable (types.attrsOf types.str)
|
helpers.defaultNullOpts.mkAttrsOf types.str
|
||||||
''
|
# FIXME can't show helper func in docs
|
||||||
helpers.listToUnkeyedAttrs [ "f" "F" "t" "T" ";" "," ]
|
(helpers.listToUnkeyedAttrs [
|
||||||
''
|
"f"
|
||||||
|
"F"
|
||||||
|
"t"
|
||||||
|
"T"
|
||||||
|
";"
|
||||||
|
","
|
||||||
|
])
|
||||||
''
|
''
|
||||||
by default all keymaps are enabled, but you can disable some of them,
|
by default all keymaps are enabled, but you can disable some of them,
|
||||||
by removing them from the list.
|
by removing them from the list.
|
||||||
|
@ -360,12 +372,11 @@ in
|
||||||
The direction for `prev` and `next` is determined by the motion.
|
The direction for `prev` and `next` is determined by the motion.
|
||||||
`left` and `right` are always left and right.
|
`left` and `right` are always left and right.
|
||||||
'';
|
'';
|
||||||
}
|
};
|
||||||
''
|
default = {
|
||||||
{
|
|
||||||
enabled = true;
|
enabled = true;
|
||||||
/* dynamic configuration for ftFT motions */
|
# dynamic configuration for ftFT motions
|
||||||
config = '''
|
config = ''
|
||||||
function(opts)
|
function(opts)
|
||||||
-- autohide flash when in operator-pending mode
|
-- autohide flash when in operator-pending mode
|
||||||
opts.autohide = vim.fn.mode(true):find("no") and vim.v.operator == "y"
|
opts.autohide = vim.fn.mode(true):find("no") and vim.v.operator == "y"
|
||||||
|
@ -380,13 +391,23 @@ in
|
||||||
-- Show jump labels only in operator-pending mode
|
-- Show jump labels only in operator-pending mode
|
||||||
-- opts.jump_labels = vim.v.count == 0 and vim.fn.mode(true):find("o")
|
-- opts.jump_labels = vim.v.count == 0 and vim.fn.mode(true):find("o")
|
||||||
end
|
end
|
||||||
''';
|
'';
|
||||||
autohide = false;
|
autohide = false;
|
||||||
jumpLabels = false;
|
jumpLabels = false;
|
||||||
multiLine = false;
|
multiLine = false;
|
||||||
label = { exclude = "hjkliardc"; };
|
label = {
|
||||||
keys = helpers.listToUnkeyedAttrs [ "f" "F" "t" "T" ";" "," ];
|
exclude = "hjkliardc";
|
||||||
charActions = '''
|
};
|
||||||
|
# FIXME can't show the function call in the docs...
|
||||||
|
keys = helpers.listToUnkeyedAttrs [
|
||||||
|
"f"
|
||||||
|
"F"
|
||||||
|
"t"
|
||||||
|
"T"
|
||||||
|
";"
|
||||||
|
","
|
||||||
|
];
|
||||||
|
charActions = ''
|
||||||
function(motion)
|
function(motion)
|
||||||
return {
|
return {
|
||||||
[";"] = "next", -- set to right to always go right
|
[";"] = "next", -- set to right to always go right
|
||||||
|
@ -399,38 +420,70 @@ in
|
||||||
-- [motion:match("%l") and motion:upper() or motion:lower()] = "prev",
|
-- [motion:match("%l") and motion:upper() or motion:lower()] = "prev",
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
''';
|
'';
|
||||||
search = { wrap = false; };
|
search = {
|
||||||
highlight = { backdrop = true; };
|
wrap = false;
|
||||||
jump = { register = false; };
|
};
|
||||||
}
|
highlight = {
|
||||||
''
|
backdrop = true;
|
||||||
"options used when flash is activated through a regular search with `/` or `?`";
|
};
|
||||||
treesitter =
|
jump = {
|
||||||
mkModeConfig { }
|
register = false;
|
||||||
''
|
};
|
||||||
{
|
};
|
||||||
labels = "abcdefghijklmnopqrstuvwxyz";
|
};
|
||||||
jump = { pos = "range"; };
|
treesitter = mkModeConfig {
|
||||||
search = { incremental = false; };
|
description = ''
|
||||||
label = { before = true; after = true; style = "inline"; };
|
|
||||||
highlight = { backdrop = false; matches = false; };
|
|
||||||
}helpers.ifNonNull'
|
|
||||||
''
|
|
||||||
''
|
|
||||||
options used for treesitter selections `require("flash").treesitter()`
|
options used for treesitter selections `require("flash").treesitter()`
|
||||||
'';
|
'';
|
||||||
treesitterSearch = mkModeConfig { } ''
|
default = {
|
||||||
{
|
labels = "abcdefghijklmnopqrstuvwxyz";
|
||||||
jump = { pos = "range"; };
|
jump = {
|
||||||
search = { multiWindow = true; wrap = true; incremental = false; };
|
pos = "range";
|
||||||
remoteOp = { restore = true };
|
};
|
||||||
label = { before = true; after = true; style = "inline"; };
|
search = {
|
||||||
}
|
incremental = false;
|
||||||
'' "";
|
};
|
||||||
remote = mkModeConfig { } ''
|
label = {
|
||||||
{ remoteOp = { restore = true; motion = true; }; }
|
before = true;
|
||||||
'' "options used for remote flash";
|
after = true;
|
||||||
|
style = "inline";
|
||||||
|
};
|
||||||
|
highlight = {
|
||||||
|
backdrop = false;
|
||||||
|
matches = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
treesitterSearch = mkModeConfig {
|
||||||
|
default = {
|
||||||
|
jump = {
|
||||||
|
pos = "range";
|
||||||
|
};
|
||||||
|
search = {
|
||||||
|
multiWindow = true;
|
||||||
|
wrap = true;
|
||||||
|
incremental = false;
|
||||||
|
};
|
||||||
|
remoteOp = {
|
||||||
|
restore = true;
|
||||||
|
};
|
||||||
|
label = {
|
||||||
|
before = true;
|
||||||
|
after = true;
|
||||||
|
style = "inline";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
remote = mkModeConfig {
|
||||||
|
default = {
|
||||||
|
remoteOp = {
|
||||||
|
restore = true;
|
||||||
|
motion = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
description = "options used for remote flash";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
// configOpts;
|
// configOpts;
|
||||||
|
|
|
@ -44,21 +44,43 @@ in
|
||||||
Whether the plugin in enabled by default or not.
|
Whether the plugin in enabled by default or not.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
resettingKeys = helpers.mkNullOrOption (with types; attrsOf (listOf str)) ''
|
resettingKeys = helpers.defaultNullOpts.mkAttrsOf (with types; listOf str) {
|
||||||
Keys in what modes that reset the count.
|
"1" = [
|
||||||
|
"n"
|
||||||
default:
|
"x"
|
||||||
```nix
|
];
|
||||||
{
|
"2" = [
|
||||||
"1" = [ "n" "x" ];
|
"n"
|
||||||
"2" = [ "n" "x" ];
|
"x"
|
||||||
"3" = [ "n" "x" ];
|
];
|
||||||
"4" = [ "n" "x" ];
|
"3" = [
|
||||||
"5" = [ "n" "x" ];
|
"n"
|
||||||
"6" = [ "n" "x" ];
|
"x"
|
||||||
"7" = [ "n" "x" ];
|
];
|
||||||
"8" = [ "n" "x" ];
|
"4" = [
|
||||||
"9" = [ "n" "x" ];
|
"n"
|
||||||
|
"x"
|
||||||
|
];
|
||||||
|
"5" = [
|
||||||
|
"n"
|
||||||
|
"x"
|
||||||
|
];
|
||||||
|
"6" = [
|
||||||
|
"n"
|
||||||
|
"x"
|
||||||
|
];
|
||||||
|
"7" = [
|
||||||
|
"n"
|
||||||
|
"x"
|
||||||
|
];
|
||||||
|
"8" = [
|
||||||
|
"n"
|
||||||
|
"x"
|
||||||
|
];
|
||||||
|
"9" = [
|
||||||
|
"n"
|
||||||
|
"x"
|
||||||
|
];
|
||||||
"c" = [ "n" ];
|
"c" = [ "n" ];
|
||||||
"C" = [ "n" ];
|
"C" = [ "n" ];
|
||||||
"d" = [ "n" ];
|
"d" = [ "n" ];
|
||||||
|
@ -68,31 +90,58 @@ in
|
||||||
"Y" = [ "n" ];
|
"Y" = [ "n" ];
|
||||||
"p" = [ "n" ];
|
"p" = [ "n" ];
|
||||||
"P" = [ "n" ];
|
"P" = [ "n" ];
|
||||||
}
|
} "Keys in what modes that reset the count.";
|
||||||
```
|
|
||||||
'';
|
|
||||||
|
|
||||||
restrictedKeys = helpers.mkNullOrOption (with types; attrsOf (listOf str)) ''
|
restrictedKeys = helpers.defaultNullOpts.mkAttrsOf (with types; listOf str) {
|
||||||
Keys in what modes triggering the count mechanism.
|
"h" = [
|
||||||
|
"n"
|
||||||
default:
|
"x"
|
||||||
```nix
|
];
|
||||||
{
|
"j" = [
|
||||||
"h" = [ "n" "x" ];
|
"n"
|
||||||
"j" = [ "n" "x" ];
|
"x"
|
||||||
"k" = [ "n" "x" ];
|
];
|
||||||
"l" = [ "n" "x" ];
|
"k" = [
|
||||||
"-" = [ "n" "x" ];
|
"n"
|
||||||
"+" = [ "n" "x" ];
|
"x"
|
||||||
"gj" = [ "n" "x" ];
|
];
|
||||||
"gk" = [ "n" "x" ];
|
"l" = [
|
||||||
"<CR>" = [ "n" "x" ];
|
"n"
|
||||||
"<C-M>" = [ "n" "x" ];
|
"x"
|
||||||
"<C-N>" = [ "n" "x" ];
|
];
|
||||||
"<C-P>" = [ "n" "x" ];
|
"-" = [
|
||||||
}
|
"n"
|
||||||
```
|
"x"
|
||||||
'';
|
];
|
||||||
|
"+" = [
|
||||||
|
"n"
|
||||||
|
"x"
|
||||||
|
];
|
||||||
|
"gj" = [
|
||||||
|
"n"
|
||||||
|
"x"
|
||||||
|
];
|
||||||
|
"gk" = [
|
||||||
|
"n"
|
||||||
|
"x"
|
||||||
|
];
|
||||||
|
"<CR>" = [
|
||||||
|
"n"
|
||||||
|
"x"
|
||||||
|
];
|
||||||
|
"<C-M>" = [
|
||||||
|
"n"
|
||||||
|
"x"
|
||||||
|
];
|
||||||
|
"<C-N>" = [
|
||||||
|
"n"
|
||||||
|
"x"
|
||||||
|
];
|
||||||
|
"<C-P>" = [
|
||||||
|
"n"
|
||||||
|
"x"
|
||||||
|
];
|
||||||
|
} "Keys in what modes triggering the count mechanism.";
|
||||||
|
|
||||||
restrictionMode =
|
restrictionMode =
|
||||||
helpers.defaultNullOpts.mkEnumFirstDefault
|
helpers.defaultNullOpts.mkEnumFirstDefault
|
||||||
|
@ -104,28 +153,32 @@ in
|
||||||
The behavior when `restricted_keys` trigger count mechanism.
|
The behavior when `restricted_keys` trigger count mechanism.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
disabledKeys = helpers.mkNullOrOption (with types; attrsOf (listOf str)) ''
|
disabledKeys = helpers.defaultNullOpts.mkAttrsOf (with types; listOf str) {
|
||||||
Keys in what modes are disabled.
|
"<Up>" = [
|
||||||
|
""
|
||||||
|
"i"
|
||||||
|
];
|
||||||
|
"<Down>" = [
|
||||||
|
""
|
||||||
|
"i"
|
||||||
|
];
|
||||||
|
"<Left>" = [
|
||||||
|
""
|
||||||
|
"i"
|
||||||
|
];
|
||||||
|
"<Right>" = [
|
||||||
|
""
|
||||||
|
"i"
|
||||||
|
];
|
||||||
|
} "Keys in what modes are disabled.";
|
||||||
|
|
||||||
default:
|
disabledFiletypes = helpers.defaultNullOpts.mkListOf types.str [
|
||||||
```nix
|
"qf"
|
||||||
{
|
"netrw"
|
||||||
"<Up>" = [ "" "i" ];
|
"NvimTree"
|
||||||
"<Down>" = [ "" "i" ];
|
"lazy"
|
||||||
"<Left>" = [ "" "i" ];
|
"mason"
|
||||||
"<Right>" = [ "" "i" ];
|
] "`hardtime.nvim` is disabled under these filetypes.";
|
||||||
}
|
|
||||||
```
|
|
||||||
'';
|
|
||||||
|
|
||||||
disabledFiletypes = helpers.mkNullOrOption (with types; listOf str) ''
|
|
||||||
`hardtime.nvim` is disabled under these filetypes.
|
|
||||||
|
|
||||||
default:
|
|
||||||
```nix
|
|
||||||
["qf" "netrw" "NvimTree" "lazy" "mason"]
|
|
||||||
```
|
|
||||||
'';
|
|
||||||
|
|
||||||
hints =
|
hints =
|
||||||
helpers.mkNullOrOption
|
helpers.mkNullOrOption
|
||||||
|
|
|
@ -109,9 +109,9 @@ in
|
||||||
Closes any tmux windows harpoon that harpoon creates when you close Neovim.
|
Closes any tmux windows harpoon that harpoon creates when you close Neovim.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
excludedFiletypes = helpers.defaultNullOpts.mkNullable (
|
excludedFiletypes = helpers.defaultNullOpts.mkListOf types.str [ "harpoon" ] ''
|
||||||
with types; listOf str
|
Filetypes that you want to prevent from adding to the harpoon list menu.
|
||||||
) ''["harpoon"]'' "Filetypes that you want to prevent from adding to the harpoon list menu.";
|
'';
|
||||||
|
|
||||||
markBranch = helpers.defaultNullOpts.mkBool false ''
|
markBranch = helpers.defaultNullOpts.mkBool false ''
|
||||||
Set marks specific to each git branch inside git repository.
|
Set marks specific to each git branch inside git repository.
|
||||||
|
@ -144,9 +144,16 @@ in
|
||||||
Menu window height
|
Menu window height
|
||||||
'';
|
'';
|
||||||
|
|
||||||
borderChars = helpers.defaultNullOpts.mkNullable (
|
borderChars = helpers.defaultNullOpts.mkListOf types.str [
|
||||||
with types; listOf str
|
"─"
|
||||||
) ''["─" "│" "─" "│" "╭" "╮" "╯" "╰"]'' "Border characters";
|
"│"
|
||||||
|
"─"
|
||||||
|
"│"
|
||||||
|
"╭"
|
||||||
|
"╮"
|
||||||
|
"╯"
|
||||||
|
"╰"
|
||||||
|
] "Border characters";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -243,7 +243,7 @@ helpers.neovim-plugin.mkNeovimPlugin config {
|
||||||
should be good if you have enough keys in `|hop-config-keys|`).
|
should be good if you have enough keys in `|hop-config-keys|`).
|
||||||
'';
|
'';
|
||||||
|
|
||||||
excluded_filetypes = helpers.defaultNullOpts.mkListOf types.str "[]" ''
|
excluded_filetypes = helpers.defaultNullOpts.mkListOf types.str [ ] ''
|
||||||
Skip hinting windows with the excluded filetypes.
|
Skip hinting windows with the excluded filetypes.
|
||||||
Those windows to check filetypes are collected only when you enable `multi_windows` or
|
Those windows to check filetypes are collected only when you enable `multi_windows` or
|
||||||
execute `MW`-commands.
|
execute `MW`-commands.
|
||||||
|
@ -251,7 +251,7 @@ helpers.neovim-plugin.mkNeovimPlugin config {
|
||||||
for editing.
|
for editing.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
match_mappings = helpers.defaultNullOpts.mkListOf types.str "[]" ''
|
match_mappings = helpers.defaultNullOpts.mkListOf types.str [ ] ''
|
||||||
This option allows you to specify the match mappings to use when applying the hint.
|
This option allows you to specify the match mappings to use when applying the hint.
|
||||||
If you set a non-empty `match_mappings`, the hint will be used as a key to look up the
|
If you set a non-empty `match_mappings`, the hint will be used as a key to look up the
|
||||||
pattern to search for.
|
pattern to search for.
|
||||||
|
|
|
@ -61,7 +61,7 @@ with lib;
|
||||||
Called after every hydra head.
|
Called after every hydra head.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
timeout = helpers.defaultNullOpts.mkNullable (with types; either bool ints.unsigned) "false" ''
|
timeout = helpers.defaultNullOpts.mkNullable (with types; either bool ints.unsigned) false ''
|
||||||
Timeout after which the hydra is automatically disabled.
|
Timeout after which the hydra is automatically disabled.
|
||||||
Calling any head will refresh the timeout
|
Calling any head will refresh the timeout
|
||||||
- `true`: timeout set to value of `timeoutlen` (`:h timeoutlen`)
|
- `true`: timeout set to value of `timeoutlen` (`:h timeoutlen`)
|
||||||
|
@ -162,13 +162,11 @@ with lib;
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
helpers.defaultNullOpts.mkNullable (with types; either (enum [ false ]) hintConfigType)
|
helpers.defaultNullOpts.mkNullable (with types; either (enum [ false ]) hintConfigType)
|
||||||
''
|
|
||||||
{
|
{
|
||||||
show_name = true;
|
show_name = true;
|
||||||
position = "bottom";
|
position = "bottom";
|
||||||
offset = 0;
|
offset = 0;
|
||||||
}
|
}
|
||||||
''
|
|
||||||
''
|
''
|
||||||
Configure the hint.
|
Configure the hint.
|
||||||
Set to `false` to disable.
|
Set to `false` to disable.
|
||||||
|
|
|
@ -9,10 +9,17 @@ with lib;
|
||||||
let
|
let
|
||||||
cfg = config.plugins.illuminate;
|
cfg = config.plugins.illuminate;
|
||||||
|
|
||||||
mkListStr = helpers.defaultNullOpts.mkNullable (types.listOf types.str);
|
mkListStr = helpers.defaultNullOpts.mkListOf types.str;
|
||||||
|
|
||||||
commonOptions = with helpers.defaultNullOpts; {
|
commonOptions = with helpers.defaultNullOpts; {
|
||||||
providers = mkListStr ''["lsp" "treesitter" "regex"]'' ''
|
providers =
|
||||||
|
mkListStr
|
||||||
|
[
|
||||||
|
"lsp"
|
||||||
|
"treesitter"
|
||||||
|
"regex"
|
||||||
|
]
|
||||||
|
''
|
||||||
Provider used to get references in the buffer, ordered by priority.
|
Provider used to get references in the buffer, ordered by priority.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
@ -20,23 +27,23 @@ let
|
||||||
Delay in milliseconds.
|
Delay in milliseconds.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
modesDenylist = mkListStr "[]" ''
|
modesDenylist = mkListStr [ ] ''
|
||||||
Modes to not illuminate, this overrides `modes_allowlist`.
|
Modes to not illuminate, this overrides `modes_allowlist`.
|
||||||
See `:help mode()` for possible values.
|
See `:help mode()` for possible values.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
modesAllowlist = mkListStr "[]" ''
|
modesAllowlist = mkListStr [ ] ''
|
||||||
Modes to illuminate, this is overridden by `modes_denylist`.
|
Modes to illuminate, this is overridden by `modes_denylist`.
|
||||||
See `:help mode()` for possible values.
|
See `:help mode()` for possible values.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
providersRegexSyntaxDenylist = mkListStr "[]" ''
|
providersRegexSyntaxDenylist = mkListStr [ ] ''
|
||||||
Syntax to not illuminate, this overrides `providers_regex_syntax_allowlist`.
|
Syntax to not illuminate, this overrides `providers_regex_syntax_allowlist`.
|
||||||
Only applies to the 'regex' provider.
|
Only applies to the 'regex' provider.
|
||||||
Use `:echo synIDattr(synIDtrans(synID(line('.'), col('.'), 1)), 'name')`.
|
Use `:echo synIDattr(synIDtrans(synID(line('.'), col('.'), 1)), 'name')`.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
providersRegexSyntaxAllowlist = mkListStr "[]" ''
|
providersRegexSyntaxAllowlist = mkListStr [ ] ''
|
||||||
Syntax to illuminate, this is overridden by `providers_regex_syntax_denylist`.
|
Syntax to illuminate, this is overridden by `providers_regex_syntax_denylist`.
|
||||||
Only applies to the 'regex' provider.
|
Only applies to the 'regex' provider.
|
||||||
Use `:echo synIDattr(synIDtrans(synID(line('.'), col('.'), 1)), 'name')`.
|
Use `:echo synIDattr(synIDtrans(synID(line('.'), col('.'), 1)), 'name')`.
|
||||||
|
@ -57,11 +64,17 @@ let
|
||||||
};
|
};
|
||||||
|
|
||||||
filetypeOptions = {
|
filetypeOptions = {
|
||||||
filetypesDenylist = mkListStr ''["dirvish" "fugitive"]'' ''
|
filetypesDenylist =
|
||||||
|
mkListStr
|
||||||
|
[
|
||||||
|
"dirvish"
|
||||||
|
"fugitive"
|
||||||
|
]
|
||||||
|
''
|
||||||
Filetypes to not illuminate, this overrides `filetypes_allowlist`.
|
Filetypes to not illuminate, this overrides `filetypes_allowlist`.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
filetypesAllowlist = mkListStr "[]" ''
|
filetypesAllowlist = mkListStr [ ] ''
|
||||||
Filetypes to illuminate, this is overridden by `filetypes_denylist`.
|
Filetypes to illuminate, this is overridden by `filetypes_denylist`.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
@ -77,14 +90,7 @@ in
|
||||||
package = mkPluginPackageOption "vim-illuminate" pkgs.vimPlugins.vim-illuminate;
|
package = mkPluginPackageOption "vim-illuminate" pkgs.vimPlugins.vim-illuminate;
|
||||||
|
|
||||||
filetypeOverrides =
|
filetypeOverrides =
|
||||||
helpers.defaultNullOpts.mkNullable
|
helpers.defaultNullOpts.mkAttrsOf (types.submodule { options = commonOptions; }) { }
|
||||||
(
|
|
||||||
with types;
|
|
||||||
attrsOf (submodule {
|
|
||||||
options = commonOptions;
|
|
||||||
})
|
|
||||||
)
|
|
||||||
"{}"
|
|
||||||
''
|
''
|
||||||
Filetype specific overrides.
|
Filetype specific overrides.
|
||||||
The keys are strings to represent the filetype.
|
The keys are strings to represent the filetype.
|
||||||
|
|
|
@ -212,7 +212,7 @@ helpers.neovim-plugin.mkNeovimPlugin config {
|
||||||
'';
|
'';
|
||||||
|
|
||||||
include = {
|
include = {
|
||||||
node_type = helpers.defaultNullOpts.mkAttrsOf (with types; listOf str) "{}" ''
|
node_type = helpers.defaultNullOpts.mkAttrsOf (with types; listOf str) { } ''
|
||||||
Map of language to a list of node types which can be used as scope.
|
Map of language to a list of node types which can be used as scope.
|
||||||
|
|
||||||
- Use `*` as the language to act as a wildcard for all languages.
|
- Use `*` as the language to act as a wildcard for all languages.
|
||||||
|
@ -221,19 +221,20 @@ helpers.neovim-plugin.mkNeovimPlugin config {
|
||||||
};
|
};
|
||||||
|
|
||||||
exclude = {
|
exclude = {
|
||||||
language = helpers.defaultNullOpts.mkListOf types.str "[]" ''
|
language = helpers.defaultNullOpts.mkListOf types.str [ ] ''
|
||||||
List of treesitter languages for which scope is disabled.
|
List of treesitter languages for which scope is disabled.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
node_type =
|
node_type =
|
||||||
helpers.defaultNullOpts.mkAttrsOf (with types; (listOf str))
|
helpers.defaultNullOpts.mkAttrsOf (with types; (listOf str))
|
||||||
''
|
|
||||||
{
|
{
|
||||||
"*" = ["source_file" "program"];
|
"*" = [
|
||||||
|
"source_file"
|
||||||
|
"program"
|
||||||
|
];
|
||||||
lua = [ "chunk" ];
|
lua = [ "chunk" ];
|
||||||
python = [ "module" ];
|
python = [ "module" ];
|
||||||
}
|
}
|
||||||
''
|
|
||||||
''
|
''
|
||||||
Map of language to a list of node types which should not be used as scope.
|
Map of language to a list of node types which should not be used as scope.
|
||||||
|
|
||||||
|
@ -243,8 +244,7 @@ helpers.neovim-plugin.mkNeovimPlugin config {
|
||||||
};
|
};
|
||||||
|
|
||||||
exclude = {
|
exclude = {
|
||||||
filetypes = helpers.defaultNullOpts.mkListOf types.str ''
|
filetypes = helpers.defaultNullOpts.mkListOf types.str [
|
||||||
[
|
|
||||||
"lspinfo"
|
"lspinfo"
|
||||||
"packer"
|
"packer"
|
||||||
"checkhealth"
|
"checkhealth"
|
||||||
|
@ -253,18 +253,15 @@ helpers.neovim-plugin.mkNeovimPlugin config {
|
||||||
"gitcommit"
|
"gitcommit"
|
||||||
"TelescopePrompt"
|
"TelescopePrompt"
|
||||||
"TelescopeResults"
|
"TelescopeResults"
|
||||||
"\'\'"
|
"''"
|
||||||
]
|
] "List of filetypes for which indent-blankline is disabled.";
|
||||||
'' "List of filetypes for which indent-blankline is disabled.";
|
|
||||||
|
|
||||||
buftypes = helpers.defaultNullOpts.mkListOf types.str ''
|
buftypes = helpers.defaultNullOpts.mkListOf types.str [
|
||||||
[
|
|
||||||
"terminal"
|
"terminal"
|
||||||
"nofile"
|
"nofile"
|
||||||
"quickfix"
|
"quickfix"
|
||||||
"prompt"
|
"prompt"
|
||||||
]
|
] "List of buftypes for which indent-blankline is disabled.";
|
||||||
'' "List of buftypes for which indent-blankline is disabled.";
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -15,9 +15,11 @@ helpers.neovim-plugin.mkNeovimPlugin config {
|
||||||
helpers.defaultNullOpts.mkInt 2048
|
helpers.defaultNullOpts.mkInt 2048
|
||||||
"Number of lines without indentation before giving up (use -1 for infinite)";
|
"Number of lines without indentation before giving up (use -1 for infinite)";
|
||||||
skip_multiline = helpers.defaultNullOpts.mkBool false "Skip multi-line comments and strings (more accurate detection but less performant)";
|
skip_multiline = helpers.defaultNullOpts.mkBool false "Skip multi-line comments and strings (more accurate detection but less performant)";
|
||||||
standard_widths =
|
standard_widths = helpers.defaultNullOpts.mkListOf types.ints.unsigned [
|
||||||
helpers.defaultNullOpts.mkListOf types.ints.unsigned ''[2 4 8]''
|
2
|
||||||
"Space indentations that should be detected";
|
4
|
||||||
|
8
|
||||||
|
] "Space indentations that should be detected";
|
||||||
};
|
};
|
||||||
|
|
||||||
settingsExample = {
|
settingsExample = {
|
||||||
|
|
|
@ -15,14 +15,18 @@ with lib;
|
||||||
|
|
||||||
package = helpers.mkPluginPackageOption "lastplace" pkgs.vimPlugins.nvim-lastplace;
|
package = helpers.mkPluginPackageOption "lastplace" pkgs.vimPlugins.nvim-lastplace;
|
||||||
|
|
||||||
ignoreBuftype =
|
ignoreBuftype = helpers.defaultNullOpts.mkListOf types.str [
|
||||||
helpers.defaultNullOpts.mkNullable (types.listOf types.str) ''["quickfix" "nofix" "help"]''
|
"quickfix"
|
||||||
"The list of buffer types to ignore by lastplace.";
|
"nofix"
|
||||||
|
"help"
|
||||||
|
] "The list of buffer types to ignore by lastplace.";
|
||||||
|
|
||||||
ignoreFiletype =
|
ignoreFiletype = helpers.defaultNullOpts.mkListOf types.str [
|
||||||
helpers.defaultNullOpts.mkNullable (types.listOf types.str)
|
"gitcommit"
|
||||||
''["gitcommit" "gitrebase" "svn" "hgcommit"]''
|
"gitrebase"
|
||||||
"The list of file types to ignore by lastplace.";
|
"svn"
|
||||||
|
"hgcommit"
|
||||||
|
] "The list of file types to ignore by lastplace.";
|
||||||
|
|
||||||
openFolds = helpers.defaultNullOpts.mkBool true "Whether closed folds are automatically opened when jumping to the last edit position.";
|
openFolds = helpers.defaultNullOpts.mkBool true "Whether closed folds are automatically opened when jumping to the last edit position.";
|
||||||
};
|
};
|
||||||
|
|
|
@ -43,22 +43,12 @@ in
|
||||||
Whether to consider case in search patterns.
|
Whether to consider case in search patterns.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
equivalenceClasses =
|
equivalenceClasses = helpers.defaultNullOpts.mkListOf' {
|
||||||
helpers.defaultNullOpts.mkNullable (with types; listOf (either str (listOf str))) ''[" \t\r\n"]''
|
type = with types; either str (listOf str);
|
||||||
''
|
description = ''
|
||||||
A character will match any other in its equivalence class. The sets can
|
A character will match any other in its equivalence class. The sets can
|
||||||
either be defined as strings or tables.
|
either be defined as strings or tables.
|
||||||
|
|
||||||
Example:
|
|
||||||
```nix
|
|
||||||
[
|
|
||||||
"\r\n"
|
|
||||||
")]}>"
|
|
||||||
"([{<"
|
|
||||||
[ "\"" "'" "`" ]
|
|
||||||
]
|
|
||||||
```
|
|
||||||
|
|
||||||
Note: Make sure to have a set containing `\n` if you want to be able to
|
Note: Make sure to have a set containing `\n` if you want to be able to
|
||||||
target characters at the end of the line.
|
target characters at the end of the line.
|
||||||
|
|
||||||
|
@ -67,20 +57,34 @@ in
|
||||||
different labels, corresponding to two different futures, at the same
|
different labels, corresponding to two different futures, at the same
|
||||||
time.
|
time.
|
||||||
'';
|
'';
|
||||||
|
pluginDefault = [ " \t\r\n" ];
|
||||||
|
example = [
|
||||||
|
"\r\n"
|
||||||
|
")]}>"
|
||||||
|
"([{<"
|
||||||
|
[
|
||||||
|
"\""
|
||||||
|
"'"
|
||||||
|
"`"
|
||||||
|
]
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
substituteChars = helpers.defaultNullOpts.mkNullable (with types; attrsOf str) "{}" ''
|
substituteChars = helpers.defaultNullOpts.mkAttrsOf' {
|
||||||
|
type = types.str;
|
||||||
|
description = ''
|
||||||
The keys in this attrs will be substituted in labels and highlighted matches by the given
|
The keys in this attrs will be substituted in labels and highlighted matches by the given
|
||||||
characters.
|
characters.
|
||||||
This way special (e.g. whitespace) characters can be made visible in matches, or even be
|
This way special (e.g. whitespace) characters can be made visible in matches, or even be
|
||||||
used as labels.
|
used as labels.
|
||||||
|
|
||||||
Example: `{"\r" = "¬";}`
|
|
||||||
'';
|
'';
|
||||||
|
pluginDefault = { };
|
||||||
|
example = {
|
||||||
|
"\r" = "¬";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
safeLabels =
|
safeLabels = helpers.defaultNullOpts.mkListOf types.str (stringToCharacters "sfnut/SFNLHMUGT?Z") ''
|
||||||
helpers.defaultNullOpts.mkNullable (with types; listOf str)
|
|
||||||
''["s" "f" "n" "u" "t" "/" "S" "F" "N" "L" "H" "M" "U" "G" "T" "?" "Z"]''
|
|
||||||
''
|
|
||||||
When the number of matches does not exceed the number of these "safe" labels plus one, the
|
When the number of matches does not exceed the number of these "safe" labels plus one, the
|
||||||
plugin jumps to the first match automatically after entering the pattern.
|
plugin jumps to the first match automatically after entering the pattern.
|
||||||
Obviously, for this purpose you should choose keys that are unlikely to be used right
|
Obviously, for this purpose you should choose keys that are unlikely to be used right
|
||||||
|
@ -93,14 +97,8 @@ in
|
||||||
'';
|
'';
|
||||||
|
|
||||||
labels =
|
labels =
|
||||||
helpers.defaultNullOpts.mkNullable (with types; listOf str)
|
helpers.defaultNullOpts.mkListOf types.str
|
||||||
''
|
(stringToCharacters "sfnjklhodwembuyvrgtcx/zSFNJKLHODWEMBUYVRGTCX?Z")
|
||||||
[
|
|
||||||
"s" "f" "n" "j" "k" "l" "h" "o" "d" "w" "e" "m" "b" "u" "y" "v" "r" "g" "t" "c" "x" "/"
|
|
||||||
"z" "S" "F" "N" "J" "K" "L" "H" "O" "D" "W" "E" "M" "B" "U" "Y" "V" "R" "G" "T" "C" "X"
|
|
||||||
"?" "Z"
|
|
||||||
]
|
|
||||||
''
|
|
||||||
''
|
''
|
||||||
Target labels to be used when there are more matches than labels in
|
Target labels to be used when there are more matches than labels in
|
||||||
`|leap.opts.safe_labels|` plus one.
|
`|leap.opts.safe_labels|` plus one.
|
||||||
|
|
|
@ -67,7 +67,7 @@ mkVimPlugin config {
|
||||||
The highlight group to be used for highlighting cells.
|
The highlight group to be used for highlighting cells.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
save_path = helpers.defaultNullOpts.mkStr ''{__raw = "vim.fn.stdpath('data') .. '/magma'";}'' ''
|
save_path = helpers.defaultNullOpts.mkStr { __raw = "vim.fn.stdpath('data') .. '/magma'"; } ''
|
||||||
Where to save/load with `:MagmaSave` and `:MagmaLoad` (with no parameters).
|
Where to save/load with `:MagmaSave` and `:MagmaLoad` (with no parameters).
|
||||||
The generated file is placed in this directory, with the filename itself being the
|
The generated file is placed in this directory, with the filename itself being the
|
||||||
buffer's name, with `%` replaced by `%%` and `/` replaced by `%`, and postfixed with the
|
buffer's name, with `%` replaced by `%%` and `/` replaced by `%`, and postfixed with the
|
||||||
|
|
|
@ -26,7 +26,7 @@ in
|
||||||
"<"
|
"<"
|
||||||
">"
|
">"
|
||||||
])
|
])
|
||||||
"[]"
|
[ ]
|
||||||
''
|
''
|
||||||
Which builtin marks to track and show. If set, these marks will also show up in the
|
Which builtin marks to track and show. If set, these marks will also show up in the
|
||||||
signcolumn and will update on `|CursorMoved|`.
|
signcolumn and will update on `|CursorMoved|`.
|
||||||
|
@ -76,7 +76,7 @@ in
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
"10"
|
10
|
||||||
''
|
''
|
||||||
The sign priority to be used for marks.
|
The sign priority to be used for marks.
|
||||||
Can either be a number, in which case the priority applies to all types of marks, or a
|
Can either be a number, in which case the priority applies to all types of marks, or a
|
||||||
|
@ -88,7 +88,7 @@ in
|
||||||
- bookmark: sign priority for bookmarks
|
- bookmark: sign priority for bookmarks
|
||||||
'';
|
'';
|
||||||
|
|
||||||
excludedFiletypes = helpers.defaultNullOpts.mkListOf types.str "[]" ''
|
excludedFiletypes = helpers.defaultNullOpts.mkListOf types.str [ ] ''
|
||||||
Which filetypes to ignore.
|
Which filetypes to ignore.
|
||||||
If a buffer with this filetype is opened, then `marks.nvim` will not track any marks set in
|
If a buffer with this filetype is opened, then `marks.nvim` will not track any marks set in
|
||||||
this buffer, and will not display any signs.
|
this buffer, and will not display any signs.
|
||||||
|
@ -96,7 +96,7 @@ in
|
||||||
"m[" will not.
|
"m[" will not.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
excludedBuftypes = helpers.defaultNullOpts.mkListOf types.str "[]" ''
|
excludedBuftypes = helpers.defaultNullOpts.mkListOf types.str [ ] ''
|
||||||
Which buftypes to ignore.
|
Which buftypes to ignore.
|
||||||
If a buffer with this buftype is opened, then `marks.nvim` will not track any marks set in
|
If a buffer with this buftype is opened, then `marks.nvim` will not track any marks set in
|
||||||
this buffer, and will not display any signs.
|
this buffer, and will not display any signs.
|
||||||
|
@ -138,7 +138,7 @@ in
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
mappings = helpers.defaultNullOpts.mkAttrsOf (with types; either str (enum [ false ])) "{}" ''
|
mappings = helpers.defaultNullOpts.mkAttrsOf (with types; either str (enum [ false ])) { } ''
|
||||||
Custom mappings.
|
Custom mappings.
|
||||||
Set a mapping to `false` to disable it.
|
Set a mapping to `false` to disable it.
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -79,8 +79,12 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
filetypes =
|
filetypes =
|
||||||
helpers.defaultNullOpts.mkNullable (with types; attrsOf bool)
|
helpers.defaultNullOpts.mkAttrsOf types.bool
|
||||||
"{md = true; rmd = true; markdown = true;}"
|
{
|
||||||
|
md = true;
|
||||||
|
rmd = true;
|
||||||
|
markdown = true;
|
||||||
|
}
|
||||||
''
|
''
|
||||||
A matching extension will enable the plugin's functionality for a file with that
|
A matching extension will enable the plugin's functionality for a file with that
|
||||||
extension.
|
extension.
|
||||||
|
@ -137,7 +141,7 @@ in
|
||||||
notebook (requires `perspective.root_tell` to be specified)
|
notebook (requires `perspective.root_tell` to be specified)
|
||||||
'';
|
'';
|
||||||
|
|
||||||
rootTell = helpers.defaultNullOpts.mkNullable (with types; either (enum [ false ]) str) "false" ''
|
rootTell = helpers.defaultNullOpts.mkNullable (with types; either (enum [ false ]) str) false ''
|
||||||
- `<any file name>`: Any arbitrary filename by which the plugin can uniquely identify
|
- `<any file name>`: Any arbitrary filename by which the plugin can uniquely identify
|
||||||
the root directory of the current notebook.
|
the root directory of the current notebook.
|
||||||
- If `false` is used instead, the plugin will never search for a root directory, even
|
- If `false` is used instead, the plugin will never search for a root directory, even
|
||||||
|
@ -233,7 +237,7 @@ in
|
||||||
an extension, and (b) that new links should be created without an explicit extension.
|
an extension, and (b) that new links should be created without an explicit extension.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
transformExplicit = helpers.defaultNullOpts.mkStrLuaFnOr (types.enum [ false ]) "false" ''
|
transformExplicit = helpers.defaultNullOpts.mkStrLuaFnOr (types.enum [ false ]) false ''
|
||||||
A function that transforms the text to be inserted as the source/path of a link when a
|
A function that transforms the text to be inserted as the source/path of a link when a
|
||||||
link is created.
|
link is created.
|
||||||
Anchor links are not currently customizable.
|
Anchor links are not currently customizable.
|
||||||
|
@ -282,7 +286,14 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
toDo = {
|
toDo = {
|
||||||
symbols = helpers.defaultNullOpts.mkNullable (with types; listOf str) ''[" " "-" "X"]'' ''
|
symbols =
|
||||||
|
helpers.defaultNullOpts.mkListOf types.str
|
||||||
|
[
|
||||||
|
" "
|
||||||
|
"-"
|
||||||
|
"X"
|
||||||
|
]
|
||||||
|
''
|
||||||
A list of symbols (each no more than one character) that represent to-do list completion
|
A list of symbols (each no more than one character) that represent to-do list completion
|
||||||
statuses.
|
statuses.
|
||||||
`MkdnToggleToDo` references these when toggling the status of a to-do item.
|
`MkdnToggleToDo` references these when toggling the status of a to-do item.
|
||||||
|
@ -392,10 +403,9 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
mappings =
|
mappings =
|
||||||
helpers.defaultNullOpts.mkNullable
|
helpers.defaultNullOpts.mkAttrsOf
|
||||||
(
|
(
|
||||||
with types;
|
with types;
|
||||||
attrsOf (
|
|
||||||
either (enum [ false ]) (submodule {
|
either (enum [ false ]) (submodule {
|
||||||
options = {
|
options = {
|
||||||
modes = mkOption {
|
modes = mkOption {
|
||||||
|
@ -418,11 +428,13 @@ in
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
)
|
|
||||||
''
|
|
||||||
{
|
{
|
||||||
MkdnEnter = {
|
MkdnEnter = {
|
||||||
modes = ["n" "v" "i"];
|
modes = [
|
||||||
|
"n"
|
||||||
|
"v"
|
||||||
|
"i"
|
||||||
|
];
|
||||||
key = "<CR>";
|
key = "<CR>";
|
||||||
};
|
};
|
||||||
MkdnTab = false;
|
MkdnTab = false;
|
||||||
|
@ -454,7 +466,10 @@ in
|
||||||
MkdnFollowLink = false; # see MkdnEnter
|
MkdnFollowLink = false; # see MkdnEnter
|
||||||
MkdnCreateLink = false; # see MkdnEnter
|
MkdnCreateLink = false; # see MkdnEnter
|
||||||
MkdnCreateLinkFromClipboard = {
|
MkdnCreateLinkFromClipboard = {
|
||||||
modes = ["n" "v"];
|
modes = [
|
||||||
|
"n"
|
||||||
|
"v"
|
||||||
|
];
|
||||||
key = "<leader>p";
|
key = "<leader>p";
|
||||||
}; # see MkdnEnter
|
}; # see MkdnEnter
|
||||||
MkdnDestroyLink = {
|
MkdnDestroyLink = {
|
||||||
|
@ -482,7 +497,10 @@ in
|
||||||
key = "-";
|
key = "-";
|
||||||
};
|
};
|
||||||
MkdnToggleToDo = {
|
MkdnToggleToDo = {
|
||||||
modes = ["n" "v"];
|
modes = [
|
||||||
|
"n"
|
||||||
|
"v"
|
||||||
|
];
|
||||||
key = "<C-Space>";
|
key = "<C-Space>";
|
||||||
};
|
};
|
||||||
MkdnNewListItem = false;
|
MkdnNewListItem = false;
|
||||||
|
@ -537,7 +555,6 @@ in
|
||||||
key = "<leader>F";
|
key = "<leader>F";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
''
|
|
||||||
''
|
''
|
||||||
An attrs declaring the key mappings.
|
An attrs declaring the key mappings.
|
||||||
The keys should be the name of a commands defined in
|
The keys should be the name of a commands defined in
|
||||||
|
|
|
@ -63,7 +63,7 @@ mkVimPlugin config {
|
||||||
cell.
|
cell.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
cover_lines_starting_with = helpers.defaultNullOpts.mkListOf types.str "[]" ''
|
cover_lines_starting_with = helpers.defaultNullOpts.mkListOf types.str [ ] ''
|
||||||
When `cover_empty_lines` is `true`, also covers lines starting with these strings.
|
When `cover_empty_lines` is `true`, also covers lines starting with these strings.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
@ -108,7 +108,12 @@ mkVimPlugin config {
|
||||||
it's open.
|
it's open.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
output_win_border = helpers.defaultNullOpts.mkBorder ''["" "━" "" ""]'' "output window" "";
|
output_win_border = helpers.defaultNullOpts.mkBorder [
|
||||||
|
""
|
||||||
|
"━"
|
||||||
|
""
|
||||||
|
""
|
||||||
|
] "output window" "";
|
||||||
|
|
||||||
output_win_cover_gutter = helpers.defaultNullOpts.mkBool true ''
|
output_win_cover_gutter = helpers.defaultNullOpts.mkBool true ''
|
||||||
Should the output window cover the gutter (numbers and sign col), or not.
|
Should the output window cover the gutter (numbers and sign col), or not.
|
||||||
|
@ -138,7 +143,9 @@ mkVimPlugin config {
|
||||||
Value passed to the style option in `:h nvim_open_win()`.
|
Value passed to the style option in `:h nvim_open_win()`.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
save_path = helpers.defaultNullOpts.mkStr ''{__raw = "vim.fn.stdpath('data')..'/molten'";}'' "Where to save/load data with `:MoltenSave` and `:MoltenLoad`.";
|
save_path = helpers.defaultNullOpts.mkStr {
|
||||||
|
__raw = "vim.fn.stdpath('data')..'/molten'";
|
||||||
|
} "Where to save/load data with `:MoltenSave` and `:MoltenLoad`.";
|
||||||
|
|
||||||
tick_rate = helpers.defaultNullOpts.mkUnsignedInt 500 ''
|
tick_rate = helpers.defaultNullOpts.mkUnsignedInt 500 ''
|
||||||
How often (in ms) we poll the kernel for updates.
|
How often (in ms) we poll the kernel for updates.
|
||||||
|
|
|
@ -161,7 +161,7 @@ in
|
||||||
]
|
]
|
||||||
(
|
(
|
||||||
mode:
|
mode:
|
||||||
helpers.defaultNullOpts.mkNullable (with types; either bool str) "false" ''
|
helpers.defaultNullOpts.mkNullable (with types; either bool str) false ''
|
||||||
Hints for ${mode} mode.
|
Hints for ${mode} mode.
|
||||||
|
|
||||||
Accepted values:
|
Accepted values:
|
||||||
|
|
|
@ -33,7 +33,7 @@ in
|
||||||
width = mkPercentageOpt 100 "The width size (in %).";
|
width = mkPercentageOpt 100 "The width size (in %).";
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
) "60" "The size of the window.";
|
) 60 "The size of the window.";
|
||||||
|
|
||||||
position = helpers.defaultNullOpts.mkNullable (
|
position = helpers.defaultNullOpts.mkNullable (
|
||||||
with types;
|
with types;
|
||||||
|
@ -44,7 +44,7 @@ in
|
||||||
width = mkPercentageOpt 100 "The width size (in %).";
|
width = mkPercentageOpt 100 "The width size (in %).";
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
) "50" "The position of the window.";
|
) 50 "The position of the window.";
|
||||||
|
|
||||||
scrolloff = helpers.mkNullOrOption types.int ''
|
scrolloff = helpers.mkNullOrOption types.int ''
|
||||||
scrolloff value within navbuddy window
|
scrolloff value within navbuddy window
|
||||||
|
@ -76,13 +76,12 @@ in
|
||||||
'';
|
'';
|
||||||
|
|
||||||
preview =
|
preview =
|
||||||
helpers.defaultNullOpts.mkEnum
|
helpers.defaultNullOpts.mkEnumFirstDefault
|
||||||
[
|
[
|
||||||
"leaf"
|
"leaf"
|
||||||
"always"
|
"always"
|
||||||
"never"
|
"never"
|
||||||
]
|
]
|
||||||
"leaf"
|
|
||||||
''
|
''
|
||||||
Right section can show previews too.
|
Right section can show previews too.
|
||||||
Options: "leaf", "always" or "never"
|
Options: "leaf", "always" or "never"
|
||||||
|
@ -149,8 +148,7 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
mappings =
|
mappings =
|
||||||
helpers.defaultNullOpts.mkNullable (with types; attrsOf (either str helpers.nixvimTypes.rawLua))
|
helpers.defaultNullOpts.mkAttrsOf types.str
|
||||||
''
|
|
||||||
{
|
{
|
||||||
"<esc>" = "close";
|
"<esc>" = "close";
|
||||||
"q" = "close";
|
"q" = "close";
|
||||||
|
@ -192,7 +190,6 @@ in
|
||||||
"<C-v>" = "vsplit";
|
"<C-v>" = "vsplit";
|
||||||
"<C-s>" = "hsplit";
|
"<C-s>" = "hsplit";
|
||||||
}
|
}
|
||||||
''
|
|
||||||
''
|
''
|
||||||
Actions to be triggered for specified keybindings. It can take either action name i.e `toggle_preview`
|
Actions to be triggered for specified keybindings. It can take either action name i.e `toggle_preview`
|
||||||
Or it can a `rawLua`.
|
Or it can a `rawLua`.
|
||||||
|
@ -214,14 +211,13 @@ in
|
||||||
highlight = helpers.defaultNullOpts.mkBool true "Highlight the currently focused node";
|
highlight = helpers.defaultNullOpts.mkBool true "Highlight the currently focused node";
|
||||||
|
|
||||||
reorient =
|
reorient =
|
||||||
helpers.defaultNullOpts.mkEnum
|
helpers.defaultNullOpts.mkEnumFirstDefault
|
||||||
[
|
[
|
||||||
"smart"
|
"smart"
|
||||||
"top"
|
"top"
|
||||||
"mid"
|
"mid"
|
||||||
"none"
|
"none"
|
||||||
]
|
]
|
||||||
"smart"
|
|
||||||
''
|
''
|
||||||
Right section can show previews too.
|
Right section can show previews too.
|
||||||
Options: "leaf", "always" or "never"
|
Options: "leaf", "always" or "never"
|
||||||
|
|
|
@ -29,12 +29,11 @@ helpers.neovim-plugin.mkNeovimPlugin config {
|
||||||
'';
|
'';
|
||||||
|
|
||||||
main_image =
|
main_image =
|
||||||
helpers.defaultNullOpts.mkEnum
|
helpers.defaultNullOpts.mkEnumFirstDefault
|
||||||
[
|
[
|
||||||
"language"
|
"language"
|
||||||
"logo"
|
"logo"
|
||||||
]
|
]
|
||||||
"language"
|
|
||||||
''
|
''
|
||||||
Main image display (either "language" or "logo")
|
Main image display (either "language" or "logo")
|
||||||
'';
|
'';
|
||||||
|
@ -65,25 +64,23 @@ helpers.neovim-plugin.mkNeovimPlugin config {
|
||||||
Displays the current line number instead of the current project.
|
Displays the current line number instead of the current project.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
blacklist = helpers.defaultNullOpts.mkListOf types.str "[]" ''
|
blacklist = helpers.defaultNullOpts.mkListOf types.str [ ] ''
|
||||||
A list of strings or Lua patterns that disable Rich Presence if the
|
A list of strings or Lua patterns that disable Rich Presence if the
|
||||||
current file name, path, or workspace matches.
|
current file name, path, or workspace matches.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
buttons =
|
buttons =
|
||||||
helpers.defaultNullOpts.mkNullable
|
helpers.defaultNullOpts.mkListOf
|
||||||
(
|
(
|
||||||
with types;
|
with types;
|
||||||
either helpers.nixvimTypes.rawLua (
|
submodule {
|
||||||
listOf (submodule {
|
|
||||||
options = {
|
options = {
|
||||||
label = helpers.mkNullOrOption str "";
|
label = helpers.mkNullOrStr "";
|
||||||
url = helpers.mkNullOrOption str "";
|
url = helpers.mkNullOrStr "";
|
||||||
};
|
};
|
||||||
})
|
}
|
||||||
)
|
)
|
||||||
)
|
[ ]
|
||||||
"[]"
|
|
||||||
''
|
''
|
||||||
Button configurations which will always appear in Rich Presence.
|
Button configurations which will always appear in Rich Presence.
|
||||||
Can be a list of attribute sets, each with the following attributes:
|
Can be a list of attribute sets, each with the following attributes:
|
||||||
|
|
|
@ -67,7 +67,10 @@ in
|
||||||
If true, enables placeholders when inserting annotation
|
If true, enables placeholders when inserting annotation
|
||||||
'';
|
'';
|
||||||
|
|
||||||
languages = helpers.defaultNullOpts.mkNullable types.attrs "see upstream documentation" ''
|
languages = helpers.defaultNullOpts.mkAttrsOf' {
|
||||||
|
# No plugin default (see upstream)
|
||||||
|
type = types.anything;
|
||||||
|
description = ''
|
||||||
Configuration for languages.
|
Configuration for languages.
|
||||||
|
|
||||||
`template.annotation_convention` (default: check the language default configurations):
|
`template.annotation_convention` (default: check the language default configurations):
|
||||||
|
@ -93,18 +96,15 @@ in
|
||||||
Template for an annotation convention.
|
Template for an annotation convention.
|
||||||
To know more about how to create your own template, go here:
|
To know more about how to create your own template, go here:
|
||||||
https://github.com/danymat/neogen/blob/main/docs/adding-languages.md#default-generator
|
https://github.com/danymat/neogen/blob/main/docs/adding-languages.md#default-generator
|
||||||
|
'';
|
||||||
Example:
|
example = {
|
||||||
```nix
|
|
||||||
{
|
|
||||||
csharp = {
|
csharp = {
|
||||||
template = {
|
template = {
|
||||||
annotation_convention = "...";
|
annotation_convention = "...";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
};
|
||||||
```
|
};
|
||||||
'';
|
|
||||||
|
|
||||||
snippetEngine = helpers.mkNullOrOption types.str ''
|
snippetEngine = helpers.mkNullOrOption types.str ''
|
||||||
Use a snippet engine to generate annotations.
|
Use a snippet engine to generate annotations.
|
||||||
|
|
|
@ -80,7 +80,7 @@ with lib;
|
||||||
}
|
}
|
||||||
) modes;
|
) modes;
|
||||||
|
|
||||||
floatPrecision = helpers.defaultNullOpts.mkNullable types.float "0.01" ''
|
floatPrecision = helpers.defaultNullOpts.mkNullable types.float 1.0e-2 ''
|
||||||
Can limit the number of decimals displayed for floats
|
Can limit the number of decimals displayed for floats
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
|
@ -70,13 +70,10 @@ in
|
||||||
Function called when a new window is closed.
|
Function called when a new window is closed.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
render = helpers.defaultNullOpts.mkNullable (
|
render = helpers.defaultNullOpts.mkEnumFirstDefault [
|
||||||
with types;
|
|
||||||
either (enum [
|
|
||||||
"default"
|
"default"
|
||||||
"minimal"
|
"minimal"
|
||||||
]) helpers.nixvimTypes.rawLua
|
] "Function to render a notification buffer or a built-in renderer name.";
|
||||||
) "default" "Function to render a notification buffer or a built-in renderer name.";
|
|
||||||
|
|
||||||
minimumWidth = helpers.defaultNullOpts.mkUnsignedInt 50 ''
|
minimumWidth = helpers.defaultNullOpts.mkUnsignedInt 50 ''
|
||||||
Minimum width for notification windows.
|
Minimum width for notification windows.
|
||||||
|
|
|
@ -53,9 +53,10 @@ helpers.neovim-plugin.mkNeovimPlugin config {
|
||||||
];
|
];
|
||||||
|
|
||||||
settingsOptions = {
|
settingsOptions = {
|
||||||
disable_filetype =
|
disable_filetype = helpers.defaultNullOpts.mkListOf types.str [
|
||||||
helpers.defaultNullOpts.mkListOf types.str ''["TelescopePrompt" "spectre_panel"]''
|
"TelescopePrompt"
|
||||||
"Disabled filetypes.";
|
"spectre_panel"
|
||||||
|
] "Disabled filetypes.";
|
||||||
|
|
||||||
disable_in_macro = helpers.defaultNullOpts.mkBool false ''
|
disable_in_macro = helpers.defaultNullOpts.mkBool false ''
|
||||||
Disable when recording or executing a macro.
|
Disable when recording or executing a macro.
|
||||||
|
@ -101,8 +102,7 @@ helpers.neovim-plugin.mkNeovimPlugin config {
|
||||||
Use treesitter to check for a pair.
|
Use treesitter to check for a pair.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
ts_config = helpers.defaultNullOpts.mkAttrsOf types.anything ''
|
ts_config = helpers.defaultNullOpts.mkAttrsOf types.anything {
|
||||||
{
|
|
||||||
lua = [
|
lua = [
|
||||||
"string"
|
"string"
|
||||||
"source"
|
"source"
|
||||||
|
@ -112,8 +112,7 @@ helpers.neovim-plugin.mkNeovimPlugin config {
|
||||||
"string"
|
"string"
|
||||||
"template_string"
|
"template_string"
|
||||||
];
|
];
|
||||||
}
|
} "Configuration for TreeSitter.";
|
||||||
'' "Configuration for TreeSitter.";
|
|
||||||
|
|
||||||
map_cr = helpers.defaultNullOpts.mkBool true ''
|
map_cr = helpers.defaultNullOpts.mkBool true ''
|
||||||
Map the `<CR>` key to confirm the completion.
|
Map the `<CR>` key to confirm the completion.
|
||||||
|
@ -136,7 +135,16 @@ helpers.neovim-plugin.mkNeovimPlugin config {
|
||||||
The key to trigger fast_wrap.
|
The key to trigger fast_wrap.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
chars = helpers.defaultNullOpts.mkListOf types.str ''["{" "[" "(" "\"" "'"]'' ''
|
chars =
|
||||||
|
helpers.defaultNullOpts.mkListOf types.str
|
||||||
|
[
|
||||||
|
"{"
|
||||||
|
"["
|
||||||
|
"("
|
||||||
|
"\""
|
||||||
|
"'"
|
||||||
|
]
|
||||||
|
''
|
||||||
Characters for which to enable fast wrap.
|
Characters for which to enable fast wrap.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
|
|
@ -38,8 +38,18 @@ in
|
||||||
'';
|
'';
|
||||||
|
|
||||||
borderChars =
|
borderChars =
|
||||||
helpers.defaultNullOpts.mkNullable (types.listOf types.str)
|
helpers.defaultNullOpts.mkListOf types.str
|
||||||
"[ \"│\" \"│\" \"─\" \"─\" \"╭\" \"╮\" \"╰\" \"╯\" \"█\" ]"
|
[
|
||||||
|
"│"
|
||||||
|
"│"
|
||||||
|
"─"
|
||||||
|
"─"
|
||||||
|
"╭"
|
||||||
|
"╮"
|
||||||
|
"╰"
|
||||||
|
"╯"
|
||||||
|
"█"
|
||||||
|
]
|
||||||
''
|
''
|
||||||
Border and scroll bar chars, they respectively represent:
|
Border and scroll bar chars, they respectively represent:
|
||||||
vline, vline, hline, hline, ulcorner, urcorner, blcorner, brcorner, sbar
|
vline, vline, hline, hline, ulcorner, urcorner, blcorner, brcorner, sbar
|
||||||
|
@ -111,9 +121,10 @@ in
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
extraOpts =
|
extraOpts = helpers.defaultNullOpts.mkListOf types.str [
|
||||||
helpers.defaultNullOpts.mkNullable (types.listOf types.str) "[ \"--bind\" \"ctrl-o:toggle-all\" ]"
|
"--bind"
|
||||||
"Extra options for fzf.";
|
"ctrl-o:toggle-all"
|
||||||
|
] "Extra options for fzf.";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -229,7 +229,7 @@ helpers.neovim-plugin.mkNeovimPlugin config {
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
"[]"
|
[ ]
|
||||||
''
|
''
|
||||||
A list of vault names and paths.
|
A list of vault names and paths.
|
||||||
Each path should be the path to the vault root.
|
Each path should be the path to the vault root.
|
||||||
|
|
|
@ -32,7 +32,7 @@ with lib;
|
||||||
|
|
||||||
substitutions = helpers.defaultNullOpts.mkAttrsOf (
|
substitutions = helpers.defaultNullOpts.mkAttrsOf (
|
||||||
with helpers.nixvimTypes; either str rawLua
|
with helpers.nixvimTypes; either str rawLua
|
||||||
) "{}" "A map for custom variables, the key should be the variable and the value a function.";
|
) { } "A map for custom variables, the key should be the variable and the value a function.";
|
||||||
};
|
};
|
||||||
|
|
||||||
new_notes_location =
|
new_notes_location =
|
||||||
|
@ -203,11 +203,14 @@ with lib;
|
||||||
'';
|
'';
|
||||||
|
|
||||||
completion = {
|
completion = {
|
||||||
nvim_cmp = helpers.mkNullOrOption types.bool ''
|
# FIXME should this accept raw types?
|
||||||
|
nvim_cmp = helpers.mkNullOrOption' {
|
||||||
|
type = types.bool;
|
||||||
|
description = ''
|
||||||
Set to false to disable completion.
|
Set to false to disable completion.
|
||||||
|
|
||||||
Default: `true` if `nvim-cmp` is enabled (`plugins.cmp.enable`).
|
|
||||||
'';
|
'';
|
||||||
|
defaultText = literalMD "`true` if `plugins.cmp.enable` is enabled (otherwise `null`).";
|
||||||
|
};
|
||||||
|
|
||||||
min_chars = helpers.defaultNullOpts.mkUnsignedInt 2 ''
|
min_chars = helpers.defaultNullOpts.mkUnsignedInt 2 ''
|
||||||
Trigger completion at this many chars.
|
Trigger completion at this many chars.
|
||||||
|
@ -233,7 +236,6 @@ with lib;
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
''
|
|
||||||
{
|
{
|
||||||
gf = {
|
gf = {
|
||||||
action = "require('obsidian').util.gf_passthrough";
|
action = "require('obsidian').util.gf_passthrough";
|
||||||
|
@ -249,7 +251,6 @@ with lib;
|
||||||
opts.buffer = true;
|
opts.buffer = true;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
''
|
|
||||||
''
|
''
|
||||||
Configure key mappings.
|
Configure key mappings.
|
||||||
'';
|
'';
|
||||||
|
@ -268,12 +269,10 @@ with lib;
|
||||||
|
|
||||||
note_mappings =
|
note_mappings =
|
||||||
helpers.defaultNullOpts.mkAttrsOf types.str
|
helpers.defaultNullOpts.mkAttrsOf types.str
|
||||||
''
|
|
||||||
{
|
{
|
||||||
new = "<C-x>";
|
new = "<C-x>";
|
||||||
insert_link = "<C-l>";
|
insert_link = "<C-l>";
|
||||||
}
|
}
|
||||||
''
|
|
||||||
''
|
''
|
||||||
Optional, configure note mappings for the picker. These are the defaults.
|
Optional, configure note mappings for the picker. These are the defaults.
|
||||||
Not all pickers support all mappings.
|
Not all pickers support all mappings.
|
||||||
|
@ -281,12 +280,10 @@ with lib;
|
||||||
|
|
||||||
tag_mappings =
|
tag_mappings =
|
||||||
helpers.defaultNullOpts.mkAttrsOf types.str
|
helpers.defaultNullOpts.mkAttrsOf types.str
|
||||||
''
|
|
||||||
{
|
{
|
||||||
tag_note = "<C-x>";
|
tag_note = "<C-x>";
|
||||||
insert_tag = "<C-l>";
|
insert_tag = "<C-l>";
|
||||||
}
|
}
|
||||||
''
|
|
||||||
''
|
''
|
||||||
Optional, configure tag mappings for the picker. These are the defaults.
|
Optional, configure tag mappings for the picker. These are the defaults.
|
||||||
Not all pickers support all mappings.
|
Not all pickers support all mappings.
|
||||||
|
@ -369,10 +366,10 @@ with lib;
|
||||||
'';
|
'';
|
||||||
|
|
||||||
checkboxes =
|
checkboxes =
|
||||||
helpers.defaultNullOpts.mkNullable
|
helpers.defaultNullOpts.mkAttrsOf
|
||||||
(
|
(
|
||||||
with types;
|
with types;
|
||||||
attrsOf (submodule {
|
submodule {
|
||||||
options = {
|
options = {
|
||||||
char = mkOption {
|
char = mkOption {
|
||||||
type = with helpers.nixvimTypes; maybeRaw str;
|
type = with helpers.nixvimTypes; maybeRaw str;
|
||||||
|
@ -384,9 +381,8 @@ with lib;
|
||||||
description = "The name of the highlight group to use for this checkbox.";
|
description = "The name of the highlight group to use for this checkbox.";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
})
|
}
|
||||||
)
|
)
|
||||||
''
|
|
||||||
{
|
{
|
||||||
" " = {
|
" " = {
|
||||||
char = "";
|
char = "";
|
||||||
|
@ -405,7 +401,6 @@ with lib;
|
||||||
hl_group = "ObsidianTilde";
|
hl_group = "ObsidianTilde";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
''
|
|
||||||
''
|
''
|
||||||
Define how various check-boxes are displayed.
|
Define how various check-boxes are displayed.
|
||||||
You can also add more custom ones...
|
You can also add more custom ones...
|
||||||
|
@ -452,8 +447,7 @@ with lib;
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
hl_groups = helpers.defaultNullOpts.mkNullable (with helpers.nixvimTypes; attrsOf highlight) ''
|
hl_groups = helpers.defaultNullOpts.mkAttrsOf helpers.nixvimTypes.highlight {
|
||||||
{
|
|
||||||
ObsidianTodo = {
|
ObsidianTodo = {
|
||||||
bold = true;
|
bold = true;
|
||||||
fg = "#f78c6c";
|
fg = "#f78c6c";
|
||||||
|
@ -484,8 +478,7 @@ with lib;
|
||||||
ObsidianHighlightText = {
|
ObsidianHighlightText = {
|
||||||
bg = "#75662e";
|
bg = "#75662e";
|
||||||
};
|
};
|
||||||
}
|
} "Highlight group definitions.";
|
||||||
'' "Highlight group definitions.";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
attachments = {
|
attachments = {
|
||||||
|
|
|
@ -277,7 +277,7 @@ helpers.neovim-plugin.mkNeovimPlugin config {
|
||||||
'';
|
'';
|
||||||
|
|
||||||
cleanup_delay_ms =
|
cleanup_delay_ms =
|
||||||
helpers.defaultNullOpts.mkNullable (with types; either types.ints.unsigned (enum [ false ])) "2000"
|
helpers.defaultNullOpts.mkNullable (with types; either types.ints.unsigned (enum [ false ])) 2000
|
||||||
''
|
''
|
||||||
Oil will automatically delete hidden buffers after this delay.
|
Oil will automatically delete hidden buffers after this delay.
|
||||||
You can set the delay to false to disable cleanup entirely.
|
You can set the delay to false to disable cleanup entirely.
|
||||||
|
@ -317,7 +317,6 @@ helpers.neovim-plugin.mkNeovimPlugin config {
|
||||||
(enum [ false ])
|
(enum [ false ])
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
''
|
|
||||||
{
|
{
|
||||||
"g?" = "actions.show_help";
|
"g?" = "actions.show_help";
|
||||||
"<CR>" = "actions.select";
|
"<CR>" = "actions.select";
|
||||||
|
@ -336,7 +335,6 @@ helpers.neovim-plugin.mkNeovimPlugin config {
|
||||||
"g." = "actions.toggle_hidden";
|
"g." = "actions.toggle_hidden";
|
||||||
"g\\" = "actions.toggle_trash";
|
"g\\" = "actions.toggle_trash";
|
||||||
}
|
}
|
||||||
''
|
|
||||||
''
|
''
|
||||||
Keymaps in oil buffer.
|
Keymaps in oil buffer.
|
||||||
Can be any value that `vim.keymap.set` accepts OR a table of keymap options with a
|
Can be any value that `vim.keymap.set` accepts OR a table of keymap options with a
|
||||||
|
@ -347,7 +345,7 @@ helpers.neovim-plugin.mkNeovimPlugin config {
|
||||||
See `:help oil-actions` for a list of all available actions.
|
See `:help oil-actions` for a list of all available actions.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
keymaps_help = helpers.defaultNullOpts.mkAttrsOf types.anything ''{border = "rounded";}'' ''
|
keymaps_help = helpers.defaultNullOpts.mkAttrsOf types.anything { border = "rounded"; } ''
|
||||||
Configuration for the floating keymaps help window.
|
Configuration for the floating keymaps help window.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
@ -379,12 +377,16 @@ helpers.neovim-plugin.mkNeovimPlugin config {
|
||||||
|
|
||||||
sort =
|
sort =
|
||||||
helpers.defaultNullOpts.mkListOf (with types; listOf str)
|
helpers.defaultNullOpts.mkListOf (with types; listOf str)
|
||||||
''
|
|
||||||
[
|
[
|
||||||
["type" "asc"]
|
[
|
||||||
["name" "asc"]
|
"type"
|
||||||
|
"asc"
|
||||||
|
]
|
||||||
|
[
|
||||||
|
"name"
|
||||||
|
"asc"
|
||||||
|
]
|
||||||
]
|
]
|
||||||
''
|
|
||||||
''
|
''
|
||||||
Sort order can be "asc" or "desc".
|
Sort order can be "asc" or "desc".
|
||||||
See `:help oil-columns` to see which columns are sortable.
|
See `:help oil-columns` to see which columns are sortable.
|
||||||
|
@ -418,13 +420,19 @@ helpers.neovim-plugin.mkNeovimPlugin config {
|
||||||
};
|
};
|
||||||
|
|
||||||
preview = {
|
preview = {
|
||||||
max_width = helpers.defaultNullOpts.mkNullable dimensionType "0.9" ''
|
max_width = helpers.defaultNullOpts.mkNullable dimensionType 0.9 ''
|
||||||
Width dimensions can be integers or a float between 0 and 1 (e.g. 0.4 for 40%).
|
Width dimensions can be integers or a float between 0 and 1 (e.g. 0.4 for 40%).
|
||||||
Can be a single value or a list of mixed integer/float types.
|
Can be a single value or a list of mixed integer/float types.
|
||||||
`max_width = [100 0.8]` means "the lesser of 100 columns or 80% of total".
|
`max_width = [100 0.8]` means "the lesser of 100 columns or 80% of total".
|
||||||
'';
|
'';
|
||||||
|
|
||||||
min_width = helpers.defaultNullOpts.mkNullable dimensionType "[40 0.4]" ''
|
min_width =
|
||||||
|
helpers.defaultNullOpts.mkNullable dimensionType
|
||||||
|
[
|
||||||
|
40
|
||||||
|
0.4
|
||||||
|
]
|
||||||
|
''
|
||||||
Width dimensions can be integers or a float between 0 and 1 (e.g. 0.4 for 40%).
|
Width dimensions can be integers or a float between 0 and 1 (e.g. 0.4 for 40%).
|
||||||
Can be a single value or a list of mixed integer/float types.
|
Can be a single value or a list of mixed integer/float types.
|
||||||
`min_width = [40 0.4]` means "the greater of 40 columns or 40% of total".
|
`min_width = [40 0.4]` means "the greater of 40 columns or 40% of total".
|
||||||
|
@ -434,13 +442,19 @@ helpers.neovim-plugin.mkNeovimPlugin config {
|
||||||
with types; either int (numbers.between 0.0 1.0)
|
with types; either int (numbers.between 0.0 1.0)
|
||||||
) "Optionally define an integer/float for the exact width of the preview window.";
|
) "Optionally define an integer/float for the exact width of the preview window.";
|
||||||
|
|
||||||
max_height = helpers.defaultNullOpts.mkNullable dimensionType "0.9" ''
|
max_height = helpers.defaultNullOpts.mkNullable dimensionType 0.9 ''
|
||||||
Height dimensions can be integers or a float between 0 and 1 (e.g. 0.4 for 40%).
|
Height dimensions can be integers or a float between 0 and 1 (e.g. 0.4 for 40%).
|
||||||
Can be a single value or a list of mixed integer/float types.
|
Can be a single value or a list of mixed integer/float types.
|
||||||
`max_height = [80 0.9]` means "the lesser of 80 columns or 90% of total".
|
`max_height = [80 0.9]` means "the lesser of 80 columns or 90% of total".
|
||||||
'';
|
'';
|
||||||
|
|
||||||
min_height = helpers.defaultNullOpts.mkNullable dimensionType "[5 0.1]" ''
|
min_height =
|
||||||
|
helpers.defaultNullOpts.mkNullable dimensionType
|
||||||
|
[
|
||||||
|
5
|
||||||
|
0.1
|
||||||
|
]
|
||||||
|
''
|
||||||
Height dimensions can be integers or a float between 0 and 1 (e.g. 0.4 for 40%).
|
Height dimensions can be integers or a float between 0 and 1 (e.g. 0.4 for 40%).
|
||||||
Can be a single value or a list of mixed integer/float types.
|
Can be a single value or a list of mixed integer/float types.
|
||||||
`min_height = [5 0.1]` means "the greater of 5 columns or 10% of total".
|
`min_height = [5 0.1]` means "the greater of 5 columns or 10% of total".
|
||||||
|
@ -462,13 +476,19 @@ helpers.neovim-plugin.mkNeovimPlugin config {
|
||||||
};
|
};
|
||||||
|
|
||||||
progress = {
|
progress = {
|
||||||
max_width = helpers.defaultNullOpts.mkNullable dimensionType "0.9" ''
|
max_width = helpers.defaultNullOpts.mkNullable dimensionType 0.9 ''
|
||||||
Width dimensions can be integers or a float between 0 and 1 (e.g. 0.4 for 40%).
|
Width dimensions can be integers or a float between 0 and 1 (e.g. 0.4 for 40%).
|
||||||
Can be a single value or a list of mixed integer/float types.
|
Can be a single value or a list of mixed integer/float types.
|
||||||
`max_width = [100 0.8]` means "the lesser of 100 columns or 80% of total".
|
`max_width = [100 0.8]` means "the lesser of 100 columns or 80% of total".
|
||||||
'';
|
'';
|
||||||
|
|
||||||
min_width = helpers.defaultNullOpts.mkNullable dimensionType "[40 0.4]" ''
|
min_width =
|
||||||
|
helpers.defaultNullOpts.mkNullable dimensionType
|
||||||
|
[
|
||||||
|
40
|
||||||
|
0.4
|
||||||
|
]
|
||||||
|
''
|
||||||
Width dimensions can be integers or a float between 0 and 1 (e.g. 0.4 for 40%).
|
Width dimensions can be integers or a float between 0 and 1 (e.g. 0.4 for 40%).
|
||||||
Can be a single value or a list of mixed integer/float types.
|
Can be a single value or a list of mixed integer/float types.
|
||||||
`min_width = [40 0.4]` means "the greater of 40 columns or 40% of total".
|
`min_width = [40 0.4]` means "the greater of 40 columns or 40% of total".
|
||||||
|
@ -478,13 +498,19 @@ helpers.neovim-plugin.mkNeovimPlugin config {
|
||||||
with types; either int (numbers.between 0.0 1.0)
|
with types; either int (numbers.between 0.0 1.0)
|
||||||
) "Optionally define an integer/float for the exact width of the preview window.";
|
) "Optionally define an integer/float for the exact width of the preview window.";
|
||||||
|
|
||||||
max_height = helpers.defaultNullOpts.mkNullable dimensionType "0.9" ''
|
max_height = helpers.defaultNullOpts.mkNullable dimensionType 0.9 ''
|
||||||
Height dimensions can be integers or a float between 0 and 1 (e.g. 0.4 for 40%).
|
Height dimensions can be integers or a float between 0 and 1 (e.g. 0.4 for 40%).
|
||||||
Can be a single value or a list of mixed integer/float types.
|
Can be a single value or a list of mixed integer/float types.
|
||||||
`max_height = [80 0.9]` means "the lesser of 80 columns or 90% of total".
|
`max_height = [80 0.9]` means "the lesser of 80 columns or 90% of total".
|
||||||
'';
|
'';
|
||||||
|
|
||||||
min_height = helpers.defaultNullOpts.mkNullable dimensionType "[5 0.1]" ''
|
min_height =
|
||||||
|
helpers.defaultNullOpts.mkNullable dimensionType
|
||||||
|
[
|
||||||
|
5
|
||||||
|
0.1
|
||||||
|
]
|
||||||
|
''
|
||||||
Height dimensions can be integers or a float between 0 and 1 (e.g. 0.4 for 40%).
|
Height dimensions can be integers or a float between 0 and 1 (e.g. 0.4 for 40%).
|
||||||
Can be a single value or a list of mixed integer/float types.
|
Can be a single value or a list of mixed integer/float types.
|
||||||
`min_height = [5 0.1]` means "the greater of 5 columns or 10% of total".
|
`min_height = [5 0.1]` means "the greater of 5 columns or 10% of total".
|
||||||
|
|
|
@ -178,7 +178,7 @@ in
|
||||||
The command to use to start the ollama server.
|
The command to use to start the ollama server.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
args = helpers.defaultNullOpts.mkListOf types.str ''["serve"]'' ''
|
args = helpers.defaultNullOpts.mkListOf types.str [ "serve" ] ''
|
||||||
The arguments to pass to the serve command.
|
The arguments to pass to the serve command.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
@ -186,7 +186,13 @@ in
|
||||||
The command to use to stop the ollama server.
|
The command to use to stop the ollama server.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
stopArgs = helpers.defaultNullOpts.mkListOf types.str ''["-SIGTERM" "ollama"]'' ''
|
stopArgs =
|
||||||
|
helpers.defaultNullOpts.mkListOf types.str
|
||||||
|
[
|
||||||
|
"-SIGTERM"
|
||||||
|
"ollama"
|
||||||
|
]
|
||||||
|
''
|
||||||
The arguments to pass to the stop command.
|
The arguments to pass to the stop command.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
|
@ -12,10 +12,9 @@ with lib;
|
||||||
|
|
||||||
package = helpers.mkPluginPackageOption "persistence.nvim" pkgs.vimPlugins.persistence-nvim;
|
package = helpers.mkPluginPackageOption "persistence.nvim" pkgs.vimPlugins.persistence-nvim;
|
||||||
|
|
||||||
dir =
|
dir = helpers.defaultNullOpts.mkStr {
|
||||||
helpers.defaultNullOpts.mkNullable (with types; either str helpers.nixvimTypes.rawLua)
|
__raw = ''vim.fn.expand(vim.fn.stdpath("state") .. "/sessions/")'';
|
||||||
''vim.fn.expand(vim.fn.stdpath("state") .. "/sessions/")''
|
} "directory where session files are saved";
|
||||||
"directory where session files are saved";
|
|
||||||
|
|
||||||
options =
|
options =
|
||||||
let
|
let
|
||||||
|
@ -38,9 +37,13 @@ with lib;
|
||||||
"winsize"
|
"winsize"
|
||||||
];
|
];
|
||||||
in
|
in
|
||||||
helpers.defaultNullOpts.mkNullable (
|
helpers.defaultNullOpts.mkListOf (types.enum sessionOpts) [
|
||||||
with types; listOf (enum sessionOpts)
|
"buffers"
|
||||||
) ''["buffers" "curdir" "tabpages" "winsize" "skiprtp"]'' "sessionoptions used for saving";
|
"curdir"
|
||||||
|
"tabpages"
|
||||||
|
"winsize"
|
||||||
|
"skiprtp"
|
||||||
|
] "sessionoptions used for saving";
|
||||||
|
|
||||||
preSave = helpers.defaultNullOpts.mkLuaFn "nil" "a function to call before saving the session";
|
preSave = helpers.defaultNullOpts.mkLuaFn "nil" "a function to call before saving the session";
|
||||||
|
|
||||||
|
|
|
@ -27,12 +27,11 @@ in
|
||||||
'';
|
'';
|
||||||
|
|
||||||
mainImage =
|
mainImage =
|
||||||
helpers.defaultNullOpts.mkEnum
|
helpers.defaultNullOpts.mkEnumFirstDefault
|
||||||
[
|
[
|
||||||
"neovim"
|
"neovim"
|
||||||
"file"
|
"file"
|
||||||
]
|
]
|
||||||
"neovim"
|
|
||||||
''
|
''
|
||||||
Main image display.
|
Main image display.
|
||||||
'';
|
'';
|
||||||
|
@ -63,24 +62,20 @@ in
|
||||||
Displays the current line number instead of the current project.
|
Displays the current line number instead of the current project.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
blacklist = helpers.defaultNullOpts.mkNullable (types.listOf types.str) "[]" ''
|
blacklist = helpers.defaultNullOpts.mkListOf types.str [ ] ''
|
||||||
A list of strings or Lua patterns that disable Rich Presence if the
|
A list of strings or Lua patterns that disable Rich Presence if the
|
||||||
current file name, path, or workspace matches.
|
current file name, path, or workspace matches.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
buttons =
|
buttons =
|
||||||
helpers.defaultNullOpts.mkNullable
|
helpers.defaultNullOpts.mkListOf
|
||||||
(types.either helpers.nixvimTypes.rawLua (
|
(types.submodule {
|
||||||
types.listOf (
|
|
||||||
types.submodule {
|
|
||||||
options = {
|
options = {
|
||||||
label = helpers.mkNullOrOption types.str "";
|
label = helpers.mkNullOrOption types.str "";
|
||||||
url = helpers.mkNullOrOption types.str "";
|
url = helpers.mkNullOrOption types.str "";
|
||||||
};
|
};
|
||||||
}
|
})
|
||||||
)
|
[ ]
|
||||||
))
|
|
||||||
"[]"
|
|
||||||
''
|
''
|
||||||
Button configurations which will always appear in Rich Presence.
|
Button configurations which will always appear in Rich Presence.
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,11 @@ in
|
||||||
'';
|
'';
|
||||||
|
|
||||||
detectionMethods =
|
detectionMethods =
|
||||||
helpers.defaultNullOpts.mkNullable (with types; listOf str) ''["lsp" "pattern"]''
|
helpers.defaultNullOpts.mkListOf types.str
|
||||||
|
[
|
||||||
|
"lsp"
|
||||||
|
"pattern"
|
||||||
|
]
|
||||||
''
|
''
|
||||||
Methods of detecting the root directory.
|
Methods of detecting the root directory.
|
||||||
**"lsp"** uses the native neovim lsp, while **"pattern"** uses vim-rooter like glob pattern
|
**"lsp"** uses the native neovim lsp, while **"pattern"** uses vim-rooter like glob pattern
|
||||||
|
@ -48,19 +52,27 @@ in
|
||||||
'';
|
'';
|
||||||
|
|
||||||
patterns =
|
patterns =
|
||||||
helpers.defaultNullOpts.mkNullable (with types; listOf str)
|
helpers.defaultNullOpts.mkListOf types.str
|
||||||
''[".git" "_darcs" ".hg" ".bzr" ".svn" "Makefile" "package.json"]''
|
[
|
||||||
|
".git"
|
||||||
|
"_darcs"
|
||||||
|
".hg"
|
||||||
|
".bzr"
|
||||||
|
".svn"
|
||||||
|
"Makefile"
|
||||||
|
"package.json"
|
||||||
|
]
|
||||||
''
|
''
|
||||||
All the patterns used to detect root dir, when **"pattern"** is in `detectionMethods`.
|
All the patterns used to detect root dir, when **"pattern"** is in `detectionMethods`.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
ignoreLsp = helpers.defaultNullOpts.mkNullable (
|
ignoreLsp =
|
||||||
with types; listOf str
|
helpers.defaultNullOpts.mkListOf types.str [ ]
|
||||||
) "[]" "Table of lsp clients to ignore by name.";
|
"Table of lsp clients to ignore by name.";
|
||||||
|
|
||||||
excludeDirs = helpers.defaultNullOpts.mkNullable (
|
excludeDirs =
|
||||||
with types; listOf str
|
helpers.defaultNullOpts.mkListOf types.str [ ]
|
||||||
) "[]" "Don't calculate root dir on specific directories.";
|
"Don't calculate root dir on specific directories.";
|
||||||
|
|
||||||
showHidden = helpers.defaultNullOpts.mkBool false "Show hidden files in telescope.";
|
showHidden = helpers.defaultNullOpts.mkBool false "Show hidden files in telescope.";
|
||||||
|
|
||||||
|
@ -79,14 +91,11 @@ in
|
||||||
What scope to change the directory.
|
What scope to change the directory.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
dataPath =
|
dataPath = helpers.defaultNullOpts.mkStr {
|
||||||
helpers.defaultNullOpts.mkNullable (with types; either str helpers.nixvimTypes.rawLua)
|
__raw = "vim.fn.stdpath('data')";
|
||||||
''{__raw = "vim.fn.stdpath('data')";}''
|
} "Path where project.nvim will store the project history for use in telescope.";
|
||||||
"Path where project.nvim will store the project history for use in telescope.";
|
|
||||||
|
|
||||||
enableTelescope = mkEnableOption ''
|
enableTelescope = mkEnableOption "project-nvim telescope integration";
|
||||||
When set to true, enabled project-nvim telescope integration.
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
|
|
@ -43,7 +43,6 @@ helpers.neovim-plugin.mkNeovimPlugin config {
|
||||||
settingsOptions = with helpers.nixvimTypes; {
|
settingsOptions = with helpers.nixvimTypes; {
|
||||||
prompt_func_return_type =
|
prompt_func_return_type =
|
||||||
helpers.defaultNullOpts.mkAttrsOf bool
|
helpers.defaultNullOpts.mkAttrsOf bool
|
||||||
''
|
|
||||||
{
|
{
|
||||||
go = false;
|
go = false;
|
||||||
java = false;
|
java = false;
|
||||||
|
@ -53,7 +52,6 @@ helpers.neovim-plugin.mkNeovimPlugin config {
|
||||||
hpp = false;
|
hpp = false;
|
||||||
cxx = false;
|
cxx = false;
|
||||||
}
|
}
|
||||||
''
|
|
||||||
''
|
''
|
||||||
For certain languages like Golang, types are required for functions that return an object(s).
|
For certain languages like Golang, types are required for functions that return an object(s).
|
||||||
Unfortunately, for some functions there is no way to automatically find their type. In those instances,
|
Unfortunately, for some functions there is no way to automatically find their type. In those instances,
|
||||||
|
@ -74,7 +72,6 @@ helpers.neovim-plugin.mkNeovimPlugin config {
|
||||||
|
|
||||||
prompt_func_param_type =
|
prompt_func_param_type =
|
||||||
helpers.defaultNullOpts.mkAttrsOf bool
|
helpers.defaultNullOpts.mkAttrsOf bool
|
||||||
''
|
|
||||||
{
|
{
|
||||||
go = false;
|
go = false;
|
||||||
java = false;
|
java = false;
|
||||||
|
@ -84,7 +81,6 @@ helpers.neovim-plugin.mkNeovimPlugin config {
|
||||||
hpp = false;
|
hpp = false;
|
||||||
cxx = false;
|
cxx = false;
|
||||||
}
|
}
|
||||||
''
|
|
||||||
''
|
''
|
||||||
For certain languages like Golang, types are required for functions parameters.
|
For certain languages like Golang, types are required for functions parameters.
|
||||||
Unfortunately, for some parameters there is no way to automatically find their type. In those instances,
|
Unfortunately, for some parameters there is no way to automatically find their type. In those instances,
|
||||||
|
@ -102,7 +98,7 @@ helpers.neovim-plugin.mkNeovimPlugin config {
|
||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
printf_statements = helpers.defaultNullOpts.mkAttrsOf (listOf (maybeRaw str)) "{ }" ''
|
printf_statements = helpers.defaultNullOpts.mkAttrsOf (listOf (maybeRaw str)) { } ''
|
||||||
In any custom printf statement, it is possible to optionally add a **max of one `%s` pattern**, which is where the debug path will go.
|
In any custom printf statement, it is possible to optionally add a **max of one `%s` pattern**, which is where the debug path will go.
|
||||||
For an example custom printf statement, go to [this folder][folder], select your language, and click on `multiple-statements/printf.config`.
|
For an example custom printf statement, go to [this folder][folder], select your language, and click on `multiple-statements/printf.config`.
|
||||||
|
|
||||||
|
@ -121,7 +117,7 @@ helpers.neovim-plugin.mkNeovimPlugin config {
|
||||||
[folder]: https://github.com/ThePrimeagen/refactoring.nvim/blob/master/lua/refactoring/tests/debug/printf
|
[folder]: https://github.com/ThePrimeagen/refactoring.nvim/blob/master/lua/refactoring/tests/debug/printf
|
||||||
'';
|
'';
|
||||||
|
|
||||||
print_var_statements = helpers.defaultNullOpts.mkAttrsOf (listOf (maybeRaw str)) "{ }" ''
|
print_var_statements = helpers.defaultNullOpts.mkAttrsOf (listOf (maybeRaw str)) { } ''
|
||||||
In any custom print var statement, it is possible to optionally add a **max of two `%s` patterns**, which is where the debug path and
|
In any custom print var statement, it is possible to optionally add a **max of two `%s` patterns**, which is where the debug path and
|
||||||
the actual variable reference will go, respectively. To add a literal `"%s"` to the string, escape the sequence like this: `%%s`.
|
the actual variable reference will go, respectively. To add a literal `"%s"` to the string, escape the sequence like this: `%%s`.
|
||||||
For an example custom print var statement, go to [this folder][folder], select your language, and view `multiple-statements/print_var.config`.
|
For an example custom print var statement, go to [this folder][folder], select your language, and view `multiple-statements/print_var.config`.
|
||||||
|
@ -141,7 +137,7 @@ helpers.neovim-plugin.mkNeovimPlugin config {
|
||||||
[folder]: https://github.com/ThePrimeagen/refactoring.nvim/blob/master/lua/refactoring/tests/debug/print_var
|
[folder]: https://github.com/ThePrimeagen/refactoring.nvim/blob/master/lua/refactoring/tests/debug/print_var
|
||||||
'';
|
'';
|
||||||
|
|
||||||
extract_var_statements = helpers.defaultNullOpts.mkAttrsOf str "{ }" ''
|
extract_var_statements = helpers.defaultNullOpts.mkAttrsOf str { } ''
|
||||||
When performing an `extract_var` refactor operation, you can custom how the new variable would be declared by setting configuration
|
When performing an `extract_var` refactor operation, you can custom how the new variable would be declared by setting configuration
|
||||||
like the below example.
|
like the below example.
|
||||||
|
|
||||||
|
|
|
@ -287,8 +287,7 @@ helpers.neovim-plugin.mkNeovimPlugin config {
|
||||||
Whether to enable statistics or not.
|
Whether to enable statistics or not.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
stats = helpers.defaultNullOpts.mkListOf (with types; attrsOf str) ''
|
stats = helpers.defaultNullOpts.mkListOf (with types; attrsOf str) [
|
||||||
[
|
|
||||||
{
|
{
|
||||||
__unkeyed = "total_time";
|
__unkeyed = "total_time";
|
||||||
title = "Time taken:";
|
title = "Time taken:";
|
||||||
|
@ -297,8 +296,7 @@ helpers.neovim-plugin.mkNeovimPlugin config {
|
||||||
__unkeyed = "size_download_t";
|
__unkeyed = "size_download_t";
|
||||||
title = "Download size:";
|
title = "Download size:";
|
||||||
}
|
}
|
||||||
]
|
] "See https://curl.se/libcurl/c/curl_easy_getinfo.html.";
|
||||||
'' "See https://curl.se/libcurl/c/curl_easy_getinfo.html.";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
formatters = {
|
formatters = {
|
||||||
|
@ -306,9 +304,8 @@ helpers.neovim-plugin.mkNeovimPlugin config {
|
||||||
JSON formatter.
|
JSON formatter.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
html = helpers.defaultNullOpts.mkStr ''
|
html = helpers.defaultNullOpts.mkStr {
|
||||||
{
|
__raw = ''
|
||||||
__raw = \'\'
|
|
||||||
function(body)
|
function(body)
|
||||||
if vim.fn.executable("tidy") == 0 then
|
if vim.fn.executable("tidy") == 0 then
|
||||||
return body, { found = false, name = "tidy" }
|
return body, { found = false, name = "tidy" }
|
||||||
|
@ -326,9 +323,8 @@ helpers.neovim-plugin.mkNeovimPlugin config {
|
||||||
|
|
||||||
return fmt_body, { found = true, name = "tidy" }
|
return fmt_body, { found = true, name = "tidy" }
|
||||||
end
|
end
|
||||||
\'\';
|
'';
|
||||||
}
|
} "HTML formatter.";
|
||||||
'' "HTML formatter.";
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -359,7 +355,6 @@ helpers.neovim-plugin.mkNeovimPlugin config {
|
||||||
|
|
||||||
keybinds =
|
keybinds =
|
||||||
helpers.defaultNullOpts.mkListOf (with types; listOf str)
|
helpers.defaultNullOpts.mkListOf (with types; listOf str)
|
||||||
''
|
|
||||||
[
|
[
|
||||||
[
|
[
|
||||||
"<localleader>rr"
|
"<localleader>rr"
|
||||||
|
@ -372,7 +367,6 @@ helpers.neovim-plugin.mkNeovimPlugin config {
|
||||||
"Re-run latest request"
|
"Re-run latest request"
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
''
|
|
||||||
''
|
''
|
||||||
Declare some keybindings.
|
Declare some keybindings.
|
||||||
Format: list of 3 strings lists: key, action and description.
|
Format: list of 3 strings lists: key, action and description.
|
||||||
|
|
|
@ -36,7 +36,7 @@ helpers.neovim-plugin.mkNeovimPlugin config {
|
||||||
description = "Executable to run.";
|
description = "Executable to run.";
|
||||||
};
|
};
|
||||||
|
|
||||||
args = helpers.defaultNullOpts.mkListOf types.str "[]" ''
|
args = helpers.defaultNullOpts.mkListOf types.str [ ] ''
|
||||||
List of arguments to provide to the engine.
|
List of arguments to provide to the engine.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@ helpers.neovim-plugin.mkNeovimPlugin config {
|
||||||
The description for this option.
|
The description for this option.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
}) "{}" "The options for this engine.";
|
}) { } "The options for this engine.";
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
|
@ -93,8 +93,7 @@ helpers.neovim-plugin.mkNeovimPlugin config {
|
||||||
|
|
||||||
line_sep = helpers.defaultNullOpts.mkStr "└──────────────────────────────────────────────────────" "Line separator.";
|
line_sep = helpers.defaultNullOpts.mkStr "└──────────────────────────────────────────────────────" "Line separator.";
|
||||||
|
|
||||||
highlight = helpers.defaultNullOpts.mkAttrsOf types.str ''
|
highlight = helpers.defaultNullOpts.mkAttrsOf types.str {
|
||||||
{
|
|
||||||
headers = "SpectreHeader";
|
headers = "SpectreHeader";
|
||||||
ui = "SpectreBody";
|
ui = "SpectreBody";
|
||||||
filename = "SpectreFile";
|
filename = "SpectreFile";
|
||||||
|
@ -102,8 +101,7 @@ helpers.neovim-plugin.mkNeovimPlugin config {
|
||||||
search = "SpectreSearch";
|
search = "SpectreSearch";
|
||||||
border = "SpectreBorder";
|
border = "SpectreBorder";
|
||||||
replace = "SpectreReplace";
|
replace = "SpectreReplace";
|
||||||
}
|
} "Highlight groups.";
|
||||||
'' "Highlight groups.";
|
|
||||||
|
|
||||||
mapping =
|
mapping =
|
||||||
helpers.mkNullOrOption
|
helpers.mkNullOrOption
|
||||||
|
@ -144,7 +142,7 @@ helpers.neovim-plugin.mkNeovimPlugin config {
|
||||||
Which find engine to use. Pick one from the `find_engine` list.
|
Which find engine to use. Pick one from the `find_engine` list.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
options = helpers.defaultNullOpts.mkListOf types.str ''["ignore-case"]'' ''
|
options = helpers.defaultNullOpts.mkListOf types.str [ "ignore-case" ] ''
|
||||||
Options to use for this engine.
|
Options to use for this engine.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
@ -154,7 +152,7 @@ helpers.neovim-plugin.mkNeovimPlugin config {
|
||||||
Which find engine to use. Pick one from the `replace_engine` list.
|
Which find engine to use. Pick one from the `replace_engine` list.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
options = helpers.defaultNullOpts.mkListOf types.str "[]" ''
|
options = helpers.defaultNullOpts.mkListOf types.str [ ] ''
|
||||||
Options to use for this engine.
|
Options to use for this engine.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
|
@ -74,7 +74,7 @@ with lib;
|
||||||
attrs
|
attrs
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
"[]"
|
[ ]
|
||||||
''
|
''
|
||||||
A list of files or directories to bookmark.
|
A list of files or directories to bookmark.
|
||||||
The list can contain two kinds of types.
|
The list can contain two kinds of types.
|
||||||
|
@ -91,7 +91,7 @@ with lib;
|
||||||
(listOf str)
|
(listOf str)
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
"[]"
|
[ ]
|
||||||
''
|
''
|
||||||
A list of commands to execute on selection.
|
A list of commands to execute on selection.
|
||||||
Leading colons are optional.
|
Leading colons are optional.
|
||||||
|
@ -132,7 +132,7 @@ with lib;
|
||||||
NOTE: This option is affected by `session_delete_buffers`.
|
NOTE: This option is affected by `session_delete_buffers`.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
session_before_save = helpers.defaultNullOpts.mkListOf types.str "[]" ''
|
session_before_save = helpers.defaultNullOpts.mkListOf types.str [ ] ''
|
||||||
This is a list of commands to be executed before saving a session.
|
This is a list of commands to be executed before saving a session.
|
||||||
|
|
||||||
Example: `["silent! tabdo NERDTreeClose"]`
|
Example: `["silent! tabdo NERDTreeClose"]`
|
||||||
|
@ -181,7 +181,7 @@ with lib;
|
||||||
Affects `change_to_dir` and `change_to_vcs_root`.
|
Affects `change_to_dir` and `change_to_vcs_root`.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
skiplist = helpers.defaultNullOpts.mkListOf types.str "[]" ''
|
skiplist = helpers.defaultNullOpts.mkListOf types.str [ ] ''
|
||||||
A list of Vim regular expressions that is used to filter recently used files.
|
A list of Vim regular expressions that is used to filter recently used files.
|
||||||
See `|pattern.txt|` for what patterns can be used.
|
See `|pattern.txt|` for what patterns can be used.
|
||||||
|
|
||||||
|
@ -227,7 +227,7 @@ with lib;
|
||||||
The number of spaces used for left padding.
|
The number of spaces used for left padding.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
skiplist_server = helpers.defaultNullOpts.mkListOf (with helpers.nixvimTypes; maybeRaw str) "[]" ''
|
skiplist_server = helpers.defaultNullOpts.mkListOf (with helpers.nixvimTypes; maybeRaw str) [ ] ''
|
||||||
Do not create the startify buffer, if this is a Vim server instance with a name contained in
|
Do not create the startify buffer, if this is a Vim server instance with a name contained in
|
||||||
this list.
|
this list.
|
||||||
|
|
||||||
|
@ -255,7 +255,7 @@ with lib;
|
||||||
- don't filter through the bookmark list
|
- don't filter through the bookmark list
|
||||||
'';
|
'';
|
||||||
|
|
||||||
session_remove_lines = helpers.defaultNullOpts.mkListOf types.str "[]" ''
|
session_remove_lines = helpers.defaultNullOpts.mkListOf types.str [ ] ''
|
||||||
Lines matching any of the patterns in this list, will be removed from the session file.
|
Lines matching any of the patterns in this list, will be removed from the session file.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
@ -272,7 +272,7 @@ with lib;
|
||||||
probably get problems when trying to load it.
|
probably get problems when trying to load it.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
session_savevars = helpers.defaultNullOpts.mkListOf types.str "[]" ''
|
session_savevars = helpers.defaultNullOpts.mkListOf types.str [ ] ''
|
||||||
Include a list of variables in here which you would like Startify to save into the session file
|
Include a list of variables in here which you would like Startify to save into the session file
|
||||||
in addition to what Vim normally saves into the session file.
|
in addition to what Vim normally saves into the session file.
|
||||||
|
|
||||||
|
@ -286,7 +286,7 @@ with lib;
|
||||||
```
|
```
|
||||||
'';
|
'';
|
||||||
|
|
||||||
session_savecmds = helpers.defaultNullOpts.mkListOf types.str "[]" ''
|
session_savecmds = helpers.defaultNullOpts.mkListOf types.str [ ] ''
|
||||||
Include a list of cmdline commands which Vim will run upon loading the session.
|
Include a list of cmdline commands which Vim will run upon loading the session.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
@ -307,33 +307,33 @@ with lib;
|
||||||
alphabetically.
|
alphabetically.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
custom_indices =
|
custom_indices = helpers.defaultNullOpts.mkListOf' {
|
||||||
helpers.defaultNullOpts.mkNullable (with helpers.nixvimTypes; maybeRaw (listOf str)) "[]"
|
type = types.str;
|
||||||
''
|
pluginDefault = [ ];
|
||||||
|
description = ''
|
||||||
Use any list of strings as indices instead of increasing numbers. If there are more startify
|
Use any list of strings as indices instead of increasing numbers. If there are more startify
|
||||||
entries than actual items in the custom list, the remaining entries will be filled using the
|
entries than actual items in the custom list, the remaining entries will be filled using the
|
||||||
default numbering scheme starting from 0.
|
default numbering scheme starting from 0.
|
||||||
|
|
||||||
Thus you can create your own indexing scheme that fits your keyboard layout.
|
Thus you can create your own indexing scheme that fits your keyboard layout.
|
||||||
You don't want to leave the home row, do you?!
|
You don't want to leave the home row, do you?!
|
||||||
|
|
||||||
Example:
|
|
||||||
```nix
|
|
||||||
["f" "g" "h"]
|
|
||||||
```
|
|
||||||
'';
|
'';
|
||||||
|
example = [
|
||||||
|
"f"
|
||||||
|
"g"
|
||||||
|
"h"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
custom_header =
|
custom_header = helpers.defaultNullOpts.mkListOf' {
|
||||||
helpers.mkNullOrOption (with helpers.nixvimTypes; maybeRaw (listOf (maybeRaw str)))
|
type = types.str;
|
||||||
''
|
description = ''
|
||||||
Define your own header.
|
Define your own header.
|
||||||
|
|
||||||
This option takes a `list of strings`, whereas each string will be put on its own line.
|
This option takes a `list of strings`, whereas each string will be put on its own line.
|
||||||
If it is a simple `string`, it should evaluate to a list of strings.
|
If it is a simple `string`, it should evaluate to a list of strings.
|
||||||
|
'';
|
||||||
Example:
|
example = [
|
||||||
```nix
|
|
||||||
[
|
|
||||||
""
|
""
|
||||||
" ███╗ ██╗██╗██╗ ██╗██╗ ██╗██╗███╗ ███╗"
|
" ███╗ ██╗██╗██╗ ██╗██╗ ██╗██╗███╗ ███╗"
|
||||||
" ████╗ ██║██║╚██╗██╔╝██║ ██║██║████╗ ████║"
|
" ████╗ ██║██║╚██╗██╔╝██║ ██║██║████╗ ████║"
|
||||||
|
@ -341,25 +341,35 @@ with lib;
|
||||||
" ██║╚██╗██║██║ ██╔██╗ ╚██╗ ██╔╝██║██║╚██╔╝██║"
|
" ██║╚██╗██║██║ ██╔██╗ ╚██╗ ██╔╝██║██║╚██╔╝██║"
|
||||||
" ██║ ╚████║██║██╔╝ ██╗ ╚████╔╝ ██║██║ ╚═╝ ██║"
|
" ██║ ╚████║██║██╔╝ ██╗ ╚████╔╝ ██║██║ ╚═╝ ██║"
|
||||||
" ╚═╝ ╚═══╝╚═╝╚═╝ ╚═╝ ╚═══╝ ╚═╝╚═╝ ╚═╝"
|
" ╚═╝ ╚═══╝╚═╝╚═╝ ╚═╝ ╚═══╝ ╚═╝╚═╝ ╚═╝"
|
||||||
]
|
];
|
||||||
```
|
};
|
||||||
'';
|
|
||||||
|
|
||||||
custom_header_quotes = helpers.defaultNullOpts.mkListOf (with types; listOf str) "[]" ''
|
custom_header_quotes = helpers.defaultNullOpts.mkListOf' {
|
||||||
Example:
|
type = with types; listOf str;
|
||||||
```nix
|
pluginDefault = [ ];
|
||||||
[
|
description = ''
|
||||||
|
If you don't set `custom_header`, the internal cowsay implementation with
|
||||||
|
predefined random quotes will be used.
|
||||||
|
|
||||||
|
To use your own quotes, set this option to a list of quotes. Each quote is
|
||||||
|
either another list or a `|Funcref|` (see `|expr-lambda|`) that returns a list.
|
||||||
|
'';
|
||||||
|
example = [
|
||||||
[ "quote #1" ]
|
[ "quote #1" ]
|
||||||
["quote #2" "using" "three lines"]
|
[
|
||||||
|
"quote #2"
|
||||||
|
"using"
|
||||||
|
"three lines"
|
||||||
]
|
]
|
||||||
```
|
];
|
||||||
'';
|
};
|
||||||
|
|
||||||
custom_footer =
|
custom_footer = helpers.defaultNullOpts.mkListOf' {
|
||||||
helpers.mkNullOrOption (with helpers.nixvimTypes; maybeRaw (listOf (maybeRaw str)))
|
type = types.str;
|
||||||
''
|
description = ''
|
||||||
Same as the custom header, but shown at the bottom of the startify buffer.
|
Same as the custom header, but shown at the bottom of the startify buffer.
|
||||||
'';
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
disable_at_vimenter = helpers.defaultNullOpts.mkBool false ''
|
disable_at_vimenter = helpers.defaultNullOpts.mkBool false ''
|
||||||
Don't run Startify at Vim startup.
|
Don't run Startify at Vim startup.
|
||||||
|
|
|
@ -65,7 +65,7 @@ in
|
||||||
'';
|
'';
|
||||||
|
|
||||||
margin =
|
margin =
|
||||||
helpers.defaultNullOpts.mkNullable (with types; either (numbers.between 0.0 1.0) ints.positive) "5"
|
helpers.defaultNullOpts.mkNullable (with types; either (numbers.between 0.0 1.0) ints.positive) 5
|
||||||
''
|
''
|
||||||
The margin for left or right alignment.
|
The margin for left or right alignment.
|
||||||
- if < 1 fraction of screen width
|
- if < 1 fraction of screen width
|
||||||
|
@ -179,8 +179,7 @@ in
|
||||||
'';
|
'';
|
||||||
|
|
||||||
cursorColumn =
|
cursorColumn =
|
||||||
helpers.defaultNullOpts.mkNullable (with types; either (numbers.between 0.0 1.0) ints.positive)
|
helpers.defaultNullOpts.mkNullable (with types; either (numbers.between 0.0 1.0) ints.positive) 0.5
|
||||||
"0.5"
|
|
||||||
''
|
''
|
||||||
- if < 1, fraction of screen width
|
- if < 1, fraction of screen width
|
||||||
- if > 1 numbers of column
|
- if > 1 numbers of column
|
||||||
|
@ -198,7 +197,7 @@ in
|
||||||
Disable status-, buffer- and tablines.
|
Disable status-, buffer- and tablines.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
paddings = helpers.defaultNullOpts.mkNullable (with types; listOf ints.unsigned) "[]" ''
|
paddings = helpers.defaultNullOpts.mkListOf types.ints.unsigned [ ] ''
|
||||||
Amount of empty lines before each section (must be equal to amount of sections).
|
Amount of empty lines before each section (must be equal to amount of sections).
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
|
@ -81,7 +81,7 @@ helpers.neovim-plugin.mkNeovimPlugin config {
|
||||||
];
|
];
|
||||||
|
|
||||||
settingsOptions = {
|
settingsOptions = {
|
||||||
size = helpers.defaultNullOpts.mkStrLuaFnOr types.number "12" ''
|
size = helpers.defaultNullOpts.mkStrLuaFnOr types.number 12 ''
|
||||||
Size of the terminal.
|
Size of the terminal.
|
||||||
`size` can be a number or a function.
|
`size` can be a number or a function.
|
||||||
|
|
||||||
|
@ -149,7 +149,7 @@ helpers.neovim-plugin.mkNeovimPlugin config {
|
||||||
Hide the number column in toggleterm buffers.
|
Hide the number column in toggleterm buffers.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
shade_filetypes = helpers.defaultNullOpts.mkListOf types.str "[]" ''
|
shade_filetypes = helpers.defaultNullOpts.mkListOf types.str [ ] ''
|
||||||
Shade filetypes.
|
Shade filetypes.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
@ -158,8 +158,7 @@ helpers.neovim-plugin.mkNeovimPlugin config {
|
||||||
opened.
|
opened.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
highlights = helpers.defaultNullOpts.mkAttrsOf helpers.nixvimTypes.highlight ''
|
highlights = helpers.defaultNullOpts.mkAttrsOf helpers.nixvimTypes.highlight {
|
||||||
{
|
|
||||||
NormalFloat.link = "Normal";
|
NormalFloat.link = "Normal";
|
||||||
FloatBorder.link = "Normal";
|
FloatBorder.link = "Normal";
|
||||||
StatusLine.gui = "NONE";
|
StatusLine.gui = "NONE";
|
||||||
|
@ -167,8 +166,7 @@ helpers.neovim-plugin.mkNeovimPlugin config {
|
||||||
cterm = "italic";
|
cterm = "italic";
|
||||||
gui = "NONE";
|
gui = "NONE";
|
||||||
};
|
};
|
||||||
}
|
} "Highlights which map a highlight group name to an attrs of it's values.";
|
||||||
'' "Highlights which map a highlight group name to an attrs of it's values.";
|
|
||||||
|
|
||||||
shade_terminals = helpers.defaultNullOpts.mkBool true ''
|
shade_terminals = helpers.defaultNullOpts.mkBool true ''
|
||||||
NOTE: This option takes priority over highlights specified so if you specify Normal
|
NOTE: This option takes priority over highlights specified so if you specify Normal
|
||||||
|
@ -212,7 +210,7 @@ helpers.neovim-plugin.mkNeovimPlugin config {
|
||||||
Close the terminal window when the process exits.
|
Close the terminal window when the process exits.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
shell = helpers.defaultNullOpts.mkStr ''{__raw = "vim.o.shell";}'' ''
|
shell = helpers.defaultNullOpts.mkStr { __raw = "vim.o.shell"; } ''
|
||||||
Change the default shell.
|
Change the default shell.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ helpers.neovim-plugin.mkNeovimPlugin config {
|
||||||
maintainers = [ maintainers.GaetanLepage ];
|
maintainers = [ maintainers.GaetanLepage ];
|
||||||
|
|
||||||
settingsOptions = {
|
settingsOptions = {
|
||||||
ft_blocklist = helpers.defaultNullOpts.mkListOf types.str "[]" ''
|
ft_blocklist = helpers.defaultNullOpts.mkListOf types.str [ ] ''
|
||||||
Filetypes to exclude.
|
Filetypes to exclude.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@ with lib;
|
||||||
treesitterIntegration = {
|
treesitterIntegration = {
|
||||||
enable = mkEnableOption "treesitter integration";
|
enable = mkEnableOption "treesitter integration";
|
||||||
disable =
|
disable =
|
||||||
helpers.defaultNullOpts.mkNullable (types.listOf types.str) "[]"
|
helpers.defaultNullOpts.mkListOf types.str [ ]
|
||||||
"Languages for each to disable this module";
|
"Languages for each to disable this module";
|
||||||
|
|
||||||
disableVirtualText = helpers.defaultNullOpts.mkBool false ''
|
disableVirtualText = helpers.defaultNullOpts.mkBool false ''
|
||||||
|
@ -66,7 +66,7 @@ with lib;
|
||||||
This is intended to prevent flickering while scrolling with j and k.
|
This is intended to prevent flickering while scrolling with j and k.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
}) ''{method = "status";}'' "Dictionary controlling the behavior with off-screen matches.";
|
}) { method = "status"; } "Dictionary controlling the behavior with off-screen matches.";
|
||||||
|
|
||||||
stopline = helpers.defaultNullOpts.mkInt 400 ''
|
stopline = helpers.defaultNullOpts.mkInt 400 ''
|
||||||
The number of lines to search in either direction while highlighting matches.
|
The number of lines to search in either direction while highlighting matches.
|
||||||
|
@ -123,9 +123,10 @@ with lib;
|
||||||
textObj = {
|
textObj = {
|
||||||
enable = helpers.defaultNullOpts.mkBool true "Controls text objects";
|
enable = helpers.defaultNullOpts.mkBool true "Controls text objects";
|
||||||
|
|
||||||
linewiseOperators =
|
linewiseOperators = helpers.defaultNullOpts.mkListOf types.str [
|
||||||
helpers.defaultNullOpts.mkNullable (types.listOf types.str) ''["d" "y"]''
|
"d"
|
||||||
"Modify the set of operators which may operate line-wise";
|
"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";
|
||||||
|
@ -138,13 +139,12 @@ with lib;
|
||||||
'';
|
'';
|
||||||
|
|
||||||
delimNoSkips =
|
delimNoSkips =
|
||||||
helpers.defaultNullOpts.mkNullable
|
helpers.defaultNullOpts.mkEnumFirstDefault
|
||||||
(types.enum [
|
[
|
||||||
0
|
0
|
||||||
1
|
1
|
||||||
2
|
2
|
||||||
])
|
]
|
||||||
"0"
|
|
||||||
''
|
''
|
||||||
To disable matching within strings and comments:
|
To disable matching within strings and comments:
|
||||||
- 0: matching is enabled within strings and comments
|
- 0: matching is enabled within strings and comments
|
||||||
|
|
|
@ -42,12 +42,12 @@ with lib;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
operators = helpers.defaultNullOpts.mkNullable (types.attrsOf types.str) ''{gc = "Comments";}'' ''
|
operators = helpers.defaultNullOpts.mkAttrsOf types.str { gc = "Comments"; } ''
|
||||||
add operators that will trigger motion and text object completion
|
add operators that will trigger motion and text object completion
|
||||||
to enable all native operators, set the preset / operators plugin above
|
to enable all native operators, set the preset / operators plugin above
|
||||||
'';
|
'';
|
||||||
|
|
||||||
keyLabels = helpers.defaultNullOpts.mkNullable (types.attrsOf types.str) ''{}'' ''
|
keyLabels = helpers.defaultNullOpts.mkAttrsOf types.str { } ''
|
||||||
override the label used to display some keys. It doesn't effect WK in any other way.
|
override the label used to display some keys. It doesn't effect WK in any other way.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
@ -92,15 +92,21 @@ with lib;
|
||||||
"bottom"
|
"bottom"
|
||||||
"top"
|
"top"
|
||||||
] "";
|
] "";
|
||||||
margin =
|
margin = helpers.defaultNullOpts.mkNullable spacingOptions {
|
||||||
helpers.defaultNullOpts.mkNullable spacingOptions ''{top = 1; right = 0; bottom = 1; left = 0;}''
|
top = 1;
|
||||||
"extra window margin";
|
right = 0;
|
||||||
padding =
|
bottom = 1;
|
||||||
helpers.defaultNullOpts.mkNullable spacingOptions ''{top = 1; right = 2; bottom = 1; left = 2;}''
|
left = 0;
|
||||||
"extra window padding";
|
} "extra window margin";
|
||||||
|
padding = helpers.defaultNullOpts.mkNullable spacingOptions {
|
||||||
|
top = 1;
|
||||||
|
right = 2;
|
||||||
|
bottom = 1;
|
||||||
|
left = 2;
|
||||||
|
} "extra window padding";
|
||||||
winblend = helpers.defaultNullOpts.mkNullable (types.ints.between 0
|
winblend = helpers.defaultNullOpts.mkNullable (types.ints.between 0
|
||||||
100
|
100
|
||||||
) "0" "0 for fully opaque and 100 for fully transparent";
|
) 0 "0 for fully opaque and 100 for fully transparent";
|
||||||
};
|
};
|
||||||
|
|
||||||
layout =
|
layout =
|
||||||
|
@ -137,38 +143,60 @@ with lib;
|
||||||
|
|
||||||
ignoreMissing = helpers.defaultNullOpts.mkBool false "enable this to hide mappings for which you didn't specify a label";
|
ignoreMissing = helpers.defaultNullOpts.mkBool false "enable this to hide mappings for which you didn't specify a label";
|
||||||
|
|
||||||
hidden = helpers.defaultNullOpts.mkNullable (types.listOf types.str) ''
|
hidden = helpers.defaultNullOpts.mkListOf types.str [
|
||||||
["<silent>" "<cmd>" "<Cmd>" "<CR>" "^:" "^ " "^call " "^lua "]
|
"<silent>"
|
||||||
'' "hide mapping boilerplate";
|
"<cmd>"
|
||||||
|
"<Cmd>"
|
||||||
|
"<CR>"
|
||||||
|
"^:"
|
||||||
|
"^ "
|
||||||
|
"^call "
|
||||||
|
"^lua "
|
||||||
|
] "hide mapping boilerplate";
|
||||||
|
|
||||||
showHelp = helpers.defaultNullOpts.mkBool true "show a help message in the command line for using WhichKey";
|
showHelp = helpers.defaultNullOpts.mkBool true "show a help message in the command line for using WhichKey";
|
||||||
|
|
||||||
showKeys = helpers.defaultNullOpts.mkBool true "show the currently pressed key and its label as a message in the command line";
|
showKeys = helpers.defaultNullOpts.mkBool true "show the currently pressed key and its label as a message in the command line";
|
||||||
|
|
||||||
triggers = helpers.defaultNullOpts.mkNullable (types.either (types.enum [ "auto" ]) (
|
triggers = helpers.defaultNullOpts.mkNullable (
|
||||||
types.listOf types.str
|
with types; either (enum [ "auto" ]) (listOf str)
|
||||||
)) ''"auto"'' "automatically setup triggers, or specify a list manually";
|
) "auto" "automatically setup triggers, or specify a list manually";
|
||||||
|
|
||||||
triggersNoWait =
|
triggersNoWait =
|
||||||
helpers.defaultNullOpts.mkNullable (types.listOf types.str)
|
helpers.defaultNullOpts.mkListOf types.str
|
||||||
''["`" "'" "g`" "g'" "\"" "<c-r>" "z="]''
|
[
|
||||||
|
"`"
|
||||||
|
"'"
|
||||||
|
"g`"
|
||||||
|
"g'"
|
||||||
|
"\""
|
||||||
|
"<c-r>"
|
||||||
|
"z="
|
||||||
|
]
|
||||||
''
|
''
|
||||||
list of triggers, where WhichKey should not wait for timeoutlen and show immediately
|
list of triggers, where WhichKey should not wait for timeoutlen and show immediately
|
||||||
'';
|
'';
|
||||||
|
|
||||||
triggersBlackList =
|
triggersBlackList =
|
||||||
helpers.defaultNullOpts.mkNullable (types.attrsOf (types.listOf types.str))
|
helpers.defaultNullOpts.mkAttrsOf (types.listOf types.str)
|
||||||
''{ i = ["j" "k"]; v = ["j" "k"]}}''
|
{
|
||||||
|
i = [
|
||||||
|
"j"
|
||||||
|
"k"
|
||||||
|
];
|
||||||
|
v = [
|
||||||
|
"j"
|
||||||
|
"k"
|
||||||
|
];
|
||||||
|
}
|
||||||
''
|
''
|
||||||
list of mode / prefixes that should never be hooked by WhichKey
|
list of mode / prefixes that should never be hooked by WhichKey
|
||||||
this is mostly relevant for keymaps that start with a native binding
|
this is mostly relevant for keymaps that start with a native binding
|
||||||
'';
|
'';
|
||||||
|
|
||||||
disable = {
|
disable = {
|
||||||
buftypes =
|
buftypes = helpers.defaultNullOpts.mkListOf types.str [ ] "Disabled by default for Telescope";
|
||||||
helpers.defaultNullOpts.mkNullable (types.listOf types.str) "[]"
|
filetypes = helpers.defaultNullOpts.mkListOf types.str [ ] "";
|
||||||
"Disabled by default for Telescope";
|
|
||||||
filetypes = helpers.defaultNullOpts.mkNullable (types.listOf types.str) "[]" "";
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -76,20 +76,17 @@ in
|
||||||
'';
|
'';
|
||||||
|
|
||||||
modes =
|
modes =
|
||||||
helpers.defaultNullOpts.mkNullable
|
helpers.defaultNullOpts.mkListOf
|
||||||
(
|
(types.enum [
|
||||||
with types;
|
|
||||||
listOf (enum [
|
|
||||||
"/"
|
"/"
|
||||||
"?"
|
"?"
|
||||||
":"
|
":"
|
||||||
])
|
])
|
||||||
)
|
[
|
||||||
''["/" "?"]''
|
"/"
|
||||||
''
|
"?"
|
||||||
List of modes which wilderw will be active in.
|
]
|
||||||
Possible elements: '/', '?' and ':'
|
"List of modes that wilder will be active in.";
|
||||||
'';
|
|
||||||
|
|
||||||
wildcharm =
|
wildcharm =
|
||||||
helpers.defaultNullOpts.mkNullable (with types; either str (enum [ false ])) "&wildchar"
|
helpers.defaultNullOpts.mkNullable (with types; either str (enum [ false ])) "&wildchar"
|
||||||
|
|
|
@ -45,9 +45,9 @@ in
|
||||||
You can change the storage path using `ring.storagePath` option.
|
You can change the storage path using `ring.storagePath` option.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
storagePath = helpers.defaultNullOpts.mkNullable (
|
storagePath = helpers.defaultNullOpts.mkStr {
|
||||||
with types; either str helpers.nixvimTypes.rawLua
|
__raw = "vim.fn.stdpath('data') .. '/databases/yanky.db'";
|
||||||
) ''{__raw = "vim.fn.stdpath('data') .. '/databases/yanky.db'";}'' "Only for sqlite storage.";
|
} "Only for sqlite storage.";
|
||||||
|
|
||||||
syncWithNumberedRegisters = helpers.defaultNullOpts.mkBool true ''
|
syncWithNumberedRegisters = helpers.defaultNullOpts.mkBool true ''
|
||||||
History can also be synchronized with numbered registers.
|
History can also be synchronized with numbered registers.
|
||||||
|
@ -68,7 +68,7 @@ in
|
||||||
cursor or content changed.
|
cursor or content changed.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
ignoreRegisters = helpers.defaultNullOpts.mkNullable (with types; listOf str) ''["_"]'' ''
|
ignoreRegisters = helpers.defaultNullOpts.mkListOf types.str [ "_" ] ''
|
||||||
Define registers to be ignored.
|
Define registers to be ignored.
|
||||||
By default the black hole register is ignored.
|
By default the black hole register is ignored.
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -25,15 +25,18 @@ with lib;
|
||||||
|
|
||||||
lsp = {
|
lsp = {
|
||||||
config = helpers.neovim-plugin.extraOptionsOptions // {
|
config = helpers.neovim-plugin.extraOptionsOptions // {
|
||||||
cmd = helpers.defaultNullOpts.mkNullable (types.listOf types.str) ''["zk" "lsp"]'' "";
|
cmd = helpers.defaultNullOpts.mkListOf types.str [
|
||||||
|
"zk"
|
||||||
|
"lsp"
|
||||||
|
] "";
|
||||||
name = helpers.defaultNullOpts.mkStr "zk" "";
|
name = helpers.defaultNullOpts.mkStr "zk" "";
|
||||||
};
|
};
|
||||||
|
|
||||||
autoAttach = {
|
autoAttach = {
|
||||||
enabled = helpers.defaultNullOpts.mkBool true "automatically attach buffers in a zk notebook";
|
enabled = helpers.defaultNullOpts.mkBool true "automatically attach buffers in a zk notebook";
|
||||||
filetypes =
|
filetypes = helpers.defaultNullOpts.mkListOf types.str [
|
||||||
helpers.defaultNullOpts.mkNullable (types.listOf types.str) ''["markdown"]''
|
"markdown"
|
||||||
"matching the given filetypes";
|
] "matching the given filetypes";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue