mirror of
https://github.com/nix-community/nixvim.git
synced 2025-11-21 17:59:41 +01:00
treewide: remove internal use of helpers module arg
This commit is contained in:
parent
7add68e918
commit
dad19c1238
68 changed files with 687 additions and 758 deletions
|
|
@ -1,9 +1,4 @@
|
||||||
{
|
{ lib, config, ... }:
|
||||||
lib,
|
|
||||||
helpers,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
let
|
let
|
||||||
commandAttributes = lib.types.submodule {
|
commandAttributes = lib.types.submodule {
|
||||||
options = {
|
options = {
|
||||||
|
|
@ -13,7 +8,7 @@ let
|
||||||
};
|
};
|
||||||
|
|
||||||
nargs =
|
nargs =
|
||||||
helpers.mkNullOrOption
|
lib.nixvim.mkNullOrOption
|
||||||
(lib.types.enum [
|
(lib.types.enum [
|
||||||
0
|
0
|
||||||
1
|
1
|
||||||
|
|
@ -24,11 +19,11 @@ let
|
||||||
''
|
''
|
||||||
The number of arguments to expect, see :h command-nargs.
|
The number of arguments to expect, see :h command-nargs.
|
||||||
'';
|
'';
|
||||||
complete = helpers.mkNullOrOption (with lib.types; either str rawLua) ''
|
complete = lib.nixvim.mkNullOrOption (with lib.types; either str rawLua) ''
|
||||||
Tab-completion behaviour, see :h command-complete.
|
Tab-completion behaviour, see :h command-complete.
|
||||||
'';
|
'';
|
||||||
range =
|
range =
|
||||||
helpers.mkNullOrOption
|
lib.nixvim.mkNullOrOption
|
||||||
(
|
(
|
||||||
with lib.types;
|
with lib.types;
|
||||||
oneOf [
|
oneOf [
|
||||||
|
|
@ -40,18 +35,18 @@ let
|
||||||
''
|
''
|
||||||
Whether the command accepts a range, see :h command-range.
|
Whether the command accepts a range, see :h command-range.
|
||||||
'';
|
'';
|
||||||
count = helpers.mkNullOrOption (with lib.types; either bool int) ''
|
count = lib.nixvim.mkNullOrOption (with lib.types; either bool int) ''
|
||||||
Whether the command accepts a count, see :h command-range.
|
Whether the command accepts a count, see :h command-range.
|
||||||
'';
|
'';
|
||||||
addr = helpers.mkNullOrOption lib.types.str ''
|
addr = lib.nixvim.mkNullOrOption lib.types.str ''
|
||||||
Whether special characters relate to other things, see :h command-addr.
|
Whether special characters relate to other things, see :h command-addr.
|
||||||
'';
|
'';
|
||||||
bang = helpers.defaultNullOpts.mkBool false "Whether this command can take a bang (!).";
|
bang = lib.nixvim.defaultNullOpts.mkBool false "Whether this command can take a bang (!).";
|
||||||
bar = helpers.defaultNullOpts.mkBool false "Whether this command can be followed by a \"|\" and another command.";
|
bar = lib.nixvim.defaultNullOpts.mkBool false "Whether this command can be followed by a \"|\" and another command.";
|
||||||
register = helpers.defaultNullOpts.mkBool false "The first argument to the command can be an optional register.";
|
register = lib.nixvim.defaultNullOpts.mkBool false "The first argument to the command can be an optional register.";
|
||||||
keepscript = helpers.defaultNullOpts.mkBool false "Do not use the location of where the user command was defined for verbose messages, use the location of where the command was invoked.";
|
keepscript = lib.nixvim.defaultNullOpts.mkBool false "Do not use the location of where the user command was defined for verbose messages, use the location of where the command was invoked.";
|
||||||
force = helpers.defaultNullOpts.mkBool false "Overwrite an existing user command.";
|
force = lib.nixvim.defaultNullOpts.mkBool false "Overwrite an existing user command.";
|
||||||
desc = helpers.defaultNullOpts.mkStr "" "A description of the command.";
|
desc = lib.nixvim.defaultNullOpts.mkStr "" "A description of the command.";
|
||||||
|
|
||||||
# TODO: command-preview, need to grab a function here.
|
# TODO: command-preview, need to grab a function here.
|
||||||
};
|
};
|
||||||
|
|
@ -72,7 +67,7 @@ in
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
lib.mkIf (config.userCommands != { }) {
|
lib.mkIf (config.userCommands != { }) {
|
||||||
extraConfigLua = helpers.wrapDo ''
|
extraConfigLua = lib.nixvim.wrapDo ''
|
||||||
local cmds = ${lib.nixvim.toLuaObject (lib.mapAttrs cleanupCommand config.userCommands)};
|
local cmds = ${lib.nixvim.toLuaObject (lib.mapAttrs cleanupCommand config.userCommands)};
|
||||||
for name,cmd in pairs(cmds) do
|
for name,cmd in pairs(cmds) do
|
||||||
vim.api.nvim_create_user_command(name, cmd.command, cmd.options or {})
|
vim.api.nvim_create_user_command(name, cmd.command, cmd.options or {})
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
helpers,
|
|
||||||
pkgs,
|
pkgs,
|
||||||
config,
|
config,
|
||||||
...
|
...
|
||||||
|
|
@ -92,7 +91,7 @@ let
|
||||||
|
|
||||||
# TODO: Added 2024-07-07, remove after 24.11
|
# TODO: Added 2024-07-07, remove after 24.11
|
||||||
# Before we had a fileType, we used types.str.
|
# Before we had a fileType, we used types.str.
|
||||||
coercedFileType = helpers.transitionType lib.types.str (text: { inherit text; }) fileType;
|
coercedFileType = lib.nixvim.transitionType lib.types.str (text: { inherit text; }) fileType;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options = {
|
options = {
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,10 @@
|
||||||
{
|
{ lib, config, ... }:
|
||||||
lib,
|
|
||||||
helpers,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
let
|
let
|
||||||
inherit (lib) types;
|
inherit (lib) types;
|
||||||
|
|
||||||
cfg = config.filetype;
|
cfg = config.filetype;
|
||||||
|
|
||||||
filetypeDefinition = helpers.mkNullOrOption (
|
filetypeDefinition = lib.nixvim.mkNullOrOption (
|
||||||
with types;
|
with types;
|
||||||
attrsOf (oneOf [
|
attrsOf (oneOf [
|
||||||
# Raw filetype
|
# Raw filetype
|
||||||
|
|
@ -42,7 +37,7 @@ let
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.filetype =
|
options.filetype =
|
||||||
helpers.mkCompositeOption
|
lib.nixvim.mkCompositeOption
|
||||||
''
|
''
|
||||||
Define additional filetypes. The values can either be a literal filetype or a function
|
Define additional filetypes. The values can either be a literal filetype or a function
|
||||||
taking the filepath and the buffer number.
|
taking the filepath and the buffer number.
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,20 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
helpers,
|
|
||||||
config,
|
config,
|
||||||
options,
|
options,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
let
|
||||||
|
inherit (lib.nixvim) toLuaObject;
|
||||||
|
inherit (lib.nixvim.keymaps)
|
||||||
|
removeDeprecatedMapAttrs
|
||||||
|
deprecatedMapOptionSubmodule
|
||||||
|
;
|
||||||
|
in
|
||||||
{
|
{
|
||||||
options = {
|
options = {
|
||||||
keymaps = lib.mkOption {
|
keymaps = lib.mkOption {
|
||||||
type = lib.types.listOf helpers.keymaps.deprecatedMapOptionSubmodule;
|
type = lib.types.listOf deprecatedMapOptionSubmodule;
|
||||||
default = [ ];
|
default = [ ];
|
||||||
description = "Nixvim keymaps.";
|
description = "Nixvim keymaps.";
|
||||||
example = [
|
example = [
|
||||||
|
|
@ -21,7 +27,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
keymapsOnEvents = lib.mkOption {
|
keymapsOnEvents = lib.mkOption {
|
||||||
type = lib.types.attrsOf (lib.types.listOf helpers.keymaps.deprecatedMapOptionSubmodule);
|
type = lib.types.attrsOf (lib.types.listOf deprecatedMapOptionSubmodule);
|
||||||
default = { };
|
default = { };
|
||||||
example = {
|
example = {
|
||||||
"InsertEnter" = [
|
"InsertEnter" = [
|
||||||
|
|
@ -69,7 +75,7 @@
|
||||||
The `${lib.showOption opt.loc}' option is deprecated and will be removed in 24.11.
|
The `${lib.showOption opt.loc}' option is deprecated and will be removed in 24.11.
|
||||||
|
|
||||||
You should use a "raw" `action` instead;
|
You should use a "raw" `action` instead;
|
||||||
e.g. `action.__raw = "<lua code>"` or `action = helpers.mkRaw "<lua code>"`.
|
e.g. `action.__raw = "<lua code>"` or `action = lib.nixvim.mkRaw "<lua code>"`.
|
||||||
|
|
||||||
${lib.options.showDefs opt.definitionsWithLocations}
|
${lib.options.showDefs opt.definitionsWithLocations}
|
||||||
''))
|
''))
|
||||||
|
|
@ -78,7 +84,7 @@
|
||||||
extraConfigLua = lib.mkIf (config.keymaps != [ ]) ''
|
extraConfigLua = lib.mkIf (config.keymaps != [ ]) ''
|
||||||
-- Set up keybinds {{{
|
-- Set up keybinds {{{
|
||||||
do
|
do
|
||||||
local __nixvim_binds = ${lib.nixvim.toLuaObject (map helpers.keymaps.removeDeprecatedMapAttrs config.keymaps)}
|
local __nixvim_binds = ${toLuaObject (map removeDeprecatedMapAttrs config.keymaps)}
|
||||||
for i, map in ipairs(__nixvim_binds) do
|
for i, map in ipairs(__nixvim_binds) do
|
||||||
vim.keymap.set(map.mode, map.key, map.action, map.options)
|
vim.keymap.set(map.mode, map.key, map.action, map.options)
|
||||||
end
|
end
|
||||||
|
|
@ -93,10 +99,10 @@
|
||||||
autoCmd = lib.mapAttrsToList (event: mappings: {
|
autoCmd = lib.mapAttrsToList (event: mappings: {
|
||||||
inherit event;
|
inherit event;
|
||||||
group = "nixvim_binds_${event}";
|
group = "nixvim_binds_${event}";
|
||||||
callback = helpers.mkRaw ''
|
callback = lib.nixvim.mkRaw ''
|
||||||
function(args)
|
function(args)
|
||||||
do
|
do
|
||||||
local __nixvim_binds = ${lib.nixvim.toLuaObject (map helpers.keymaps.removeDeprecatedMapAttrs mappings)}
|
local __nixvim_binds = ${toLuaObject (map removeDeprecatedMapAttrs mappings)}
|
||||||
|
|
||||||
for i, map in ipairs(__nixvim_binds) do
|
for i, map in ipairs(__nixvim_binds) do
|
||||||
local options = vim.tbl_extend("keep", map.options or {}, { buffer = args.buf })
|
local options = vim.tbl_extend("keep", map.options or {}, { buffer = args.buf })
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,4 @@
|
||||||
{
|
{ lib, config, ... }:
|
||||||
lib,
|
|
||||||
helpers,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
let
|
let
|
||||||
optionsAttrs = {
|
optionsAttrs = {
|
||||||
opts = {
|
opts = {
|
||||||
|
|
@ -56,7 +51,7 @@ in
|
||||||
config = {
|
config = {
|
||||||
extraConfigLuaPre =
|
extraConfigLuaPre =
|
||||||
let
|
let
|
||||||
content = helpers.concatNonEmptyLines (
|
content = lib.nixvim.concatNonEmptyLines (
|
||||||
lib.mapAttrsToList (
|
lib.mapAttrsToList (
|
||||||
optionName:
|
optionName:
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,4 @@
|
||||||
{
|
{ lib, config, ... }:
|
||||||
lib,
|
|
||||||
config,
|
|
||||||
helpers,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
let
|
let
|
||||||
inherit (lib) types mkOption;
|
inherit (lib) types mkOption;
|
||||||
|
|
||||||
|
|
@ -140,19 +135,19 @@ in
|
||||||
content =
|
content =
|
||||||
if config.type == "lua" then
|
if config.type == "lua" then
|
||||||
# Lua
|
# Lua
|
||||||
helpers.concatNonEmptyLines [
|
lib.nixvim.concatNonEmptyLines [
|
||||||
config.extraConfigLuaPre
|
config.extraConfigLuaPre
|
||||||
(helpers.wrapVimscriptForLua config.extraConfigVim)
|
(lib.nixvim.wrapVimscriptForLua config.extraConfigVim)
|
||||||
config.extraConfigLua
|
config.extraConfigLua
|
||||||
config.extraConfigLuaPost
|
config.extraConfigLuaPost
|
||||||
]
|
]
|
||||||
else
|
else
|
||||||
# Vimscript
|
# Vimscript
|
||||||
helpers.concatNonEmptyLines [
|
lib.nixvim.concatNonEmptyLines [
|
||||||
(helpers.wrapLuaForVimscript config.extraConfigLuaPre)
|
(lib.nixvim.wrapLuaForVimscript config.extraConfigLuaPre)
|
||||||
config.extraConfigVim
|
config.extraConfigVim
|
||||||
(helpers.wrapLuaForVimscript (
|
(lib.nixvim.wrapLuaForVimscript (
|
||||||
helpers.concatNonEmptyLines [
|
lib.nixvim.concatNonEmptyLines [
|
||||||
config.extraConfigLua
|
config.extraConfigLua
|
||||||
config.extraConfigLuaPost
|
config.extraConfigLuaPost
|
||||||
]
|
]
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,6 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
helpers,
|
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
|
|
@ -236,8 +235,8 @@ in
|
||||||
dontFixup = true;
|
dontFixup = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
customRC = helpers.concatNonEmptyLines [
|
customRC = lib.nixvim.concatNonEmptyLines [
|
||||||
(helpers.wrapVimscriptForLua wrappedNeovim.initRc)
|
(lib.nixvim.wrapVimscriptForLua wrappedNeovim.initRc)
|
||||||
config.content
|
config.content
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,4 @@
|
||||||
{
|
{ lib, ... }:
|
||||||
lib,
|
|
||||||
helpers,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
with lib;
|
with lib;
|
||||||
lib.nixvim.plugins.mkNeovimPlugin {
|
lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
name = "arrow";
|
name = "arrow";
|
||||||
|
|
@ -12,73 +8,73 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
maintainers = [ maintainers.hmajid2301 ];
|
maintainers = [ maintainers.hmajid2301 ];
|
||||||
|
|
||||||
settingsOptions = {
|
settingsOptions = {
|
||||||
show_icons = helpers.defaultNullOpts.mkBool false ''
|
show_icons = lib.nixvim.defaultNullOpts.mkBool false ''
|
||||||
If true will show icons.
|
If true will show icons.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
always_show_path = helpers.defaultNullOpts.mkBool false ''
|
always_show_path = lib.nixvim.defaultNullOpts.mkBool false ''
|
||||||
If true will show path.
|
If true will show path.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
separate_by_branch = helpers.defaultNullOpts.mkBool false ''
|
separate_by_branch = lib.nixvim.defaultNullOpts.mkBool false ''
|
||||||
If true will split bookmarks by git branch.
|
If true will split bookmarks by git branch.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
hide_handbook = helpers.defaultNullOpts.mkBool false ''
|
hide_handbook = lib.nixvim.defaultNullOpts.mkBool false ''
|
||||||
If true to hide the shortcuts on menu.
|
If true to hide the shortcuts on menu.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
save_path = helpers.defaultNullOpts.mkLuaFn ''
|
save_path = lib.nixvim.defaultNullOpts.mkLuaFn ''
|
||||||
function()
|
function()
|
||||||
return vim.fn.stdpath("cache") .. "/arrow"
|
return vim.fn.stdpath("cache") .. "/arrow"
|
||||||
end
|
end
|
||||||
'' "Function used to determine where to save arrow data.";
|
'' "Function used to determine where to save arrow data.";
|
||||||
|
|
||||||
mapping = {
|
mapping = {
|
||||||
edit = helpers.defaultNullOpts.mkStr "e" ''
|
edit = lib.nixvim.defaultNullOpts.mkStr "e" ''
|
||||||
Mapping to edit bookmarks.
|
Mapping to edit bookmarks.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
delete_mode = helpers.defaultNullOpts.mkStr "d" ''
|
delete_mode = lib.nixvim.defaultNullOpts.mkStr "d" ''
|
||||||
Mapping to go to delete mode, where you can remove bookmarks.
|
Mapping to go to delete mode, where you can remove bookmarks.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
clear_all_items = helpers.defaultNullOpts.mkStr "C" ''
|
clear_all_items = lib.nixvim.defaultNullOpts.mkStr "C" ''
|
||||||
Mapping to clear all bookmarks.
|
Mapping to clear all bookmarks.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
toggle = helpers.defaultNullOpts.mkStr "s" ''
|
toggle = lib.nixvim.defaultNullOpts.mkStr "s" ''
|
||||||
Mapping to save if `separate_save_and_remove` is true.
|
Mapping to save if `separate_save_and_remove` is true.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
open_vertical = helpers.defaultNullOpts.mkStr "v" ''
|
open_vertical = lib.nixvim.defaultNullOpts.mkStr "v" ''
|
||||||
Mapping to open bookmarks in vertical split.
|
Mapping to open bookmarks in vertical split.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
open_horizontal = helpers.defaultNullOpts.mkStr "-" ''
|
open_horizontal = lib.nixvim.defaultNullOpts.mkStr "-" ''
|
||||||
Mapping to open bookmarks in horizontal split.
|
Mapping to open bookmarks in horizontal split.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
quit = helpers.defaultNullOpts.mkStr "q" ''
|
quit = lib.nixvim.defaultNullOpts.mkStr "q" ''
|
||||||
Mapping to quit arrow.
|
Mapping to quit arrow.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
remove = helpers.defaultNullOpts.mkStr "x" ''
|
remove = lib.nixvim.defaultNullOpts.mkStr "x" ''
|
||||||
Mapping to remove bookmarks. Only used if `separate_save_and_remove` is true.
|
Mapping to remove bookmarks. Only used if `separate_save_and_remove` is true.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
next_item = helpers.defaultNullOpts.mkStr "]" ''
|
next_item = lib.nixvim.defaultNullOpts.mkStr "]" ''
|
||||||
Mapping to go to next bookmark.
|
Mapping to go to next bookmark.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
prev_item = helpers.defaultNullOpts.mkStr "[" ''
|
prev_item = lib.nixvim.defaultNullOpts.mkStr "[" ''
|
||||||
Mapping to go to previous bookmark.
|
Mapping to go to previous bookmark.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
custom_actions = {
|
custom_actions = {
|
||||||
open =
|
open =
|
||||||
helpers.defaultNullOpts.mkLuaFn
|
lib.nixvim.defaultNullOpts.mkLuaFn
|
||||||
''
|
''
|
||||||
function(target_file_name, current_file_name) end
|
function(target_file_name, current_file_name) end
|
||||||
''
|
''
|
||||||
|
|
@ -87,17 +83,17 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
- `current_file_name`: filename from where this was called
|
- `current_file_name`: filename from where this was called
|
||||||
'';
|
'';
|
||||||
|
|
||||||
split_vertical = helpers.defaultNullOpts.mkLuaFn ''
|
split_vertical = lib.nixvim.defaultNullOpts.mkLuaFn ''
|
||||||
function(target_file_name, current_file_name) end
|
function(target_file_name, current_file_name) end
|
||||||
'' "";
|
'' "";
|
||||||
|
|
||||||
split_horizontal = helpers.defaultNullOpts.mkLuaFn ''
|
split_horizontal = lib.nixvim.defaultNullOpts.mkLuaFn ''
|
||||||
function(target_file_name, current_file_name) end
|
function(target_file_name, current_file_name) end
|
||||||
'' "";
|
'' "";
|
||||||
};
|
};
|
||||||
|
|
||||||
window =
|
window =
|
||||||
helpers.defaultNullOpts.mkAttrsOf types.anything
|
lib.nixvim.defaultNullOpts.mkAttrsOf types.anything
|
||||||
{
|
{
|
||||||
relative = "editor";
|
relative = "editor";
|
||||||
width = "auto";
|
width = "auto";
|
||||||
|
|
@ -113,51 +109,51 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
'';
|
'';
|
||||||
|
|
||||||
per_buffer_config = {
|
per_buffer_config = {
|
||||||
lines = helpers.defaultNullOpts.mkInt 4 ''
|
lines = lib.nixvim.defaultNullOpts.mkInt 4 ''
|
||||||
Number of lines on preview.
|
Number of lines on preview.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
sort_automatically = helpers.defaultNullOpts.mkBool true ''
|
sort_automatically = lib.nixvim.defaultNullOpts.mkBool true ''
|
||||||
If true will sort buffer marks automatically.
|
If true will sort buffer marks automatically.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
satellite = {
|
satellite = {
|
||||||
enable = helpers.defaultNullOpts.mkBool false ''
|
enable = lib.nixvim.defaultNullOpts.mkBool false ''
|
||||||
If true will display arrow index in scrollbar at every update.
|
If true will display arrow index in scrollbar at every update.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
overlap = helpers.defaultNullOpts.mkBool false '''';
|
overlap = lib.nixvim.defaultNullOpts.mkBool false '''';
|
||||||
|
|
||||||
priority = helpers.defaultNullOpts.mkInt 1000 '''';
|
priority = lib.nixvim.defaultNullOpts.mkInt 1000 '''';
|
||||||
};
|
};
|
||||||
|
|
||||||
zindex = helpers.defaultNullOpts.mkInt 50 ''
|
zindex = lib.nixvim.defaultNullOpts.mkInt 50 ''
|
||||||
Z index of the buffer.
|
Z index of the buffer.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
separate_save_and_remove = helpers.defaultNullOpts.mkBool false ''
|
separate_save_and_remove = lib.nixvim.defaultNullOpts.mkBool false ''
|
||||||
If true will remove the toggle and create the save/remove keymaps.
|
If true will remove the toggle and create the save/remove keymaps.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
leader_key = helpers.defaultNullOpts.mkStr ";" ''
|
leader_key = lib.nixvim.defaultNullOpts.mkStr ";" ''
|
||||||
The leader key to use for arrow. Will precede all mappings.
|
The leader key to use for arrow. Will precede all mappings.
|
||||||
Recommended to be a single character.
|
Recommended to be a single character.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
save_key = helpers.defaultNullOpts.mkStr "cwd" ''
|
save_key = lib.nixvim.defaultNullOpts.mkStr "cwd" ''
|
||||||
What will be used as root to save the bookmarks. Can be also `git_root`.
|
What will be used as root to save the bookmarks. Can be also `git_root`.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
global_bookmarks = helpers.defaultNullOpts.mkBool false ''
|
global_bookmarks = lib.nixvim.defaultNullOpts.mkBool false ''
|
||||||
If true arrow will save files globally (ignores `separate_by_branch`).
|
If true arrow will save files globally (ignores `separate_by_branch`).
|
||||||
'';
|
'';
|
||||||
|
|
||||||
index_keys = helpers.defaultNullOpts.mkStr "123456789zxcbnmZXVBNM,afghjklAFGHJKLwrtyuiopWRTYUIOP" ''
|
index_keys = lib.nixvim.defaultNullOpts.mkStr "123456789zxcbnmZXVBNM,afghjklAFGHJKLwrtyuiopWRTYUIOP" ''
|
||||||
Keys mapped to bookmark index.
|
Keys mapped to bookmark index.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
full_path_list = helpers.defaultNullOpts.mkListOf types.str [ "update_stuff" ] ''
|
full_path_list = lib.nixvim.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
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
helpers,
|
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib;
|
with lib;
|
||||||
|
|
@ -13,16 +12,16 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
maintainers = [ maintainers.GaetanLepage ];
|
maintainers = [ maintainers.GaetanLepage ];
|
||||||
|
|
||||||
settingsOptions = {
|
settingsOptions = {
|
||||||
timeout = helpers.defaultNullOpts.mkStrLuaOr types.ints.unsigned "vim.o.timeoutlen" ''
|
timeout = lib.nixvim.defaultNullOpts.mkStrLuaOr types.ints.unsigned "vim.o.timeoutlen" ''
|
||||||
The time in which the keys must be hit in ms.
|
The time in which the keys must be hit in ms.
|
||||||
Uses the value of `vim.o.timeoutlen` (`options.timeoutlen` in nixvim) by default.
|
Uses the value of `vim.o.timeoutlen` (`options.timeoutlen` in nixvim) by default.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
default_mappings = helpers.defaultNullOpts.mkBool true ''
|
default_mappings = lib.nixvim.defaultNullOpts.mkBool true ''
|
||||||
Whether to enable default key mappings.
|
Whether to enable default key mappings.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
mappings = helpers.defaultNullOpts.mkAttrsOf' {
|
mappings = lib.nixvim.defaultNullOpts.mkAttrsOf' {
|
||||||
type = types.anything;
|
type = types.anything;
|
||||||
pluginDefault = {
|
pluginDefault = {
|
||||||
i.j = {
|
i.j = {
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
{
|
{
|
||||||
helpers,
|
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
|
@ -52,7 +51,7 @@ lib.nixvim.plugins.mkVimPlugin {
|
||||||
'';
|
'';
|
||||||
|
|
||||||
settingsOptions = {
|
settingsOptions = {
|
||||||
buf_filter = helpers.defaultNullOpts.mkLuaFn null ''
|
buf_filter = lib.nixvim.defaultNullOpts.mkLuaFn null ''
|
||||||
Function that determines buffers that bufdelete.nvim can switch to,
|
Function that determines buffers that bufdelete.nvim can switch to,
|
||||||
instead of the default behavior of switching to any buffer.
|
instead of the default behavior of switching to any buffer.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
helpers,
|
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib;
|
with lib;
|
||||||
|
|
@ -22,15 +21,15 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
];
|
];
|
||||||
|
|
||||||
settingsOptions = {
|
settingsOptions = {
|
||||||
api_key_cmd = helpers.defaultNullOpts.mkStr null ''
|
api_key_cmd = lib.nixvim.defaultNullOpts.mkStr null ''
|
||||||
The path and arguments to an executable that returns the API key via stdout.
|
The path and arguments to an executable that returns the API key via stdout.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
yank_register = helpers.defaultNullOpts.mkStr "+" ''
|
yank_register = lib.nixvim.defaultNullOpts.mkStr "+" ''
|
||||||
Which register to use for copying.
|
Which register to use for copying.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
extra_curl_params = helpers.defaultNullOpts.mkListOf' {
|
extra_curl_params = lib.nixvim.defaultNullOpts.mkListOf' {
|
||||||
type = types.str;
|
type = types.str;
|
||||||
pluginDefault = null;
|
pluginDefault = null;
|
||||||
description = ''
|
description = ''
|
||||||
|
|
@ -43,7 +42,7 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
show_line_numbers = helpers.defaultNullOpts.mkBool true ''
|
show_line_numbers = lib.nixvim.defaultNullOpts.mkBool true ''
|
||||||
Whether to show line numbers in the ChatGPT window.
|
Whether to show line numbers in the ChatGPT window.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,4 @@
|
||||||
{
|
{ lib, ... }:
|
||||||
lib,
|
|
||||||
helpers,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
with lib;
|
with lib;
|
||||||
lib.nixvim.plugins.mkNeovimPlugin {
|
lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
name = "codesnap";
|
name = "codesnap";
|
||||||
|
|
@ -12,7 +8,7 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
maintainers = [ maintainers.GaetanLepage ];
|
maintainers = [ maintainers.GaetanLepage ];
|
||||||
|
|
||||||
settingsOptions = {
|
settingsOptions = {
|
||||||
save_path = helpers.defaultNullOpts.mkStr null ''
|
save_path = lib.nixvim.defaultNullOpts.mkStr null ''
|
||||||
The save_path must be ends with `.png`, unless when you specified a directory path, CodeSnap
|
The save_path must be ends with `.png`, unless when you specified a directory path, CodeSnap
|
||||||
will append an auto-generated filename to the specified directory path.
|
will append an auto-generated filename to the specified directory path.
|
||||||
|
|
||||||
|
|
@ -23,34 +19,34 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
parsed: `"~/Pictures/foo.png"`
|
parsed: `"~/Pictures/foo.png"`
|
||||||
'';
|
'';
|
||||||
|
|
||||||
mac_window_bar = helpers.defaultNullOpts.mkBool true ''
|
mac_window_bar = lib.nixvim.defaultNullOpts.mkBool true ''
|
||||||
Whether to display the MacOS style title bar.
|
Whether to display the MacOS style title bar.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
title = helpers.defaultNullOpts.mkStr "CodeSnap.nvim" ''
|
title = lib.nixvim.defaultNullOpts.mkStr "CodeSnap.nvim" ''
|
||||||
The editor title.
|
The editor title.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
code_font_family = helpers.defaultNullOpts.mkStr "CaskaydiaCove Nerd Font" ''
|
code_font_family = lib.nixvim.defaultNullOpts.mkStr "CaskaydiaCove Nerd Font" ''
|
||||||
Which font to use for the code.
|
Which font to use for the code.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
watermark_font_family = helpers.defaultNullOpts.mkStr "Pacifico" ''
|
watermark_font_family = lib.nixvim.defaultNullOpts.mkStr "Pacifico" ''
|
||||||
Which font to use for watermarks.
|
Which font to use for watermarks.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
watermark = helpers.defaultNullOpts.mkStr "CodeSnap.nvim" ''
|
watermark = lib.nixvim.defaultNullOpts.mkStr "CodeSnap.nvim" ''
|
||||||
Wartermark of the code snapshot.
|
Wartermark of the code snapshot.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
bg_theme = helpers.defaultNullOpts.mkStr "default" ''
|
bg_theme = lib.nixvim.defaultNullOpts.mkStr "default" ''
|
||||||
Background theme name.
|
Background theme name.
|
||||||
|
|
||||||
Check the [upstream README](https://github.com/mistricky/codesnap.nvim?tab=readme-ov-file#custom-background)
|
Check the [upstream README](https://github.com/mistricky/codesnap.nvim?tab=readme-ov-file#custom-background)
|
||||||
for available options.
|
for available options.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
bg_color = helpers.defaultNullOpts.mkStr' {
|
bg_color = lib.nixvim.defaultNullOpts.mkStr' {
|
||||||
pluginDefault = null;
|
pluginDefault = null;
|
||||||
example = "#535c68";
|
example = "#535c68";
|
||||||
description = ''
|
description = ''
|
||||||
|
|
@ -58,26 +54,26 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
breadcrumbs_separator = helpers.defaultNullOpts.mkStr "/" ''
|
breadcrumbs_separator = lib.nixvim.defaultNullOpts.mkStr "/" ''
|
||||||
Separator for breadcrumbs.
|
Separator for breadcrumbs.
|
||||||
The CodeSnap.nvim uses `/` as the separator of the file path by default, of course, you can
|
The CodeSnap.nvim uses `/` as the separator of the file path by default, of course, you can
|
||||||
specify any symbol you prefer as the custom separator.
|
specify any symbol you prefer as the custom separator.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
has_breadcrumbs = helpers.defaultNullOpts.mkBool false ''
|
has_breadcrumbs = lib.nixvim.defaultNullOpts.mkBool false ''
|
||||||
Whether to display the current snapshot file path.
|
Whether to display the current snapshot file path.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
has_line_number = helpers.defaultNullOpts.mkBool false ''
|
has_line_number = lib.nixvim.defaultNullOpts.mkBool false ''
|
||||||
Whether to display line numbers.
|
Whether to display line numbers.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
show_workspace = helpers.defaultNullOpts.mkBool false ''
|
show_workspace = lib.nixvim.defaultNullOpts.mkBool false ''
|
||||||
Breadcrumbs hide the workspace name by default, if you want to display workspace in
|
Breadcrumbs hide the workspace name by default, if you want to display workspace in
|
||||||
breadcrumbs, you can just set this option to `true`.
|
breadcrumbs, you can just set this option to `true`.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
min_width = helpers.defaultNullOpts.mkUnsignedInt 0 ''
|
min_width = lib.nixvim.defaultNullOpts.mkUnsignedInt 0 ''
|
||||||
Minimum width for the snapshot.
|
Minimum width for the snapshot.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
helpers,
|
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib;
|
with lib;
|
||||||
|
|
@ -13,63 +12,63 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
maintainers = [ maintainers.GaetanLepage ];
|
maintainers = [ maintainers.GaetanLepage ];
|
||||||
|
|
||||||
settingsOptions = {
|
settingsOptions = {
|
||||||
padding = helpers.defaultNullOpts.mkBool true ''
|
padding = lib.nixvim.defaultNullOpts.mkBool true ''
|
||||||
Add a space b/w comment and the line.
|
Add a space b/w comment and the line.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
sticky = helpers.defaultNullOpts.mkBool true ''
|
sticky = lib.nixvim.defaultNullOpts.mkBool true ''
|
||||||
Whether the cursor should stay at its position.
|
Whether the cursor should stay at its position.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
ignore = helpers.mkNullOrStr ''
|
ignore = lib.nixvim.mkNullOrStr ''
|
||||||
Lines to be ignored while (un)comment.
|
Lines to be ignored while (un)comment.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
toggler = {
|
toggler = {
|
||||||
line = helpers.defaultNullOpts.mkStr "gcc" ''
|
line = lib.nixvim.defaultNullOpts.mkStr "gcc" ''
|
||||||
Line-comment toggle keymap in NORMAL mode.
|
Line-comment toggle keymap in NORMAL mode.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
block = helpers.defaultNullOpts.mkStr "gbc" ''
|
block = lib.nixvim.defaultNullOpts.mkStr "gbc" ''
|
||||||
Block-comment toggle keymap in NORMAL mode.
|
Block-comment toggle keymap in NORMAL mode.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
opleader = {
|
opleader = {
|
||||||
line = helpers.defaultNullOpts.mkStr "gc" ''
|
line = lib.nixvim.defaultNullOpts.mkStr "gc" ''
|
||||||
Line-comment operator-pending keymap in NORMAL and VISUAL mode.
|
Line-comment operator-pending keymap in NORMAL and VISUAL mode.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
block = helpers.defaultNullOpts.mkStr "gb" ''
|
block = lib.nixvim.defaultNullOpts.mkStr "gb" ''
|
||||||
Block-comment operator-pending keymap in NORMAL and VISUAL mode.
|
Block-comment operator-pending keymap in NORMAL and VISUAL mode.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
extra = {
|
extra = {
|
||||||
above = helpers.defaultNullOpts.mkStr "gcO" ''
|
above = lib.nixvim.defaultNullOpts.mkStr "gcO" ''
|
||||||
Add comment on the line above.
|
Add comment on the line above.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
below = helpers.defaultNullOpts.mkStr "gco" ''
|
below = lib.nixvim.defaultNullOpts.mkStr "gco" ''
|
||||||
Add comment on the line below.
|
Add comment on the line below.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
eol = helpers.defaultNullOpts.mkStr "gcA" ''
|
eol = lib.nixvim.defaultNullOpts.mkStr "gcA" ''
|
||||||
Add comment at the end of line.
|
Add comment at the end of line.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
mappings =
|
mappings =
|
||||||
helpers.defaultNullOpts.mkNullable
|
lib.nixvim.defaultNullOpts.mkNullable
|
||||||
(
|
(
|
||||||
with types;
|
with types;
|
||||||
either (enum [ false ]) (submodule {
|
either (enum [ false ]) (submodule {
|
||||||
options = {
|
options = {
|
||||||
basic = helpers.defaultNullOpts.mkBool true ''
|
basic = lib.nixvim.defaultNullOpts.mkBool true ''
|
||||||
Enable operator-pending mappings (`gcc`, `gbc`, `gc[count]{motion}`, `gb[count]{motion}`).
|
Enable operator-pending mappings (`gcc`, `gbc`, `gc[count]{motion}`, `gb[count]{motion}`).
|
||||||
'';
|
'';
|
||||||
|
|
||||||
extra = helpers.defaultNullOpts.mkBool true ''
|
extra = lib.nixvim.defaultNullOpts.mkBool true ''
|
||||||
Enable extra mappings (`gco`, `gcO`, `gcA`).
|
Enable extra mappings (`gco`, `gcO`, `gcA`).
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
@ -84,11 +83,11 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
NOTE: If given 'false', then the plugin won't create any mappings.
|
NOTE: If given 'false', then the plugin won't create any mappings.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
pre_hook = helpers.mkNullOrLuaFn ''
|
pre_hook = lib.nixvim.mkNullOrLuaFn ''
|
||||||
Lua function called before (un)comment.
|
Lua function called before (un)comment.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
post_hook = helpers.mkNullOrLuaFn ''
|
post_hook = lib.nixvim.mkNullOrLuaFn ''
|
||||||
Lua function called after (un)comment.
|
Lua function called after (un)comment.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
helpers,
|
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
|
@ -43,7 +42,7 @@ lib.nixvim.plugins.mkVimPlugin {
|
||||||
example = "localhost:3128";
|
example = "localhost:3128";
|
||||||
};
|
};
|
||||||
|
|
||||||
proxy_strict_ssl = helpers.mkNullOrOption types.bool ''
|
proxy_strict_ssl = lib.nixvim.mkNullOrOption types.bool ''
|
||||||
Corporate proxies sometimes use a man-in-the-middle SSL certificate which is incompatible
|
Corporate proxies sometimes use a man-in-the-middle SSL certificate which is incompatible
|
||||||
with GitHub Copilot.
|
with GitHub Copilot.
|
||||||
To work around this, SSL certificate verification can be disabled by setting this option to
|
To work around this, SSL certificate verification can be disabled by setting this option to
|
||||||
|
|
@ -53,7 +52,7 @@ lib.nixvim.plugins.mkVimPlugin {
|
||||||
`$NODE_TLS_REJECT_UNAUTHORIZED` environment variable to `"0"`.
|
`$NODE_TLS_REJECT_UNAUTHORIZED` environment variable to `"0"`.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
workspace_folders = helpers.mkNullOrOption (with types; listOf str) ''
|
workspace_folders = lib.nixvim.mkNullOrOption (with types; listOf str) ''
|
||||||
A list of "workspace folders" or project roots that Copilot may use to improve to improve
|
A list of "workspace folders" or project roots that Copilot may use to improve to improve
|
||||||
the quality of suggestions.
|
the quality of suggestions.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
helpers,
|
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib;
|
with lib;
|
||||||
|
|
@ -69,33 +68,33 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
freeformType = with types; attrsOf anything;
|
freeformType = with types; attrsOf anything;
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
icon = helpers.defaultNullOpts.mkStr "" ''
|
icon = lib.nixvim.defaultNullOpts.mkStr "" ''
|
||||||
The icon to display with this action.
|
The icon to display with this action.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
icon_hl = helpers.defaultNullOpts.mkStr "DashboardIcon" ''
|
icon_hl = lib.nixvim.defaultNullOpts.mkStr "DashboardIcon" ''
|
||||||
The highlight group for the icon.
|
The highlight group for the icon.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
desc = helpers.defaultNullOpts.mkStr "" ''
|
desc = lib.nixvim.defaultNullOpts.mkStr "" ''
|
||||||
The action's description, shown next to the icon.
|
The action's description, shown next to the icon.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
desc_hl = helpers.defaultNullOpts.mkStr "DashboardDesc" ''
|
desc_hl = lib.nixvim.defaultNullOpts.mkStr "DashboardDesc" ''
|
||||||
The highlight group to use for the description.
|
The highlight group to use for the description.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
key = helpers.defaultNullOpts.mkStr "" ''
|
key = lib.nixvim.defaultNullOpts.mkStr "" ''
|
||||||
Shortcut key available in the dashboard buffer.
|
Shortcut key available in the dashboard buffer.
|
||||||
|
|
||||||
**Note**: this will not create an actual keymap.
|
**Note**: this will not create an actual keymap.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
key_hl = helpers.defaultNullOpts.mkStr "DashboardKey" ''
|
key_hl = lib.nixvim.defaultNullOpts.mkStr "DashboardKey" ''
|
||||||
The highlight group to use for the key.
|
The highlight group to use for the key.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
action = helpers.defaultNullOpts.mkStr "" ''
|
action = lib.nixvim.defaultNullOpts.mkStr "" ''
|
||||||
Action done when you press key. Can be a command or a function.
|
Action done when you press key. Can be a command or a function.
|
||||||
|
|
||||||
To use a lua function, pass a raw type instead of a string, e.g:
|
To use a lua function, pass a raw type instead of a string, e.g:
|
||||||
|
|
@ -116,7 +115,7 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
theme =
|
theme =
|
||||||
helpers.defaultNullOpts.mkEnumFirstDefault
|
lib.nixvim.defaultNullOpts.mkEnumFirstDefault
|
||||||
[
|
[
|
||||||
"hyper"
|
"hyper"
|
||||||
"doom"
|
"doom"
|
||||||
|
|
@ -131,7 +130,7 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
'';
|
'';
|
||||||
|
|
||||||
shortcut_type =
|
shortcut_type =
|
||||||
helpers.defaultNullOpts.mkEnumFirstDefault
|
lib.nixvim.defaultNullOpts.mkEnumFirstDefault
|
||||||
[
|
[
|
||||||
"letter"
|
"letter"
|
||||||
"number"
|
"number"
|
||||||
|
|
@ -140,13 +139,13 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
The shortcut type.
|
The shortcut type.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
change_to_vcs_root = helpers.defaultNullOpts.mkBool false ''
|
change_to_vcs_root = lib.nixvim.defaultNullOpts.mkBool false ''
|
||||||
When opening a file in the "hyper" theme's "recent files" list (`mru`), vim will change to the root of vcs.
|
When opening a file in the "hyper" theme's "recent files" list (`mru`), vim will change to the root of vcs.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
# TODO double check if this affects "doom" or not
|
# TODO double check if this affects "doom" or not
|
||||||
disable_move = helpers.defaultNullOpts.mkBool false ''
|
disable_move = lib.nixvim.defaultNullOpts.mkBool false ''
|
||||||
Disable movement keymaps in the dashboard buffer.
|
Disable movement keymaps in the dashboard buffer.
|
||||||
|
|
||||||
Specifically, the following keymaps are disabled:
|
Specifically, the following keymaps are disabled:
|
||||||
|
|
@ -154,31 +153,31 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
`w`, `f`, `b`, `h`, `j`, `k`, `l`, `<Up>`, `<Down>`, `<Left>`, `<Right>`
|
`w`, `f`, `b`, `h`, `j`, `k`, `l`, `<Up>`, `<Down>`, `<Left>`, `<Right>`
|
||||||
'';
|
'';
|
||||||
|
|
||||||
packages.enable = helpers.defaultNullOpts.mkBool true ''
|
packages.enable = lib.nixvim.defaultNullOpts.mkBool true ''
|
||||||
Show how many vim plugins are loaded.
|
Show how many vim plugins are loaded.
|
||||||
|
|
||||||
${requiresTheme "hyper"}
|
${requiresTheme "hyper"}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
week_header = {
|
week_header = {
|
||||||
enable = helpers.defaultNullOpts.mkBool false ''
|
enable = lib.nixvim.defaultNullOpts.mkBool false ''
|
||||||
Whether to use a header based on the current day of the week,
|
Whether to use a header based on the current day of the week,
|
||||||
instead of the default "DASHBOARD" header.
|
instead of the default "DASHBOARD" header.
|
||||||
|
|
||||||
A subheading showing the current time is also displayed.
|
A subheading showing the current time is also displayed.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
concat = helpers.defaultNullOpts.mkStr "" ''
|
concat = lib.nixvim.defaultNullOpts.mkStr "" ''
|
||||||
Additional text to append at the end of the time line.
|
Additional text to append at the end of the time line.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
append = helpers.defaultNullOpts.mkListOf types.str [ ] ''
|
append = lib.nixvim.defaultNullOpts.mkListOf types.str [ ] ''
|
||||||
Additional header lines to append after the the time line.
|
Additional header lines to append after the the time line.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
header =
|
header =
|
||||||
helpers.defaultNullOpts.mkNullableWithRaw (with types; either str (listOf (maybeRaw str)))
|
lib.nixvim.defaultNullOpts.mkNullableWithRaw (with types; either str (listOf (maybeRaw str)))
|
||||||
[
|
[
|
||||||
""
|
""
|
||||||
" ██████╗ █████╗ ███████╗██╗ ██╗██████╗ ██████╗ █████╗ ██████╗ ██████╗ "
|
" ██████╗ █████╗ ███████╗██╗ ██╗██████╗ ██████╗ █████╗ ██████╗ ██████╗ "
|
||||||
|
|
@ -193,12 +192,12 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
The header text, displayed at the top of the buffer.
|
The header text, displayed at the top of the buffer.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
footer = helpers.defaultNullOpts.mkListOf types.str [ ] ''
|
footer = lib.nixvim.defaultNullOpts.mkListOf types.str [ ] ''
|
||||||
The footer text, displayed at the bottom of the buffer.
|
The footer text, displayed at the bottom of the buffer.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# TODO: Once #1618 is fixed, we can switch to `defaultNullOpts.mkAttrs'`,
|
# TODO: Once #1618 is fixed, we can switch to `defaultNullOpts.mkAttrs'`,
|
||||||
shortcut = helpers.mkNullOrOption' {
|
shortcut = lib.nixvim.mkNullOrOption' {
|
||||||
description = ''
|
description = ''
|
||||||
Shortcut actions to be added to the "hyper" theme.
|
Shortcut actions to be added to the "hyper" theme.
|
||||||
|
|
||||||
|
|
@ -229,14 +228,14 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
];
|
];
|
||||||
|
|
||||||
type = types.listOf (mkActionType {
|
type = types.listOf (mkActionType {
|
||||||
group = helpers.defaultNullOpts.mkStr "" ''
|
group = lib.nixvim.defaultNullOpts.mkStr "" ''
|
||||||
Highlight group used with the "hyper" theme,
|
Highlight group used with the "hyper" theme,
|
||||||
'';
|
'';
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
# TODO: Once #1618 is fixed, we can switch to `defaultNullOpts.mkAttrs'`,
|
# TODO: Once #1618 is fixed, we can switch to `defaultNullOpts.mkAttrs'`,
|
||||||
center = helpers.mkNullOrOption' {
|
center = lib.nixvim.mkNullOrOption' {
|
||||||
description = ''
|
description = ''
|
||||||
Actions to be added to the center section of the "doom" theme.
|
Actions to be added to the center section of the "doom" theme.
|
||||||
|
|
||||||
|
|
@ -268,7 +267,7 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
type = types.listOf (mkActionType {
|
type = types.listOf (mkActionType {
|
||||||
# TODO if `key_format` is _also_ applicable to hyper theme,
|
# TODO if `key_format` is _also_ applicable to hyper theme,
|
||||||
# move the option to `mkActionList`.
|
# move the option to `mkActionList`.
|
||||||
key_format = helpers.defaultNullOpts.mkStr "[%s]" ''
|
key_format = lib.nixvim.defaultNullOpts.mkStr "[%s]" ''
|
||||||
Format string used when rendering the key.
|
Format string used when rendering the key.
|
||||||
`%s` will be substituted with value of `key`.
|
`%s` will be substituted with value of `key`.
|
||||||
'';
|
'';
|
||||||
|
|
@ -276,96 +275,96 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
};
|
};
|
||||||
|
|
||||||
project =
|
project =
|
||||||
helpers.mkCompositeOption
|
lib.nixvim.mkCompositeOption
|
||||||
''
|
''
|
||||||
Options relating to the "hyper" theme's recent projects list.
|
Options relating to the "hyper" theme's recent projects list.
|
||||||
|
|
||||||
${requiresTheme "hyper"}
|
${requiresTheme "hyper"}
|
||||||
''
|
''
|
||||||
{
|
{
|
||||||
enable = helpers.defaultNullOpts.mkBool true ''
|
enable = lib.nixvim.defaultNullOpts.mkBool true ''
|
||||||
Whether to display the recent projects list.
|
Whether to display the recent projects list.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
limit = helpers.defaultNullOpts.mkInt 8 ''
|
limit = lib.nixvim.defaultNullOpts.mkInt 8 ''
|
||||||
The maximum number of projects to list.
|
The maximum number of projects to list.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
icon = helpers.defaultNullOpts.mkStr " " ''
|
icon = lib.nixvim.defaultNullOpts.mkStr " " ''
|
||||||
Icon used in the section header.
|
Icon used in the section header.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
icon_hl = helpers.defaultNullOpts.mkStr "DashboardRecentProjectIcon" ''
|
icon_hl = lib.nixvim.defaultNullOpts.mkStr "DashboardRecentProjectIcon" ''
|
||||||
Highlight group used for the icon.
|
Highlight group used for the icon.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
label = helpers.defaultNullOpts.mkStr " Recent Projects:" ''
|
label = lib.nixvim.defaultNullOpts.mkStr " Recent Projects:" ''
|
||||||
Text used in the section header.
|
Text used in the section header.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
action = helpers.defaultNullOpts.mkStr "Telescope find_files cwd=" ''
|
action = lib.nixvim.defaultNullOpts.mkStr "Telescope find_files cwd=" ''
|
||||||
When you press key or enter it will run this action
|
When you press key or enter it will run this action
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
mru =
|
mru =
|
||||||
helpers.mkCompositeOption
|
lib.nixvim.mkCompositeOption
|
||||||
''
|
''
|
||||||
Options relating to the "hyper" theme's recent files list.
|
Options relating to the "hyper" theme's recent files list.
|
||||||
|
|
||||||
${requiresTheme "hyper"}
|
${requiresTheme "hyper"}
|
||||||
''
|
''
|
||||||
{
|
{
|
||||||
enable = helpers.defaultNullOpts.mkBool true ''
|
enable = lib.nixvim.defaultNullOpts.mkBool true ''
|
||||||
Whether to display the recent file list.
|
Whether to display the recent file list.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
limit = helpers.defaultNullOpts.mkInt 10 ''
|
limit = lib.nixvim.defaultNullOpts.mkInt 10 ''
|
||||||
The maximum number of files to list.
|
The maximum number of files to list.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
icon = helpers.defaultNullOpts.mkStr " " ''
|
icon = lib.nixvim.defaultNullOpts.mkStr " " ''
|
||||||
Icon used in the section header.
|
Icon used in the section header.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
icon_hl = helpers.defaultNullOpts.mkStr "DashboardMruIcon" ''
|
icon_hl = lib.nixvim.defaultNullOpts.mkStr "DashboardMruIcon" ''
|
||||||
Highlight group used for the icon.
|
Highlight group used for the icon.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
label = helpers.defaultNullOpts.mkStr " Most Recent Files:" ''
|
label = lib.nixvim.defaultNullOpts.mkStr " Most Recent Files:" ''
|
||||||
Text used in the section header.
|
Text used in the section header.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
cwd_only = helpers.defaultNullOpts.mkBool false ''
|
cwd_only = lib.nixvim.defaultNullOpts.mkBool false ''
|
||||||
Whether to only include files from the current working directory.
|
Whether to only include files from the current working directory.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
hide = {
|
hide = {
|
||||||
statusline = helpers.defaultNullOpts.mkBool true ''
|
statusline = lib.nixvim.defaultNullOpts.mkBool true ''
|
||||||
Whether to hide the status line.
|
Whether to hide the status line.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
tabline = helpers.defaultNullOpts.mkBool true ''
|
tabline = lib.nixvim.defaultNullOpts.mkBool true ''
|
||||||
Whether to hide the status line.
|
Whether to hide the status line.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
preview = {
|
preview = {
|
||||||
command = helpers.defaultNullOpts.mkStr "" ''
|
command = lib.nixvim.defaultNullOpts.mkStr "" ''
|
||||||
Command to print file contents.
|
Command to print file contents.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
file_path = helpers.defaultNullOpts.mkStr null ''
|
file_path = lib.nixvim.defaultNullOpts.mkStr null ''
|
||||||
Path to preview file.
|
Path to preview file.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
file_height = helpers.defaultNullOpts.mkInt 0 ''
|
file_height = lib.nixvim.defaultNullOpts.mkInt 0 ''
|
||||||
The height of the preview file.
|
The height of the preview file.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
file_width = helpers.defaultNullOpts.mkInt 0 ''
|
file_width = lib.nixvim.defaultNullOpts.mkInt 0 ''
|
||||||
The width of the preview file.
|
The width of the preview file.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
helpers,
|
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib;
|
with lib;
|
||||||
|
|
@ -13,7 +12,7 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
|
|
||||||
settingsOptions = {
|
settingsOptions = {
|
||||||
keymaps =
|
keymaps =
|
||||||
helpers.defaultNullOpts.mkAttrsOf (with lib.types; attrsOf (either str rawLua))
|
lib.nixvim.defaultNullOpts.mkAttrsOf (with lib.types; attrsOf (either str rawLua))
|
||||||
{
|
{
|
||||||
normal = {
|
normal = {
|
||||||
plain_below = "g?p";
|
plain_below = "g?p";
|
||||||
|
|
@ -47,7 +46,7 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
'';
|
'';
|
||||||
|
|
||||||
commands =
|
commands =
|
||||||
helpers.defaultNullOpts.mkAttrsOf types.str
|
lib.nixvim.defaultNullOpts.mkAttrsOf types.str
|
||||||
{
|
{
|
||||||
toggle_comment_debug_prints = "ToggleCommentDebugPrints";
|
toggle_comment_debug_prints = "ToggleCommentDebugPrints";
|
||||||
delete_debug_prints = "DeleteDebugPrints";
|
delete_debug_prints = "DeleteDebugPrints";
|
||||||
|
|
@ -63,20 +62,20 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
Setting any command to `nil` (warning: use `__raw`) will skip it.
|
Setting any command to `nil` (warning: use `__raw`) will skip it.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
move_to_debugline = helpers.defaultNullOpts.mkBool false ''
|
move_to_debugline = lib.nixvim.defaultNullOpts.mkBool false ''
|
||||||
When adding a debug line, moves the cursor to that line.
|
When adding a debug line, moves the cursor to that line.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
display_counter = helpers.defaultNullOpts.mkBool true ''
|
display_counter = lib.nixvim.defaultNullOpts.mkBool true ''
|
||||||
Whether to display/include the monotonically increasing counter in each debug message.
|
Whether to display/include the monotonically increasing counter in each debug message.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
display_snippet = helpers.defaultNullOpts.mkBool true ''
|
display_snippet = lib.nixvim.defaultNullOpts.mkBool true ''
|
||||||
Whether to include a snippet of the line above/below in plain debug lines.
|
Whether to include a snippet of the line above/below in plain debug lines.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
filetypes =
|
filetypes =
|
||||||
helpers.defaultNullOpts.mkNullable
|
lib.nixvim.defaultNullOpts.mkNullable
|
||||||
(
|
(
|
||||||
with types;
|
with types;
|
||||||
attrsOf (submodule {
|
attrsOf (submodule {
|
||||||
|
|
@ -123,7 +122,7 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
```
|
```
|
||||||
'';
|
'';
|
||||||
|
|
||||||
print_tag = helpers.defaultNullOpts.mkStr "DEBUGPRINT" ''
|
print_tag = lib.nixvim.defaultNullOpts.mkStr "DEBUGPRINT" ''
|
||||||
The string inserted into each print statement, which can be used to uniquely identify
|
The string inserted into each print statement, which can be used to uniquely identify
|
||||||
statements inserted by `debugprint`.
|
statements inserted by `debugprint`.
|
||||||
'';
|
'';
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
helpers,
|
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib;
|
with lib;
|
||||||
|
|
@ -23,43 +22,43 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
settingsOptions =
|
settingsOptions =
|
||||||
let
|
let
|
||||||
viewOpts = {
|
viewOpts = {
|
||||||
ft = helpers.mkNullOrStr ''
|
ft = lib.nixvim.mkNullOrStr ''
|
||||||
File type of the view.
|
File type of the view.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
filter = helpers.mkNullOrLuaFn ''
|
filter = lib.nixvim.mkNullOrLuaFn ''
|
||||||
Optional function to filter buffers and windows.
|
Optional function to filter buffers and windows.
|
||||||
|
|
||||||
`fun(buf:buffer, win:window)`
|
`fun(buf:buffer, win:window)`
|
||||||
'';
|
'';
|
||||||
|
|
||||||
title = helpers.mkNullOrStr ''
|
title = lib.nixvim.mkNullOrStr ''
|
||||||
Optional title of the view.
|
Optional title of the view.
|
||||||
Defaults to the capitalized filetype.
|
Defaults to the capitalized filetype.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
size = helpers.mkNullOrOption types.ints.unsigned ''
|
size = lib.nixvim.mkNullOrOption types.ints.unsigned ''
|
||||||
Size of the short edge of the edgebar.
|
Size of the short edge of the edgebar.
|
||||||
For edgebars, this is the minimum width.
|
For edgebars, this is the minimum width.
|
||||||
For panels, minimum height.
|
For panels, minimum height.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
pinned = helpers.mkNullOrOption types.bool ''
|
pinned = lib.nixvim.mkNullOrOption types.bool ''
|
||||||
If true, the view will always be shown in the edgebar even when it has no windows.
|
If true, the view will always be shown in the edgebar even when it has no windows.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
open = helpers.mkNullOrStr ''
|
open = lib.nixvim.mkNullOrStr ''
|
||||||
Function or command to open a pinned view.
|
Function or command to open a pinned view.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
wo = helpers.mkNullOrOption (with types; attrsOf anything) ''
|
wo = lib.nixvim.mkNullOrOption (with types; attrsOf anything) ''
|
||||||
View-specific window options.
|
View-specific window options.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
mkViewOptsOption =
|
mkViewOptsOption =
|
||||||
name:
|
name:
|
||||||
helpers.defaultNullOpts.mkListOf (
|
lib.nixvim.defaultNullOpts.mkListOf (
|
||||||
with types;
|
with types;
|
||||||
either str (submodule {
|
either str (submodule {
|
||||||
options = viewOpts;
|
options = viewOpts;
|
||||||
|
|
@ -75,13 +74,13 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
options =
|
options =
|
||||||
mapAttrs
|
mapAttrs
|
||||||
(_: defaultSize: {
|
(_: defaultSize: {
|
||||||
size = helpers.defaultNullOpts.mkUnsignedInt defaultSize ''
|
size = lib.nixvim.defaultNullOpts.mkUnsignedInt defaultSize ''
|
||||||
Size of the short edge of the edgebar.
|
Size of the short edge of the edgebar.
|
||||||
For edgebars, this is the minimum width.
|
For edgebars, this is the minimum width.
|
||||||
For panels, minimum height.
|
For panels, minimum height.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
wo = helpers.mkNullOrOption (with types; attrsOf anything) ''
|
wo = lib.nixvim.mkNullOrOption (with types; attrsOf anything) ''
|
||||||
View-specific window options.
|
View-specific window options.
|
||||||
'';
|
'';
|
||||||
})
|
})
|
||||||
|
|
@ -93,25 +92,25 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
};
|
};
|
||||||
|
|
||||||
animate = {
|
animate = {
|
||||||
enabled = helpers.defaultNullOpts.mkBool true ''
|
enabled = lib.nixvim.defaultNullOpts.mkBool true ''
|
||||||
Whether to enable animations.
|
Whether to enable animations.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
fps = helpers.defaultNullOpts.mkUnsignedInt 100 ''
|
fps = lib.nixvim.defaultNullOpts.mkUnsignedInt 100 ''
|
||||||
Frames per second.
|
Frames per second.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
cps = helpers.defaultNullOpts.mkUnsignedInt 120 ''
|
cps = lib.nixvim.defaultNullOpts.mkUnsignedInt 120 ''
|
||||||
Cells per second.
|
Cells per second.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
on_begin = helpers.defaultNullOpts.mkLuaFn ''
|
on_begin = lib.nixvim.defaultNullOpts.mkLuaFn ''
|
||||||
function()
|
function()
|
||||||
vim.g.minianimate_disable = true
|
vim.g.minianimate_disable = true
|
||||||
end
|
end
|
||||||
'' "Callback for the beginning of animations.";
|
'' "Callback for the beginning of animations.";
|
||||||
|
|
||||||
on_end = helpers.defaultNullOpts.mkLuaFn ''
|
on_end = lib.nixvim.defaultNullOpts.mkLuaFn ''
|
||||||
function()
|
function()
|
||||||
vim.g.minianimate_disable = false
|
vim.g.minianimate_disable = false
|
||||||
end
|
end
|
||||||
|
|
@ -134,17 +133,17 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
"⠏"
|
"⠏"
|
||||||
];
|
];
|
||||||
in
|
in
|
||||||
helpers.mkNullOrOption' {
|
lib.nixvim.mkNullOrOption' {
|
||||||
type =
|
type =
|
||||||
with lib.types;
|
with lib.types;
|
||||||
either strLua (submodule {
|
either strLua (submodule {
|
||||||
freeformType = attrsOf anything;
|
freeformType = attrsOf anything;
|
||||||
options = {
|
options = {
|
||||||
frames = helpers.defaultNullOpts.mkListOf types.str defaultFrames ''
|
frames = lib.nixvim.defaultNullOpts.mkListOf types.str defaultFrames ''
|
||||||
Frame characters.
|
Frame characters.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
interval = helpers.defaultNullOpts.mkUnsignedInt 80 ''
|
interval = lib.nixvim.defaultNullOpts.mkUnsignedInt 80 ''
|
||||||
Interval time between two consecutive frames.
|
Interval time between two consecutive frames.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
@ -159,16 +158,16 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
exit_when_last = helpers.defaultNullOpts.mkBool false ''
|
exit_when_last = lib.nixvim.defaultNullOpts.mkBool false ''
|
||||||
Enable this to exit Neovim when only edgy windows are left.
|
Enable this to exit Neovim when only edgy windows are left.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
close_when_all_hidden = helpers.defaultNullOpts.mkBool true ''
|
close_when_all_hidden = lib.nixvim.defaultNullOpts.mkBool true ''
|
||||||
Close edgy when all windows are hidden instead of opening one of them.
|
Close edgy when all windows are hidden instead of opening one of them.
|
||||||
Disable to always keep at least one edgy split visible in each open section.
|
Disable to always keep at least one edgy split visible in each open section.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
wo = helpers.defaultNullOpts.mkAttrsOf types.anything {
|
wo = lib.nixvim.defaultNullOpts.mkAttrsOf types.anything {
|
||||||
winbar = true;
|
winbar = true;
|
||||||
winfixwidth = true;
|
winfixwidth = true;
|
||||||
winfixheight = false;
|
winfixheight = false;
|
||||||
|
|
@ -179,7 +178,7 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
|
|
||||||
# This option accepts an attrs or a lua string.
|
# This option accepts an attrs or a lua string.
|
||||||
# Hence, we convert the string to raw lua in `apply`.
|
# Hence, we convert the string to raw lua in `apply`.
|
||||||
keys = helpers.defaultNullOpts.mkAttrsOf' {
|
keys = lib.nixvim.defaultNullOpts.mkAttrsOf' {
|
||||||
type = with lib.types; either strLuaFn (enum [ false ]);
|
type = with lib.types; either strLuaFn (enum [ false ]);
|
||||||
description = ''
|
description = ''
|
||||||
Buffer-local keymaps to be added to edgebar buffers.
|
Buffer-local keymaps to be added to edgebar buffers.
|
||||||
|
|
@ -255,11 +254,11 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
};
|
};
|
||||||
|
|
||||||
icons = {
|
icons = {
|
||||||
closed = helpers.defaultNullOpts.mkStr " " ''
|
closed = lib.nixvim.defaultNullOpts.mkStr " " ''
|
||||||
Icon for closed edgebars.
|
Icon for closed edgebars.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
open = helpers.defaultNullOpts.mkStr " " ''
|
open = lib.nixvim.defaultNullOpts.mkStr " " ''
|
||||||
Icon for opened edgebars.
|
Icon for opened edgebars.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
helpers,
|
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib;
|
with lib;
|
||||||
|
|
@ -41,7 +40,7 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
"cmp_menu"
|
"cmp_menu"
|
||||||
"noice"
|
"noice"
|
||||||
"flash_prompt"
|
"flash_prompt"
|
||||||
(helpers.mkRaw ''
|
(lib.nixvim.mkRaw ''
|
||||||
function(win)
|
function(win)
|
||||||
-- exclude non-focusable windows
|
-- exclude non-focusable windows
|
||||||
return not vim.api.nvim_win_get_config(win).focusable
|
return not vim.api.nvim_win_get_config(win).focusable
|
||||||
|
|
@ -127,27 +126,27 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
defaults = recursiveUpdate configDefaults defaultOverrides;
|
defaults = recursiveUpdate configDefaults defaultOverrides;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
labels = helpers.defaultNullOpts.mkStr defaults.labels ''
|
labels = lib.nixvim.defaultNullOpts.mkStr defaults.labels ''
|
||||||
Labels appear next to the matches, allowing you to quickly jump to any location. Labels are
|
Labels appear next to the matches, allowing you to quickly jump to any location. Labels are
|
||||||
guaranteed not to exist as a continuation of the search pattern.
|
guaranteed not to exist as a continuation of the search pattern.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
search = {
|
search = {
|
||||||
multi_window = helpers.defaultNullOpts.mkBool defaults.search.multi_window ''
|
multi_window = lib.nixvim.defaultNullOpts.mkBool defaults.search.multi_window ''
|
||||||
Search/jump in all windows
|
Search/jump in all windows
|
||||||
'';
|
'';
|
||||||
|
|
||||||
forward = helpers.defaultNullOpts.mkBool defaults.search.forward ''
|
forward = lib.nixvim.defaultNullOpts.mkBool defaults.search.forward ''
|
||||||
Search direction
|
Search direction
|
||||||
'';
|
'';
|
||||||
|
|
||||||
wrap = helpers.defaultNullOpts.mkBool defaults.search.wrap ''
|
wrap = lib.nixvim.defaultNullOpts.mkBool defaults.search.wrap ''
|
||||||
Continue searching after reaching the start/end of the file.
|
Continue searching after reaching the start/end of the file.
|
||||||
When `false`, find only matches in the given direction
|
When `false`, find only matches in the given direction
|
||||||
'';
|
'';
|
||||||
|
|
||||||
mode =
|
mode =
|
||||||
helpers.defaultNullOpts.mkEnum
|
lib.nixvim.defaultNullOpts.mkEnum
|
||||||
[
|
[
|
||||||
"exact"
|
"exact"
|
||||||
"search"
|
"search"
|
||||||
|
|
@ -169,21 +168,21 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
```
|
```
|
||||||
'';
|
'';
|
||||||
|
|
||||||
incremental = helpers.defaultNullOpts.mkBool defaults.search.incremental ''
|
incremental = lib.nixvim.defaultNullOpts.mkBool defaults.search.incremental ''
|
||||||
Behave like `incsearch`.
|
Behave like `incsearch`.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
exclude = helpers.defaultNullOpts.mkListOf types.str defaults.search.exclude ''
|
exclude = lib.nixvim.defaultNullOpts.mkListOf types.str defaults.search.exclude ''
|
||||||
Excluded filetypes and custom window filters.
|
Excluded filetypes and custom window filters.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
trigger = helpers.defaultNullOpts.mkStr defaults.search.trigger ''
|
trigger = lib.nixvim.defaultNullOpts.mkStr defaults.search.trigger ''
|
||||||
Optional trigger character that needs to be typed before a jump label can be used.
|
Optional trigger character that needs to be typed before a jump label can be used.
|
||||||
It's NOT recommended to set this, unless you know what you're doing.
|
It's NOT recommended to set this, unless you know what you're doing.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
max_length =
|
max_length =
|
||||||
helpers.defaultNullOpts.mkNullable (with types; either (enum [ false ]) int)
|
lib.nixvim.defaultNullOpts.mkNullable (with types; either (enum [ false ]) int)
|
||||||
defaults.search.max_length
|
defaults.search.max_length
|
||||||
''
|
''
|
||||||
Max pattern length. If the pattern length is equal to this labels will no longer be skipped.
|
Max pattern length. If the pattern length is equal to this labels will no longer be skipped.
|
||||||
|
|
@ -192,12 +191,12 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
};
|
};
|
||||||
|
|
||||||
jump = {
|
jump = {
|
||||||
jumplist = helpers.defaultNullOpts.mkBool defaults.jump.jumplist ''
|
jumplist = lib.nixvim.defaultNullOpts.mkBool defaults.jump.jumplist ''
|
||||||
Save location in the jumplist.
|
Save location in the jumplist.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
pos =
|
pos =
|
||||||
helpers.defaultNullOpts.mkEnum
|
lib.nixvim.defaultNullOpts.mkEnum
|
||||||
[
|
[
|
||||||
"start"
|
"start"
|
||||||
"end"
|
"end"
|
||||||
|
|
@ -208,28 +207,28 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
Jump position
|
Jump position
|
||||||
'';
|
'';
|
||||||
|
|
||||||
history = helpers.defaultNullOpts.mkBool defaults.jump.history ''
|
history = lib.nixvim.defaultNullOpts.mkBool defaults.jump.history ''
|
||||||
Add pattern to search history.
|
Add pattern to search history.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
register = helpers.defaultNullOpts.mkBool defaults.jump.register ''
|
register = lib.nixvim.defaultNullOpts.mkBool defaults.jump.register ''
|
||||||
Add pattern to search register.
|
Add pattern to search register.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
nohlsearch = helpers.defaultNullOpts.mkBool defaults.jump.nohlsearch ''
|
nohlsearch = lib.nixvim.defaultNullOpts.mkBool defaults.jump.nohlsearch ''
|
||||||
Clear highlight after jump
|
Clear highlight after jump
|
||||||
'';
|
'';
|
||||||
|
|
||||||
autojump = helpers.defaultNullOpts.mkBool defaults.jump.autojump ''
|
autojump = lib.nixvim.defaultNullOpts.mkBool defaults.jump.autojump ''
|
||||||
Automatically jump when there is only one match
|
Automatically jump when there is only one match
|
||||||
'';
|
'';
|
||||||
|
|
||||||
inclusive = helpers.defaultNullOpts.mkBool defaults.jump.inclusive ''
|
inclusive = lib.nixvim.defaultNullOpts.mkBool defaults.jump.inclusive ''
|
||||||
You can force inclusive/exclusive jumps by setting the `inclusive` option. By default it
|
You can force inclusive/exclusive jumps by setting the `inclusive` option. By default it
|
||||||
will be automatically set based on the mode.
|
will be automatically set based on the mode.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
offset = helpers.defaultNullOpts.mkInt defaults.jump.offset ''
|
offset = lib.nixvim.defaultNullOpts.mkInt defaults.jump.offset ''
|
||||||
jump position offset. Not used for range jumps.
|
jump position offset. Not used for range jumps.
|
||||||
0: default
|
0: default
|
||||||
1: when pos == "end" and pos < current position
|
1: when pos == "end" and pos < current position
|
||||||
|
|
@ -237,35 +236,35 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
};
|
};
|
||||||
|
|
||||||
label = {
|
label = {
|
||||||
uppercase = helpers.defaultNullOpts.mkBool defaults.label.uppercase ''
|
uppercase = lib.nixvim.defaultNullOpts.mkBool defaults.label.uppercase ''
|
||||||
Allow uppercase labels.
|
Allow uppercase labels.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
exclude = helpers.defaultNullOpts.mkStr defaults.label.exclude ''
|
exclude = lib.nixvim.defaultNullOpts.mkStr defaults.label.exclude ''
|
||||||
add any labels with the correct case here, that you want to exclude
|
add any labels with the correct case here, that you want to exclude
|
||||||
'';
|
'';
|
||||||
|
|
||||||
current = helpers.defaultNullOpts.mkBool true ''
|
current = lib.nixvim.defaultNullOpts.mkBool true ''
|
||||||
Add a label for the first match in the current window.
|
Add a label for the first match in the current window.
|
||||||
You can always jump to the first match with `<CR>`
|
You can always jump to the first match with `<CR>`
|
||||||
'';
|
'';
|
||||||
|
|
||||||
after =
|
after =
|
||||||
helpers.defaultNullOpts.mkNullableWithRaw (with types; either bool (listOf int))
|
lib.nixvim.defaultNullOpts.mkNullableWithRaw (with types; either bool (listOf int))
|
||||||
defaults.label.after
|
defaults.label.after
|
||||||
''
|
''
|
||||||
Show the label after the match
|
Show the label after the match
|
||||||
'';
|
'';
|
||||||
|
|
||||||
before =
|
before =
|
||||||
helpers.defaultNullOpts.mkNullableWithRaw (with types; either bool (listOf int))
|
lib.nixvim.defaultNullOpts.mkNullableWithRaw (with types; either bool (listOf int))
|
||||||
defaults.label.before
|
defaults.label.before
|
||||||
''
|
''
|
||||||
Show the label before the match
|
Show the label before the match
|
||||||
'';
|
'';
|
||||||
|
|
||||||
style =
|
style =
|
||||||
helpers.defaultNullOpts.mkEnum
|
lib.nixvim.defaultNullOpts.mkEnum
|
||||||
[
|
[
|
||||||
"eol"
|
"eol"
|
||||||
"overlay"
|
"overlay"
|
||||||
|
|
@ -278,7 +277,7 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
'';
|
'';
|
||||||
|
|
||||||
reuse =
|
reuse =
|
||||||
helpers.defaultNullOpts.mkEnum
|
lib.nixvim.defaultNullOpts.mkEnum
|
||||||
[
|
[
|
||||||
"lowercase"
|
"lowercase"
|
||||||
"all"
|
"all"
|
||||||
|
|
@ -290,25 +289,27 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
when typing more characters. By default only lower-case labels are re-used.
|
when typing more characters. By default only lower-case labels are re-used.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
distance = helpers.defaultNullOpts.mkBool defaults.label.distance ''
|
distance = lib.nixvim.defaultNullOpts.mkBool defaults.label.distance ''
|
||||||
for the current window, label targets closer to the cursor first
|
for the current window, label targets closer to the cursor first
|
||||||
'';
|
'';
|
||||||
|
|
||||||
min_pattern_length = helpers.defaultNullOpts.mkInt defaults.label.min_pattern_length ''
|
min_pattern_length = lib.nixvim.defaultNullOpts.mkInt defaults.label.min_pattern_length ''
|
||||||
minimum pattrn length to show labels
|
minimum pattrn length to show labels
|
||||||
Ignored for custom labelers.
|
Ignored for custom labelers.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
rainbow = {
|
rainbow = {
|
||||||
enabled = helpers.defaultNullOpts.mkBool defaults.label.rainbow.enabled ''
|
enabled = lib.nixvim.defaultNullOpts.mkBool defaults.label.rainbow.enabled ''
|
||||||
Enable this to use rainbow colors to highlight labels
|
Enable this to use rainbow colors to highlight labels
|
||||||
Can be useful for visualizing Treesitter ranges.
|
Can be useful for visualizing Treesitter ranges.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
shade = helpers.defaultNullOpts.mkNullable (types.ints.between 1 9) defaults.label.rainbow.shade "";
|
shade =
|
||||||
|
lib.nixvim.defaultNullOpts.mkNullable (types.ints.between 1 9) defaults.label.rainbow.shade
|
||||||
|
"";
|
||||||
};
|
};
|
||||||
|
|
||||||
format = helpers.defaultNullOpts.mkLuaFn defaults.label.format ''
|
format = lib.nixvim.defaultNullOpts.mkLuaFn defaults.label.format ''
|
||||||
With `format`, you can change how the label is rendered.
|
With `format`, you can change how the label is rendered.
|
||||||
Should return a list of `[text, highlight]` tuples.
|
Should return a list of `[text, highlight]` tuples.
|
||||||
|
|
||||||
|
|
@ -322,19 +323,19 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
};
|
};
|
||||||
|
|
||||||
highlight = {
|
highlight = {
|
||||||
backdrop = helpers.defaultNullOpts.mkBool defaults.highlight.backdrop ''
|
backdrop = lib.nixvim.defaultNullOpts.mkBool defaults.highlight.backdrop ''
|
||||||
Show a backdrop with hl FlashBackdrop.
|
Show a backdrop with hl FlashBackdrop.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
matches = helpers.defaultNullOpts.mkBool defaults.highlight.matches ''
|
matches = lib.nixvim.defaultNullOpts.mkBool defaults.highlight.matches ''
|
||||||
Highlight the search matches.
|
Highlight the search matches.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
priority = helpers.defaultNullOpts.mkPositiveInt defaults.highlight.priority ''
|
priority = lib.nixvim.defaultNullOpts.mkPositiveInt defaults.highlight.priority ''
|
||||||
Extmark priority.
|
Extmark priority.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
groups = mapAttrs (name: helpers.defaultNullOpts.mkStr defaults.highlight.groups.${name}) {
|
groups = mapAttrs (name: lib.nixvim.defaultNullOpts.mkStr defaults.highlight.groups.${name}) {
|
||||||
# opt = description
|
# opt = description
|
||||||
match = "FlashMatch";
|
match = "FlashMatch";
|
||||||
current = "FlashCurrent";
|
current = "FlashCurrent";
|
||||||
|
|
@ -343,47 +344,47 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
action = helpers.defaultNullOpts.mkLuaFn defaults.action ''
|
action = lib.nixvim.defaultNullOpts.mkLuaFn defaults.action ''
|
||||||
action to perform when picking a label.
|
action to perform when picking a label.
|
||||||
defaults to the jumping logic depending on the mode.
|
defaults to the jumping logic depending on the mode.
|
||||||
|
|
||||||
@type fun(match:Flash.Match, state:Flash.State)
|
@type fun(match:Flash.Match, state:Flash.State)
|
||||||
'';
|
'';
|
||||||
|
|
||||||
pattern = helpers.defaultNullOpts.mkStr defaults.pattern ''
|
pattern = lib.nixvim.defaultNullOpts.mkStr defaults.pattern ''
|
||||||
Initial pattern to use when opening flash.
|
Initial pattern to use when opening flash.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
continue = helpers.defaultNullOpts.mkBool defaults.continue ''
|
continue = lib.nixvim.defaultNullOpts.mkBool defaults.continue ''
|
||||||
When `true`, flash will try to continue the last search.
|
When `true`, flash will try to continue the last search.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
config = helpers.defaultNullOpts.mkLuaFn defaults.config ''
|
config = lib.nixvim.defaultNullOpts.mkLuaFn defaults.config ''
|
||||||
Set config to a function to dynamically change the config.
|
Set config to a function to dynamically change the config.
|
||||||
|
|
||||||
@type fun(opts:Flash.Config)
|
@type fun(opts:Flash.Config)
|
||||||
'';
|
'';
|
||||||
|
|
||||||
prompt = {
|
prompt = {
|
||||||
enabled = helpers.defaultNullOpts.mkBool defaults.prompt.enabled ''
|
enabled = lib.nixvim.defaultNullOpts.mkBool defaults.prompt.enabled ''
|
||||||
Options for the floating window that shows the prompt, for regular jumps.
|
Options for the floating window that shows the prompt, for regular jumps.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# Not sure what the type is...
|
# Not sure what the type is...
|
||||||
# Think it's listOf (maybeRaw (listOf (maybeRaw str)))?
|
# Think it's listOf (maybeRaw (listOf (maybeRaw str)))?
|
||||||
prefix = helpers.defaultNullOpts.mkListOf types.anything defaults.prompt.prefix "";
|
prefix = lib.nixvim.defaultNullOpts.mkListOf types.anything defaults.prompt.prefix "";
|
||||||
|
|
||||||
win_config = helpers.defaultNullOpts.mkAttrsOf types.anything defaults.prompt.win_config ''
|
win_config = lib.nixvim.defaultNullOpts.mkAttrsOf types.anything defaults.prompt.win_config ''
|
||||||
See `:h nvim_open_win` for more details.
|
See `:h nvim_open_win` for more details.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
remote_op = {
|
remote_op = {
|
||||||
restore = helpers.defaultNullOpts.mkBool defaults.remote_op.restore ''
|
restore = lib.nixvim.defaultNullOpts.mkBool defaults.remote_op.restore ''
|
||||||
Restore window views and cursor position after doing a remote operation.
|
Restore window views and cursor position after doing a remote operation.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
motion = helpers.defaultNullOpts.mkBool defaults.remote_op.motion ''
|
motion = lib.nixvim.defaultNullOpts.mkBool defaults.remote_op.motion ''
|
||||||
For `jump.pos = "range"`, this setting is ignored.
|
For `jump.pos = "range"`, this setting is ignored.
|
||||||
- `true`: always enter a new motion when doing a remote operation
|
- `true`: always enter a new motion when doing a remote operation
|
||||||
- `false`: use the window's cursor position and jump target
|
- `false`: use the window's cursor position and jump target
|
||||||
|
|
@ -401,7 +402,7 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
...
|
...
|
||||||
}@args:
|
}@args:
|
||||||
# FIXME: use mkNullableWithRaw when #1618 is fixed
|
# FIXME: use mkNullableWithRaw when #1618 is fixed
|
||||||
helpers.defaultNullOpts.mkNullable' (
|
lib.nixvim.defaultNullOpts.mkNullable' (
|
||||||
(removeAttrs args [
|
(removeAttrs args [
|
||||||
"options"
|
"options"
|
||||||
"defaults"
|
"defaults"
|
||||||
|
|
@ -441,7 +442,7 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
options = {
|
options = {
|
||||||
enabled = helpers.defaultNullOpts.mkBool defaults.enabled ''
|
enabled = lib.nixvim.defaultNullOpts.mkBool defaults.enabled ''
|
||||||
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()`
|
||||||
'';
|
'';
|
||||||
|
|
@ -477,7 +478,7 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
label = {
|
label = {
|
||||||
exclude = "hjkliardc";
|
exclude = "hjkliardc";
|
||||||
};
|
};
|
||||||
keys = helpers.listToUnkeyedAttrs (lib.stringToCharacters "fFtT;,");
|
keys = lib.nixvim.listToUnkeyedAttrs (lib.stringToCharacters "fFtT;,");
|
||||||
char_actions = ''
|
char_actions = ''
|
||||||
function(motion)
|
function(motion)
|
||||||
return {
|
return {
|
||||||
|
|
@ -497,21 +498,21 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
jump.register = false;
|
jump.register = false;
|
||||||
};
|
};
|
||||||
options = {
|
options = {
|
||||||
enabled = helpers.defaultNullOpts.mkBool defaults.enabled "";
|
enabled = lib.nixvim.defaultNullOpts.mkBool defaults.enabled "";
|
||||||
|
|
||||||
autohide = helpers.defaultNullOpts.mkBool defaults.autohide ''
|
autohide = lib.nixvim.defaultNullOpts.mkBool defaults.autohide ''
|
||||||
Hide after jump when not using jump labels.
|
Hide after jump when not using jump labels.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
jump_labels = helpers.defaultNullOpts.mkBool defaults.jump_labels ''
|
jump_labels = lib.nixvim.defaultNullOpts.mkBool defaults.jump_labels ''
|
||||||
Show jump labels.
|
Show jump labels.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
multi_line = helpers.defaultNullOpts.mkBool defaults.multi_line ''
|
multi_line = lib.nixvim.defaultNullOpts.mkBool defaults.multi_line ''
|
||||||
Set to `false` to use the current line only.
|
Set to `false` to use the current line only.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
keys = helpers.defaultNullOpts.mkAttrsOf' {
|
keys = lib.nixvim.defaultNullOpts.mkAttrsOf' {
|
||||||
type = types.str;
|
type = types.str;
|
||||||
pluginDefault = defaults.keys;
|
pluginDefault = defaults.keys;
|
||||||
description = ''
|
description = ''
|
||||||
|
|
@ -526,7 +527,7 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
char_actions = helpers.defaultNullOpts.mkLuaFn defaults.char_actions ''
|
char_actions = lib.nixvim.defaultNullOpts.mkLuaFn defaults.char_actions ''
|
||||||
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.
|
||||||
'';
|
'';
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,12 @@
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
helpers,
|
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib;
|
with lib;
|
||||||
let
|
let
|
||||||
settingsOptions = {
|
settingsOptions = {
|
||||||
fzf_bin = helpers.mkNullOrStr ''
|
fzf_bin = lib.nixvim.mkNullOrStr ''
|
||||||
The path to the `fzf` binary to use.
|
The path to the `fzf` binary to use.
|
||||||
|
|
||||||
Example: `"sk"`
|
Example: `"sk"`
|
||||||
|
|
@ -55,7 +54,7 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
visible = false;
|
visible = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
profile = helpers.defaultNullOpts.mkEnumFirstDefault [
|
profile = lib.nixvim.defaultNullOpts.mkEnumFirstDefault [
|
||||||
"default"
|
"default"
|
||||||
"fzf-native"
|
"fzf-native"
|
||||||
"fzf-tmux"
|
"fzf-tmux"
|
||||||
|
|
@ -76,13 +75,13 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
description = "The `fzf-lua` action to run";
|
description = "The `fzf-lua` action to run";
|
||||||
example = "git_files";
|
example = "git_files";
|
||||||
};
|
};
|
||||||
settings = helpers.mkSettingsOption {
|
settings = lib.nixvim.mkSettingsOption {
|
||||||
options = settingsOptions;
|
options = settingsOptions;
|
||||||
description = "`fzf-lua` settings for this command.";
|
description = "`fzf-lua` settings for this command.";
|
||||||
example = settingsExample;
|
example = settingsExample;
|
||||||
};
|
};
|
||||||
mode = helpers.keymaps.mkModeOption "n";
|
mode = lib.nixvim.keymaps.mkModeOption "n";
|
||||||
options = helpers.keymaps.mapConfigOptions;
|
options = lib.nixvim.keymaps.mapConfigOptions;
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
helpers,
|
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib;
|
with lib;
|
||||||
|
|
@ -23,7 +22,7 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
|
|
||||||
settingsOptions = {
|
settingsOptions = {
|
||||||
default_mappings =
|
default_mappings =
|
||||||
helpers.defaultNullOpts.mkNullable (with types; either bool (attrsOf str)) true
|
lib.nixvim.defaultNullOpts.mkNullable (with types; either bool (attrsOf str)) true
|
||||||
''
|
''
|
||||||
This plugin offers default buffer local mappings inside conflicted files.
|
This plugin offers default buffer local mappings inside conflicted files.
|
||||||
This is primarily because applying these mappings only to relevant buffers is impossible
|
This is primarily because applying these mappings only to relevant buffers is impossible
|
||||||
|
|
@ -44,28 +43,28 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
```
|
```
|
||||||
'';
|
'';
|
||||||
|
|
||||||
default_commands = helpers.defaultNullOpts.mkBool true ''
|
default_commands = lib.nixvim.defaultNullOpts.mkBool true ''
|
||||||
Set to `false` to disable commands created by this plugin.
|
Set to `false` to disable commands created by this plugin.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
disable_diagnostics = helpers.defaultNullOpts.mkBool false ''
|
disable_diagnostics = lib.nixvim.defaultNullOpts.mkBool false ''
|
||||||
This will disable the diagnostics in a buffer whilst it is conflicted.
|
This will disable the diagnostics in a buffer whilst it is conflicted.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
list_opener = helpers.defaultNullOpts.mkStr "copen" ''
|
list_opener = lib.nixvim.defaultNullOpts.mkStr "copen" ''
|
||||||
Command or function to open the conflicts list.
|
Command or function to open the conflicts list.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
highlights = {
|
highlights = {
|
||||||
incoming = helpers.defaultNullOpts.mkStr "DiffAdd" ''
|
incoming = lib.nixvim.defaultNullOpts.mkStr "DiffAdd" ''
|
||||||
Which highlight group to use for incoming changes.
|
Which highlight group to use for incoming changes.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
current = helpers.defaultNullOpts.mkStr "DiffText" ''
|
current = lib.nixvim.defaultNullOpts.mkStr "DiffText" ''
|
||||||
Which highlight group to use for current changes.
|
Which highlight group to use for current changes.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
ancestor = helpers.mkNullOrStr ''
|
ancestor = lib.nixvim.mkNullOrStr ''
|
||||||
Which highlight group to use for ancestor.
|
Which highlight group to use for ancestor.
|
||||||
|
|
||||||
Plugin default: `null`
|
Plugin default: `null`
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
helpers,
|
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib;
|
with lib;
|
||||||
|
|
@ -26,9 +25,9 @@ lib.nixvim.plugins.mkVimPlugin {
|
||||||
example = "<leader>gi";
|
example = "<leader>gi";
|
||||||
};
|
};
|
||||||
|
|
||||||
mode = helpers.keymaps.mkModeOption "n";
|
mode = lib.nixvim.keymaps.mkModeOption "n";
|
||||||
|
|
||||||
options = helpers.keymaps.mapConfigOptions;
|
options = lib.nixvim.keymaps.mapConfigOptions;
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
helpers,
|
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib;
|
with lib;
|
||||||
|
|
@ -23,7 +22,7 @@ lib.nixvim.plugins.mkVimPlugin {
|
||||||
];
|
];
|
||||||
|
|
||||||
settingsOptions = {
|
settingsOptions = {
|
||||||
executable = helpers.defaultNullOpts.mkStr "godot" ''
|
executable = lib.nixvim.defaultNullOpts.mkStr "godot" ''
|
||||||
Path to the `godot` executable.
|
Path to the `godot` executable.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
helpers,
|
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib.nixvim.plugins;
|
with lib.nixvim.plugins;
|
||||||
|
|
@ -14,11 +13,11 @@ mkVimPlugin {
|
||||||
maintainers = [ maintainers.GaetanLepage ];
|
maintainers = [ maintainers.GaetanLepage ];
|
||||||
|
|
||||||
settingsOptions = {
|
settingsOptions = {
|
||||||
width = helpers.mkNullOrOption types.ints.unsigned "width";
|
width = lib.nixvim.mkNullOrOption types.ints.unsigned "width";
|
||||||
|
|
||||||
height = helpers.mkNullOrOption types.ints.unsigned "height";
|
height = lib.nixvim.mkNullOrOption types.ints.unsigned "height";
|
||||||
|
|
||||||
linenr = helpers.defaultNullOpts.mkFlagInt 0 ''
|
linenr = lib.nixvim.defaultNullOpts.mkFlagInt 0 ''
|
||||||
Show line numbers when in Goyo mode.
|
Show line numbers when in Goyo mode.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
helpers,
|
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib;
|
with lib;
|
||||||
|
|
@ -13,10 +12,10 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
|
|
||||||
extraOptions = {
|
extraOptions = {
|
||||||
# A list of `Hydra` definitions
|
# A list of `Hydra` definitions
|
||||||
hydras = import ./hydras-option.nix { inherit lib helpers; };
|
hydras = import ./hydras-option.nix { inherit lib; };
|
||||||
};
|
};
|
||||||
|
|
||||||
settingsOptions = import ./settings-options.nix { inherit lib helpers; };
|
settingsOptions = import ./settings-options.nix { inherit lib; };
|
||||||
|
|
||||||
settingsExample = {
|
settingsExample = {
|
||||||
exit = false;
|
exit = false;
|
||||||
|
|
|
||||||
|
|
@ -1,23 +1,23 @@
|
||||||
{ lib, helpers }:
|
{ lib }:
|
||||||
with lib;
|
with lib;
|
||||||
let
|
let
|
||||||
hydraType = types.submodule {
|
hydraType = types.submodule {
|
||||||
freeformType = with types; attrsOf anything;
|
freeformType = with types; attrsOf anything;
|
||||||
options = {
|
options = {
|
||||||
name = helpers.mkNullOrStr ''
|
name = lib.nixvim.mkNullOrStr ''
|
||||||
Hydra's name.
|
Hydra's name.
|
||||||
Only used in auto-generated hint.
|
Only used in auto-generated hint.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
mode = helpers.defaultNullOpts.mkNullable (
|
mode = lib.nixvim.defaultNullOpts.mkNullable (
|
||||||
with lib.types; either helpers.keymaps.modeEnum (listOf helpers.keymaps.modeEnum)
|
with lib.types; either lib.nixvim.keymaps.modeEnum (listOf lib.nixvim.keymaps.modeEnum)
|
||||||
) "n" "Modes where the hydra exists, same as `vim.keymap.set()` accepts.";
|
) "n" "Modes where the hydra exists, same as `vim.keymap.set()` accepts.";
|
||||||
|
|
||||||
body = helpers.mkNullOrStr ''
|
body = lib.nixvim.mkNullOrStr ''
|
||||||
Key required to activate the hydra, when excluded, you can use `Hydra:activate()`.
|
Key required to activate the hydra, when excluded, you can use `Hydra:activate()`.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
hint = helpers.mkNullOrStr ''
|
hint = lib.nixvim.mkNullOrStr ''
|
||||||
The hint for a hydra can let you know that it's active, and remind you of the
|
The hint for a hydra can let you know that it's active, and remind you of the
|
||||||
hydra's heads.
|
hydra's heads.
|
||||||
The string for the hint is passed directly to the hydra.
|
The string for the hint is passed directly to the hydra.
|
||||||
|
|
@ -26,56 +26,56 @@ let
|
||||||
for more information.
|
for more information.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
config = import ./settings-options.nix { inherit lib helpers; };
|
config = import ./settings-options.nix { inherit lib; };
|
||||||
|
|
||||||
heads =
|
heads =
|
||||||
let
|
let
|
||||||
headsOptType = types.submodule {
|
headsOptType = types.submodule {
|
||||||
freeformType = with types; attrsOf anything;
|
freeformType = with types; attrsOf anything;
|
||||||
options = {
|
options = {
|
||||||
private = helpers.defaultNullOpts.mkBool false ''
|
private = lib.nixvim.defaultNullOpts.mkBool false ''
|
||||||
"When the hydra hides, this head does not stick out".
|
"When the hydra hides, this head does not stick out".
|
||||||
Private heads are unreachable outside of the hydra state.
|
Private heads are unreachable outside of the hydra state.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
exit = helpers.defaultNullOpts.mkBool false ''
|
exit = lib.nixvim.defaultNullOpts.mkBool false ''
|
||||||
When true, stops the hydra after executing this head.
|
When true, stops the hydra after executing this head.
|
||||||
NOTE:
|
NOTE:
|
||||||
- All exit heads are private
|
- All exit heads are private
|
||||||
- If no exit head is specified, `esc` is set by default
|
- If no exit head is specified, `esc` is set by default
|
||||||
'';
|
'';
|
||||||
|
|
||||||
exit_before = helpers.defaultNullOpts.mkBool false ''
|
exit_before = lib.nixvim.defaultNullOpts.mkBool false ''
|
||||||
Like `exit`, but stops the hydra BEFORE executing the command.
|
Like `exit`, but stops the hydra BEFORE executing the command.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
ok_key = helpers.defaultNullOpts.mkBool true ''
|
ok_key = lib.nixvim.defaultNullOpts.mkBool true ''
|
||||||
When set to `false`, `config.on_key` isn't run after this head.
|
When set to `false`, `config.on_key` isn't run after this head.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
desc = helpers.mkNullOrStr ''
|
desc = lib.nixvim.mkNullOrStr ''
|
||||||
Value shown in auto-generated hint.
|
Value shown in auto-generated hint.
|
||||||
When false, this key doesn't show up in the auto-generated hint.
|
When false, this key doesn't show up in the auto-generated hint.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
expr = helpers.defaultNullOpts.mkBool false ''
|
expr = lib.nixvim.defaultNullOpts.mkBool false ''
|
||||||
Same as the builtin `expr` map option.
|
Same as the builtin `expr` map option.
|
||||||
See `:h :map-expression`.
|
See `:h :map-expression`.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
silent = helpers.defaultNullOpts.mkBool false ''
|
silent = lib.nixvim.defaultNullOpts.mkBool false ''
|
||||||
Same as the builtin `silent` map option.
|
Same as the builtin `silent` map option.
|
||||||
See `:h :map-silent`.
|
See `:h :map-silent`.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
nowait = helpers.defaultNullOpts.mkBool false ''
|
nowait = lib.nixvim.defaultNullOpts.mkBool false ''
|
||||||
For Pink Hydras only.
|
For Pink Hydras only.
|
||||||
Allows binding a key which will immediately perform its action and not wait
|
Allows binding a key which will immediately perform its action and not wait
|
||||||
`timeoutlen` for a possible continuation.
|
`timeoutlen` for a possible continuation.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
mode = helpers.mkNullOrOption (
|
mode = lib.nixvim.mkNullOrOption (
|
||||||
with lib.types; either helpers.keymaps.modeEnum (listOf helpers.keymaps.modeEnum)
|
with lib.types; either lib.nixvim.keymaps.modeEnum (listOf lib.nixvim.keymaps.modeEnum)
|
||||||
) "Override `mode` for this head.";
|
) "Override `mode` for this head.";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
@ -93,7 +93,7 @@ let
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
in
|
in
|
||||||
helpers.mkNullOrOption (types.listOf headType) ''
|
lib.nixvim.mkNullOrOption (types.listOf headType) ''
|
||||||
Each Hydra's head has the form:
|
Each Hydra's head has the form:
|
||||||
`[head rhs opts]
|
`[head rhs opts]
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,19 +5,19 @@
|
||||||
# - for `plugins.hydra.hydras.[].config`
|
# - for `plugins.hydra.hydras.[].config`
|
||||||
#
|
#
|
||||||
# -> https://github.com/nvimtools/hydra.nvim?tab=readme-ov-file#config
|
# -> https://github.com/nvimtools/hydra.nvim?tab=readme-ov-file#config
|
||||||
{ helpers, lib, ... }:
|
{ lib, ... }:
|
||||||
with lib;
|
with lib;
|
||||||
{
|
{
|
||||||
debug = helpers.defaultNullOpts.mkBool false ''
|
debug = lib.nixvim.defaultNullOpts.mkBool false ''
|
||||||
Whether to enable debug mode.
|
Whether to enable debug mode.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
exit = helpers.defaultNullOpts.mkBool false ''
|
exit = lib.nixvim.defaultNullOpts.mkBool false ''
|
||||||
Set the default exit value for each head in the hydra.
|
Set the default exit value for each head in the hydra.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
foreign_keys =
|
foreign_keys =
|
||||||
helpers.defaultNullOpts.mkEnum
|
lib.nixvim.defaultNullOpts.mkEnum
|
||||||
[
|
[
|
||||||
"warn"
|
"warn"
|
||||||
"run"
|
"run"
|
||||||
|
|
@ -30,38 +30,38 @@ with lib;
|
||||||
- `"run"`: hydra stays active, runs the foreign key
|
- `"run"`: hydra stays active, runs the foreign key
|
||||||
'';
|
'';
|
||||||
|
|
||||||
color = helpers.defaultNullOpts.mkStr "red" ''
|
color = lib.nixvim.defaultNullOpts.mkStr "red" ''
|
||||||
See `:h hydra-colors`.
|
See `:h hydra-colors`.
|
||||||
`"red" | "amaranth" | "teal" | "pink"`
|
`"red" | "amaranth" | "teal" | "pink"`
|
||||||
'';
|
'';
|
||||||
|
|
||||||
buffer = helpers.defaultNullOpts.mkNullable (
|
buffer = lib.nixvim.defaultNullOpts.mkNullable (
|
||||||
with types; either (enum [ true ]) ints.unsigned
|
with types; either (enum [ true ]) ints.unsigned
|
||||||
) null "Define a hydra for the given buffer, pass `true` for current buf.";
|
) null "Define a hydra for the given buffer, pass `true` for current buf.";
|
||||||
|
|
||||||
invoke_on_body = helpers.defaultNullOpts.mkBool false ''
|
invoke_on_body = lib.nixvim.defaultNullOpts.mkBool false ''
|
||||||
When true, summon the hydra after pressing only the `body` keys.
|
When true, summon the hydra after pressing only the `body` keys.
|
||||||
Normally a head is required.
|
Normally a head is required.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
desc = helpers.defaultNullOpts.mkStr null ''
|
desc = lib.nixvim.defaultNullOpts.mkStr null ''
|
||||||
Description used for the body keymap when `invoke_on_body` is true.
|
Description used for the body keymap when `invoke_on_body` is true.
|
||||||
When nil, "[Hydra] .. name" is used.
|
When nil, "[Hydra] .. name" is used.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
on_enter = helpers.mkNullOrLuaFn ''
|
on_enter = lib.nixvim.mkNullOrLuaFn ''
|
||||||
Called when the hydra is activated.
|
Called when the hydra is activated.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
on_exit = helpers.mkNullOrLuaFn ''
|
on_exit = lib.nixvim.mkNullOrLuaFn ''
|
||||||
Called before the hydra is deactivated.
|
Called before the hydra is deactivated.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
on_key = helpers.mkNullOrLuaFn ''
|
on_key = lib.nixvim.mkNullOrLuaFn ''
|
||||||
Called after every hydra head.
|
Called after every hydra head.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
timeout = helpers.defaultNullOpts.mkNullable (with types; either bool ints.unsigned) false ''
|
timeout = lib.nixvim.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`)
|
||||||
|
|
@ -76,7 +76,7 @@ with lib;
|
||||||
freeformType = with types; attrsOf anything;
|
freeformType = with types; attrsOf anything;
|
||||||
options = {
|
options = {
|
||||||
type =
|
type =
|
||||||
helpers.mkNullOrOption
|
lib.nixvim.mkNullOrOption
|
||||||
(types.enum [
|
(types.enum [
|
||||||
"window"
|
"window"
|
||||||
"cmdline"
|
"cmdline"
|
||||||
|
|
@ -93,7 +93,7 @@ with lib;
|
||||||
Defaults to "window" if `hint` is passed to the hydra otherwise defaults to "cmdline".
|
Defaults to "window" if `hint` is passed to the hydra otherwise defaults to "cmdline".
|
||||||
'';
|
'';
|
||||||
|
|
||||||
position = helpers.defaultNullOpts.mkEnum [
|
position = lib.nixvim.defaultNullOpts.mkEnum [
|
||||||
"top-left"
|
"top-left"
|
||||||
"top"
|
"top"
|
||||||
"top-right"
|
"top-right"
|
||||||
|
|
@ -105,23 +105,23 @@ with lib;
|
||||||
"bottom-right"
|
"bottom-right"
|
||||||
] "bottom" "Set the position of the hint window.";
|
] "bottom" "Set the position of the hint window.";
|
||||||
|
|
||||||
offset = helpers.defaultNullOpts.mkInt 0 ''
|
offset = lib.nixvim.defaultNullOpts.mkInt 0 ''
|
||||||
Offset of the floating window from the nearest editor border.
|
Offset of the floating window from the nearest editor border.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
float_opts = helpers.mkNullOrOption (with types; attrsOf anything) ''
|
float_opts = lib.nixvim.mkNullOrOption (with types; attrsOf anything) ''
|
||||||
Options passed to `nvim_open_win()`. See `:h nvim_open_win()`.
|
Options passed to `nvim_open_win()`. See `:h nvim_open_win()`.
|
||||||
Lets you set `border`, `header`, `footer`, etc.
|
Lets you set `border`, `header`, `footer`, etc.
|
||||||
|
|
||||||
Note: `row`, `col`, `height`, `width`, `relative`, and `anchor` should not be overridden.
|
Note: `row`, `col`, `height`, `width`, `relative`, and `anchor` should not be overridden.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
show_name = helpers.defaultNullOpts.mkBool true ''
|
show_name = lib.nixvim.defaultNullOpts.mkBool true ''
|
||||||
Show the hydras name (or "HYDRA:" if not given a name), at the beginning of an
|
Show the hydras name (or "HYDRA:" if not given a name), at the beginning of an
|
||||||
auto-generated hint.
|
auto-generated hint.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
hide_on_load = helpers.defaultNullOpts.mkBool false ''
|
hide_on_load = lib.nixvim.defaultNullOpts.mkBool false ''
|
||||||
If set to true, this will prevent the hydra's hint window from displaying immediately.
|
If set to true, this will prevent the hydra's hint window from displaying immediately.
|
||||||
|
|
||||||
Note: you can still show the window manually by calling `Hydra.hint:show()` and manually
|
Note: you can still show the window manually by calling `Hydra.hint:show()` and manually
|
||||||
|
|
@ -160,7 +160,7 @@ with lib;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
helpers.defaultNullOpts.mkNullable (with types; either (enum [ false ]) hintConfigType)
|
lib.nixvim.defaultNullOpts.mkNullable (with types; either (enum [ false ]) hintConfigType)
|
||||||
{
|
{
|
||||||
show_name = true;
|
show_name = true;
|
||||||
position = "bottom";
|
position = "bottom";
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
helpers,
|
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib;
|
with lib;
|
||||||
|
|
@ -30,7 +29,7 @@ lib.nixvim.plugins.mkVimPlugin {
|
||||||
example = "!";
|
example = "!";
|
||||||
};
|
};
|
||||||
|
|
||||||
mode = helpers.keymaps.mkModeOption "";
|
mode = lib.nixvim.keymaps.mkModeOption "";
|
||||||
|
|
||||||
action = mkOption {
|
action = mkOption {
|
||||||
type =
|
type =
|
||||||
|
|
@ -58,7 +57,7 @@ lib.nixvim.plugins.mkVimPlugin {
|
||||||
example = "in_place";
|
example = "in_place";
|
||||||
};
|
};
|
||||||
|
|
||||||
options = helpers.keymaps.mapConfigOptions;
|
options = lib.nixvim.keymaps.mapConfigOptions;
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
default = [ ];
|
default = [ ];
|
||||||
|
|
@ -119,7 +118,7 @@ lib.nixvim.plugins.mkVimPlugin {
|
||||||
isString keymap.action
|
isString keymap.action
|
||||||
# One of the plugin builtin functions
|
# One of the plugin builtin functions
|
||||||
then
|
then
|
||||||
helpers.mkRaw "require('improved-search').${keymap.action}"
|
lib.nixvim.mkRaw "require('improved-search').${keymap.action}"
|
||||||
# If the user specifies a raw action directly
|
# If the user specifies a raw action directly
|
||||||
else
|
else
|
||||||
keymap.action;
|
keymap.action;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
helpers,
|
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib;
|
with lib;
|
||||||
|
|
@ -14,52 +13,52 @@ mkVimPlugin {
|
||||||
maintainers = [ maintainers.GaetanLepage ];
|
maintainers = [ maintainers.GaetanLepage ];
|
||||||
|
|
||||||
settingsOptions = {
|
settingsOptions = {
|
||||||
username = helpers.mkNullOrStr ''
|
username = lib.nixvim.mkNullOrStr ''
|
||||||
Username.
|
Username.
|
||||||
Explicitly set to `null` if you do not want this option to be set.
|
Explicitly set to `null` if you do not want this option to be set.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
only_cwd = helpers.defaultNullOpts.mkBool true ''
|
only_cwd = lib.nixvim.defaultNullOpts.mkBool true ''
|
||||||
Choose whether to share files only in the current working directory in session mode.
|
Choose whether to share files only in the current working directory in session mode.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
cursor_hl_group_user1 = helpers.defaultNullOpts.mkStr "Cursor" ''
|
cursor_hl_group_user1 = lib.nixvim.defaultNullOpts.mkStr "Cursor" ''
|
||||||
Cursor highlight group for user 1.
|
Cursor highlight group for user 1.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
cursor_hl_group_user2 = helpers.defaultNullOpts.mkStr "Cursor" ''
|
cursor_hl_group_user2 = lib.nixvim.defaultNullOpts.mkStr "Cursor" ''
|
||||||
Cursor highlight group for user 2.
|
Cursor highlight group for user 2.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
cursor_hl_group_user3 = helpers.defaultNullOpts.mkStr "Cursor" ''
|
cursor_hl_group_user3 = lib.nixvim.defaultNullOpts.mkStr "Cursor" ''
|
||||||
Cursor highlight group for user 3.
|
Cursor highlight group for user 3.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
cursor_hl_group_user4 = helpers.defaultNullOpts.mkStr "Cursor" ''
|
cursor_hl_group_user4 = lib.nixvim.defaultNullOpts.mkStr "Cursor" ''
|
||||||
Cursor highlight group for user 4.
|
Cursor highlight group for user 4.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
cursor_hl_group_default = helpers.defaultNullOpts.mkStr "Cursor" ''
|
cursor_hl_group_default = lib.nixvim.defaultNullOpts.mkStr "Cursor" ''
|
||||||
Cursor highlight group for any other userr.
|
Cursor highlight group for any other userr.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
name_hl_group_user1 = helpers.defaultNullOpts.mkStr "CursorLineNr" ''
|
name_hl_group_user1 = lib.nixvim.defaultNullOpts.mkStr "CursorLineNr" ''
|
||||||
Virtual text highlight group for user 1.
|
Virtual text highlight group for user 1.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
name_hl_group_user2 = helpers.defaultNullOpts.mkStr "CursorLineNr" ''
|
name_hl_group_user2 = lib.nixvim.defaultNullOpts.mkStr "CursorLineNr" ''
|
||||||
Virtual text highlight group for user 2.
|
Virtual text highlight group for user 2.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
name_hl_group_user3 = helpers.defaultNullOpts.mkStr "CursorLineNr" ''
|
name_hl_group_user3 = lib.nixvim.defaultNullOpts.mkStr "CursorLineNr" ''
|
||||||
Virtual text highlight group for user 3.
|
Virtual text highlight group for user 3.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
name_hl_group_user4 = helpers.defaultNullOpts.mkStr "CursorLineNr" ''
|
name_hl_group_user4 = lib.nixvim.defaultNullOpts.mkStr "CursorLineNr" ''
|
||||||
Virtual text highlight group for user 4.
|
Virtual text highlight group for user 4.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
name_hl_group_default = helpers.defaultNullOpts.mkStr "CursorLineNr" ''
|
name_hl_group_default = lib.nixvim.defaultNullOpts.mkStr "CursorLineNr" ''
|
||||||
Virtual text highlight group for any other user.
|
Virtual text highlight group for any other user.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
helpers,
|
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
|
|
@ -45,7 +44,7 @@ lib.nixvim.plugins.mkVimPlugin {
|
||||||
|
|
||||||
settingsOptions = {
|
settingsOptions = {
|
||||||
delimit_cells_by =
|
delimit_cells_by =
|
||||||
helpers.defaultNullOpts.mkEnumFirstDefault
|
lib.nixvim.defaultNullOpts.mkEnumFirstDefault
|
||||||
[
|
[
|
||||||
"marks"
|
"marks"
|
||||||
"tags"
|
"tags"
|
||||||
|
|
@ -54,7 +53,7 @@ lib.nixvim.plugins.mkVimPlugin {
|
||||||
Specifies if cells are delimited by 'marks' or 'tags'.
|
Specifies if cells are delimited by 'marks' or 'tags'.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
tag = helpers.defaultNullOpts.mkStr "##" "Specifies the tag format.";
|
tag = lib.nixvim.defaultNullOpts.mkStr "##" "Specifies the tag format.";
|
||||||
};
|
};
|
||||||
|
|
||||||
extraOptions = {
|
extraOptions = {
|
||||||
|
|
@ -65,7 +64,9 @@ lib.nixvim.plugins.mkVimPlugin {
|
||||||
default = false;
|
default = false;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
// (mapAttrs (name: value: helpers.mkNullOrOption types.str "Keymap for ${value.desc}.") mappings);
|
// (mapAttrs (
|
||||||
|
name: value: lib.nixvim.mkNullOrOption types.str "Keymap for ${value.desc}."
|
||||||
|
) mappings);
|
||||||
};
|
};
|
||||||
|
|
||||||
extraConfig = cfg: {
|
extraConfig = cfg: {
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{ lib, helpers, ... }:
|
{ lib, ... }:
|
||||||
let
|
let
|
||||||
inherit (lib.nixvim) defaultNullOpts;
|
inherit (lib.nixvim) defaultNullOpts;
|
||||||
in
|
in
|
||||||
|
|
@ -89,7 +89,7 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
Whether to enable virtual hint.
|
Whether to enable virtual hint.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
hint_prefix = helpers.defaultNullOpts.mkNullable' {
|
hint_prefix = lib.nixvim.defaultNullOpts.mkNullable' {
|
||||||
type = lib.types.anything;
|
type = lib.types.anything;
|
||||||
pluginDefault = "🐼 ";
|
pluginDefault = "🐼 ";
|
||||||
description = ''
|
description = ''
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
helpers,
|
|
||||||
config,
|
config,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
|
@ -28,7 +27,7 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
description = "Integrate with nvim-cmp";
|
description = "Integrate with nvim-cmp";
|
||||||
};
|
};
|
||||||
|
|
||||||
after = helpers.mkNullOrOption types.str "Function to run after calculating the formatting. function(entry, vim_item, kind)";
|
after = lib.nixvim.mkNullOrOption types.str "Function to run after calculating the formatting. function(entry, vim_item, kind)";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
helpers,
|
|
||||||
config,
|
config,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
|
@ -15,7 +14,7 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
callSetup = false;
|
callSetup = false;
|
||||||
|
|
||||||
settingsOptions = {
|
settingsOptions = {
|
||||||
path = helpers.defaultNullOpts.mkStr "" ''
|
path = lib.nixvim.defaultNullOpts.mkStr "" ''
|
||||||
Path (relative to project root) to load external files from.
|
Path (relative to project root) to load external files from.
|
||||||
|
|
||||||
Commonly used values are:
|
Commonly used values are:
|
||||||
|
|
@ -23,16 +22,16 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
- `.vscode` for compatibility with projects using the associated VS Code extension.
|
- `.vscode` for compatibility with projects using the associated VS Code extension.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
init_check = helpers.defaultNullOpts.mkBool true ''
|
init_check = lib.nixvim.defaultNullOpts.mkBool true ''
|
||||||
Whether to load dictionaries on startup.
|
Whether to load dictionaries on startup.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
load_langs = helpers.defaultNullOpts.mkListOf types.str [ "en-US" ] ''
|
load_langs = lib.nixvim.defaultNullOpts.mkListOf types.str [ "en-US" ] ''
|
||||||
Languages for witch dicionnaries will be loaded.
|
Languages for witch dicionnaries will be loaded.
|
||||||
See `plugins.lsp.servers.ltex.languages` for possible values.
|
See `plugins.lsp.servers.ltex.languages` for possible values.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
log_level = helpers.defaultNullOpts.mkEnumFirstDefault [
|
log_level = lib.nixvim.defaultNullOpts.mkEnumFirstDefault [
|
||||||
"none"
|
"none"
|
||||||
"trace"
|
"trace"
|
||||||
"debug"
|
"debug"
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
helpers,
|
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib;
|
with lib;
|
||||||
|
|
@ -15,7 +14,7 @@ mkVimPlugin {
|
||||||
|
|
||||||
settingsOptions = {
|
settingsOptions = {
|
||||||
image_provider =
|
image_provider =
|
||||||
helpers.defaultNullOpts.mkEnumFirstDefault
|
lib.nixvim.defaultNullOpts.mkEnumFirstDefault
|
||||||
[
|
[
|
||||||
"none"
|
"none"
|
||||||
"ueberzug"
|
"ueberzug"
|
||||||
|
|
@ -28,7 +27,7 @@ mkVimPlugin {
|
||||||
- "kitty" -- use the Kitty protocol to display images.
|
- "kitty" -- use the Kitty protocol to display images.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
automatically_open_output = helpers.defaultNullOpts.mkBool true ''
|
automatically_open_output = lib.nixvim.defaultNullOpts.mkBool true ''
|
||||||
If this is true, then whenever you have an active cell its output window will be
|
If this is true, then whenever you have an active cell its output window will be
|
||||||
automatically shown.
|
automatically shown.
|
||||||
|
|
||||||
|
|
@ -40,27 +39,27 @@ mkVimPlugin {
|
||||||
You can then open the output window at will using `:MagmaShowOutput`.
|
You can then open the output window at will using `:MagmaShowOutput`.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
wrap_output = helpers.defaultNullOpts.mkBool true ''
|
wrap_output = lib.nixvim.defaultNullOpts.mkBool true ''
|
||||||
If this is true, then text output in the output window will be wrapped (akin to `set wrap`).
|
If this is true, then text output in the output window will be wrapped (akin to `set wrap`).
|
||||||
'';
|
'';
|
||||||
|
|
||||||
output_window_borders = helpers.defaultNullOpts.mkBool true ''
|
output_window_borders = lib.nixvim.defaultNullOpts.mkBool true ''
|
||||||
If this is true, then the output window will have rounded borders.
|
If this is true, then the output window will have rounded borders.
|
||||||
If it is false, it will have no borders.
|
If it is false, it will have no borders.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
cell_highlight_group = helpers.defaultNullOpts.mkStr "CursorLine" ''
|
cell_highlight_group = lib.nixvim.defaultNullOpts.mkStr "CursorLine" ''
|
||||||
The highlight group to be used for highlighting cells.
|
The highlight group to be used for highlighting cells.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
save_path = helpers.defaultNullOpts.mkStr (lib.nixvim.literalLua "vim.fn.stdpath('data') .. '/magma'") ''
|
save_path = lib.nixvim.defaultNullOpts.mkStr (lib.nixvim.literalLua "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
|
||||||
extension `.json`.
|
extension `.json`.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
show_mimetype_debug = helpers.defaultNullOpts.mkBool false ''
|
show_mimetype_debug = lib.nixvim.defaultNullOpts.mkBool false ''
|
||||||
If this is true, then before any non-iostream output chunk, Magma shows the mimetypes it
|
If this is true, then before any non-iostream output chunk, Magma shows the mimetypes it
|
||||||
received for it.
|
received for it.
|
||||||
This is meant for debugging and adding new mimetypes.
|
This is meant for debugging and adding new mimetypes.
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
config,
|
config,
|
||||||
helpers,
|
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib;
|
with lib;
|
||||||
|
|
@ -13,21 +12,21 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
maintainers = [ maintainers.GaetanLepage ];
|
maintainers = [ maintainers.GaetanLepage ];
|
||||||
|
|
||||||
settingsOptions = {
|
settingsOptions = {
|
||||||
history = helpers.defaultNullOpts.mkUnsignedInt 1000 ''
|
history = lib.nixvim.defaultNullOpts.mkUnsignedInt 1000 ''
|
||||||
The max number of entries to store.
|
The max number of entries to store.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
enable_persistent_history = helpers.defaultNullOpts.mkBool false ''
|
enable_persistent_history = lib.nixvim.defaultNullOpts.mkBool false ''
|
||||||
If set to `true` the history is stored on `VimLeavePre` using `sqlite.lua` and lazy loaded when
|
If set to `true` the history is stored on `VimLeavePre` using `sqlite.lua` and lazy loaded when
|
||||||
querying.
|
querying.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
length_limit = helpers.defaultNullOpts.mkUnsignedInt 1048576 ''
|
length_limit = lib.nixvim.defaultNullOpts.mkUnsignedInt 1048576 ''
|
||||||
The max number of characters of an entry to be stored (default 1MiB).
|
The max number of characters of an entry to be stored (default 1MiB).
|
||||||
If the length of the yanked string is larger than the limit, it will not be stored.
|
If the length of the yanked string is larger than the limit, it will not be stored.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
continuous_sync = helpers.defaultNullOpts.mkBool false ''
|
continuous_sync = lib.nixvim.defaultNullOpts.mkBool false ''
|
||||||
If set to `true`, the runtime history is synced with the persistent storage everytime it's
|
If set to `true`, the runtime history is synced with the persistent storage everytime it's
|
||||||
changed or queried.
|
changed or queried.
|
||||||
|
|
||||||
|
|
@ -42,12 +41,12 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
[README](https://github.com/AckslD/nvim-neoclip.lua#custom-actions).
|
[README](https://github.com/AckslD/nvim-neoclip.lua#custom-actions).
|
||||||
'';
|
'';
|
||||||
|
|
||||||
db_path = helpers.defaultNullOpts.mkStr (lib.nixvim.literalLua "vim.fn.stdpath('data') .. '/databases/neoclip.sqlite3'") ''
|
db_path = lib.nixvim.defaultNullOpts.mkStr (lib.nixvim.literalLua "vim.fn.stdpath('data') .. '/databases/neoclip.sqlite3'") ''
|
||||||
The path to the sqlite database to store history if `enable_persistent_history=true`.
|
The path to the sqlite database to store history if `enable_persistent_history=true`.
|
||||||
Defaults to `$XDG_DATA_HOME/nvim/databases/neoclip.sqlite3`.
|
Defaults to `$XDG_DATA_HOME/nvim/databases/neoclip.sqlite3`.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
filter = helpers.defaultNullOpts.mkLuaFn null ''
|
filter = lib.nixvim.defaultNullOpts.mkLuaFn null ''
|
||||||
A function to filter what entries to store (default all are stored).
|
A function to filter what entries to store (default all are stored).
|
||||||
This function filter should return `true` (include the yanked entry) or `false` (don't include
|
This function filter should return `true` (include the yanked entry) or `false` (don't include
|
||||||
it) based on a table as the only argument, which has the following keys:
|
it) based on a table as the only argument, which has the following keys:
|
||||||
|
|
@ -57,7 +56,7 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
- `buffer_name`: The name of the buffer where the yank happened.
|
- `buffer_name`: The name of the buffer where the yank happened.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
preview = helpers.defaultNullOpts.mkBool true ''
|
preview = lib.nixvim.defaultNullOpts.mkBool true ''
|
||||||
Whether to show a preview (default) of the current entry or not.
|
Whether to show a preview (default) of the current entry or not.
|
||||||
Useful for for example multiline yanks.
|
Useful for for example multiline yanks.
|
||||||
When yanking the filetype is recorded in order to enable correct syntax highlighting in the
|
When yanking the filetype is recorded in order to enable correct syntax highlighting in the
|
||||||
|
|
@ -67,32 +66,32 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
need to configure `telescope` with the `dynamic_preview_title = true` option.
|
need to configure `telescope` with the `dynamic_preview_title = true` option.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
prompt = helpers.defaultNullOpts.mkStr null ''
|
prompt = lib.nixvim.defaultNullOpts.mkStr null ''
|
||||||
The prompt string used by the picker (`telescope`/`fzf-lua`).
|
The prompt string used by the picker (`telescope`/`fzf-lua`).
|
||||||
'';
|
'';
|
||||||
|
|
||||||
default_register =
|
default_register =
|
||||||
helpers.defaultNullOpts.mkNullable (with lib.types; either str (listOf str)) "\""
|
lib.nixvim.defaultNullOpts.mkNullable (with lib.types; either str (listOf str)) "\""
|
||||||
''
|
''
|
||||||
What register to use by default when not specified (e.g. `Telescope neoclip`).
|
What register to use by default when not specified (e.g. `Telescope neoclip`).
|
||||||
Can be a string such as `"\""` (single register) or a table of strings such as
|
Can be a string such as `"\""` (single register) or a table of strings such as
|
||||||
`["\"" "+" "*"]`.
|
`["\"" "+" "*"]`.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
default_register_macros = helpers.defaultNullOpts.mkStr "q" ''
|
default_register_macros = lib.nixvim.defaultNullOpts.mkStr "q" ''
|
||||||
What register to use for macros by default when not specified (e.g. `Telescope macroscope`).
|
What register to use for macros by default when not specified (e.g. `Telescope macroscope`).
|
||||||
'';
|
'';
|
||||||
|
|
||||||
enable_macro_history = helpers.defaultNullOpts.mkBool true ''
|
enable_macro_history = lib.nixvim.defaultNullOpts.mkBool true ''
|
||||||
If true (default) any recorded macro will be saved, see
|
If true (default) any recorded macro will be saved, see
|
||||||
[macros](https://github.com/AckslD/nvim-neoclip.lua#macros).
|
[macros](https://github.com/AckslD/nvim-neoclip.lua#macros).
|
||||||
'';
|
'';
|
||||||
|
|
||||||
content_spec_column = helpers.defaultNullOpts.mkBool false ''
|
content_spec_column = lib.nixvim.defaultNullOpts.mkBool false ''
|
||||||
Can be set to `true` to use instead of the preview.
|
Can be set to `true` to use instead of the preview.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
disable_keycodes_parsing = helpers.defaultNullOpts.mkBool false ''
|
disable_keycodes_parsing = lib.nixvim.defaultNullOpts.mkBool false ''
|
||||||
If set to true, macroscope will display the internal byte representation, instead of a proper
|
If set to true, macroscope will display the internal byte representation, instead of a proper
|
||||||
string that can be used in a map.
|
string that can be used in a map.
|
||||||
|
|
||||||
|
|
@ -101,46 +100,46 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
'';
|
'';
|
||||||
|
|
||||||
on_select = {
|
on_select = {
|
||||||
move_to_front = helpers.defaultNullOpts.mkBool false ''
|
move_to_front = lib.nixvim.defaultNullOpts.mkBool false ''
|
||||||
If the entry should be set to last in the list when pressing the key to select a yank.
|
If the entry should be set to last in the list when pressing the key to select a yank.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
close_telescope = helpers.defaultNullOpts.mkBool true ''
|
close_telescope = lib.nixvim.defaultNullOpts.mkBool true ''
|
||||||
If telescope should close whenever an item is selected.
|
If telescope should close whenever an item is selected.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
on_paste = {
|
on_paste = {
|
||||||
set_reg = helpers.defaultNullOpts.mkBool false ''
|
set_reg = lib.nixvim.defaultNullOpts.mkBool false ''
|
||||||
If the register should be populated when pressing the key to paste directly.
|
If the register should be populated when pressing the key to paste directly.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
move_to_front = helpers.defaultNullOpts.mkBool false ''
|
move_to_front = lib.nixvim.defaultNullOpts.mkBool false ''
|
||||||
If the entry should be set to last in the list when pressing the key to paste directly.
|
If the entry should be set to last in the list when pressing the key to paste directly.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
close_telescope = helpers.defaultNullOpts.mkBool true ''
|
close_telescope = lib.nixvim.defaultNullOpts.mkBool true ''
|
||||||
If `telescope` should close whenever a yank is pasted.
|
If `telescope` should close whenever a yank is pasted.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
on_replay = {
|
on_replay = {
|
||||||
set_reg = helpers.defaultNullOpts.mkBool false ''
|
set_reg = lib.nixvim.defaultNullOpts.mkBool false ''
|
||||||
If the register should be populated when pressing the key to replay a recorded macro.
|
If the register should be populated when pressing the key to replay a recorded macro.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
move_to_front = helpers.defaultNullOpts.mkBool false ''
|
move_to_front = lib.nixvim.defaultNullOpts.mkBool false ''
|
||||||
If the entry should be set to last in the list when pressing the key to replay a recorded
|
If the entry should be set to last in the list when pressing the key to replay a recorded
|
||||||
macro.
|
macro.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
close_telescope = helpers.defaultNullOpts.mkBool true ''
|
close_telescope = lib.nixvim.defaultNullOpts.mkBool true ''
|
||||||
If telescope should close whenever a macro is replayed.
|
If telescope should close whenever a macro is replayed.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
on_custom_action = {
|
on_custom_action = {
|
||||||
close_telescope = helpers.defaultNullOpts.mkBool true ''
|
close_telescope = lib.nixvim.defaultNullOpts.mkBool true ''
|
||||||
If telescope should close whenever a custom action is executed.
|
If telescope should close whenever a custom action is executed.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
@ -149,7 +148,7 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
telescope =
|
telescope =
|
||||||
# Using `anything` here because of the annoying `custom` key (and also, a mapping can target several keys):
|
# Using `anything` here because of the annoying `custom` key (and also, a mapping can target several keys):
|
||||||
# https://github.com/AckslD/nvim-neoclip.lua?tab=readme-ov-file#custom-actions
|
# https://github.com/AckslD/nvim-neoclip.lua?tab=readme-ov-file#custom-actions
|
||||||
helpers.defaultNullOpts.mkAttrsOf (with types; attrsOf anything)
|
lib.nixvim.defaultNullOpts.mkAttrsOf (with types; attrsOf anything)
|
||||||
{
|
{
|
||||||
i = {
|
i = {
|
||||||
select = "<cr>";
|
select = "<cr>";
|
||||||
|
|
@ -182,7 +181,7 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
'';
|
'';
|
||||||
|
|
||||||
fzf =
|
fzf =
|
||||||
helpers.defaultNullOpts.mkAttrsOf types.anything
|
lib.nixvim.defaultNullOpts.mkAttrsOf types.anything
|
||||||
{
|
{
|
||||||
select = "default";
|
select = "default";
|
||||||
paste = "ctrl-p";
|
paste = "ctrl-p";
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
helpers,
|
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib;
|
with lib;
|
||||||
|
|
@ -13,7 +12,7 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
|
|
||||||
settingsOptions = {
|
settingsOptions = {
|
||||||
mappings =
|
mappings =
|
||||||
helpers.defaultNullOpts.mkListOf types.str
|
lib.nixvim.defaultNullOpts.mkListOf types.str
|
||||||
[
|
[
|
||||||
"<C-u>"
|
"<C-u>"
|
||||||
"<C-d>"
|
"<C-d>"
|
||||||
|
|
@ -33,25 +32,25 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
```
|
```
|
||||||
'';
|
'';
|
||||||
|
|
||||||
hide_cursor = helpers.defaultNullOpts.mkBool true ''
|
hide_cursor = lib.nixvim.defaultNullOpts.mkBool true ''
|
||||||
If 'termguicolors' is set, hide the cursor while scrolling.
|
If 'termguicolors' is set, hide the cursor while scrolling.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
step_eof = helpers.defaultNullOpts.mkBool true ''
|
step_eof = lib.nixvim.defaultNullOpts.mkBool true ''
|
||||||
When `move_cursor` is `true` scrolling downwards will stop when the bottom line of the
|
When `move_cursor` is `true` scrolling downwards will stop when the bottom line of the
|
||||||
window is the last line of the file.
|
window is the last line of the file.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
respect_scrolloff = helpers.defaultNullOpts.mkBool false ''
|
respect_scrolloff = lib.nixvim.defaultNullOpts.mkBool false ''
|
||||||
The cursor stops at the scrolloff margin.
|
The cursor stops at the scrolloff margin.
|
||||||
Try combining this option with either `stop_eof` or `cursor_scrolls_alone` (or both).
|
Try combining this option with either `stop_eof` or `cursor_scrolls_alone` (or both).
|
||||||
'';
|
'';
|
||||||
|
|
||||||
cursor_scrolls_alone = helpers.defaultNullOpts.mkBool true ''
|
cursor_scrolls_alone = lib.nixvim.defaultNullOpts.mkBool true ''
|
||||||
The cursor will keep on scrolling even if the window cannot scroll further.
|
The cursor will keep on scrolling even if the window cannot scroll further.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
easing_function = helpers.mkNullOrStr ''
|
easing_function = lib.nixvim.mkNullOrStr ''
|
||||||
Name of the easing function to use by default in all scrolling animamtions.
|
Name of the easing function to use by default in all scrolling animamtions.
|
||||||
`scroll()` that don't provide the optional `easing` argument will use this easing
|
`scroll()` that don't provide the optional `easing` argument will use this easing
|
||||||
function.
|
function.
|
||||||
|
|
@ -59,7 +58,7 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
(constant scrolling speed).
|
(constant scrolling speed).
|
||||||
'';
|
'';
|
||||||
|
|
||||||
pre_hook = helpers.mkNullOrLuaFn ''
|
pre_hook = lib.nixvim.mkNullOrLuaFn ''
|
||||||
Function to run before the scrolling animation starts.
|
Function to run before the scrolling animation starts.
|
||||||
The function will be called with the `info` parameter which can be optionally passed to
|
The function will be called with the `info` parameter which can be optionally passed to
|
||||||
`scroll()` (or any of the provided wrappers).
|
`scroll()` (or any of the provided wrappers).
|
||||||
|
|
@ -67,11 +66,11 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
animations.
|
animations.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
post_hook = helpers.mkNullOrLuaFn ''
|
post_hook = lib.nixvim.mkNullOrLuaFn ''
|
||||||
Equivalent to `pre_hook` but the function will run after the scrolling animation ends.
|
Equivalent to `pre_hook` but the function will run after the scrolling animation ends.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
performance_mode = helpers.defaultNullOpts.mkBool false ''
|
performance_mode = lib.nixvim.defaultNullOpts.mkBool false ''
|
||||||
Option to enable "Performance Mode" on all buffers.
|
Option to enable "Performance Mode" on all buffers.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
helpers,
|
|
||||||
config,
|
config,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
|
@ -12,56 +11,56 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
maintainers = [ maintainers.GaetanLepage ];
|
maintainers = [ maintainers.GaetanLepage ];
|
||||||
|
|
||||||
settingsOptions = {
|
settingsOptions = {
|
||||||
disable_filetype = helpers.defaultNullOpts.mkListOf types.str [
|
disable_filetype = lib.nixvim.defaultNullOpts.mkListOf types.str [
|
||||||
"TelescopePrompt"
|
"TelescopePrompt"
|
||||||
"spectre_panel"
|
"spectre_panel"
|
||||||
] "Disabled filetypes.";
|
] "Disabled filetypes.";
|
||||||
|
|
||||||
disable_in_macro = helpers.defaultNullOpts.mkBool false ''
|
disable_in_macro = lib.nixvim.defaultNullOpts.mkBool false ''
|
||||||
Disable when recording or executing a macro.
|
Disable when recording or executing a macro.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
disable_in_visualblock = helpers.defaultNullOpts.mkBool false ''
|
disable_in_visualblock = lib.nixvim.defaultNullOpts.mkBool false ''
|
||||||
Disable when insert after visual block mode.
|
Disable when insert after visual block mode.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
disable_in_replace_mode = helpers.defaultNullOpts.mkBool true ''
|
disable_in_replace_mode = lib.nixvim.defaultNullOpts.mkBool true ''
|
||||||
Disable in replace mode.
|
Disable in replace mode.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
ignored_next_char = helpers.defaultNullOpts.mkLua "[=[[%w%%%'%[%\"%.%`%$]]=]" ''
|
ignored_next_char = lib.nixvim.defaultNullOpts.mkLua "[=[[%w%%%'%[%\"%.%`%$]]=]" ''
|
||||||
Regexp to ignore if it matches the next character.
|
Regexp to ignore if it matches the next character.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
enable_moveright = helpers.defaultNullOpts.mkBool true ''
|
enable_moveright = lib.nixvim.defaultNullOpts.mkBool true ''
|
||||||
Enable moveright.
|
Enable moveright.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
enable_afterquote = helpers.defaultNullOpts.mkBool true ''
|
enable_afterquote = lib.nixvim.defaultNullOpts.mkBool true ''
|
||||||
Add bracket pairs after quote.
|
Add bracket pairs after quote.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
enable_check_bracket_line = helpers.defaultNullOpts.mkBool true ''
|
enable_check_bracket_line = lib.nixvim.defaultNullOpts.mkBool true ''
|
||||||
Check bracket in same line.
|
Check bracket in same line.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
enable_bracket_in_quote = helpers.defaultNullOpts.mkBool true ''
|
enable_bracket_in_quote = lib.nixvim.defaultNullOpts.mkBool true ''
|
||||||
Enable bracket in quote.
|
Enable bracket in quote.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
enable_abbr = helpers.defaultNullOpts.mkBool false ''
|
enable_abbr = lib.nixvim.defaultNullOpts.mkBool false ''
|
||||||
Trigger abbreviation.
|
Trigger abbreviation.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
break_undo = helpers.defaultNullOpts.mkBool true ''
|
break_undo = lib.nixvim.defaultNullOpts.mkBool true ''
|
||||||
Switch for basic rule break undo sequence.
|
Switch for basic rule break undo sequence.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
check_ts = helpers.defaultNullOpts.mkBool false ''
|
check_ts = lib.nixvim.defaultNullOpts.mkBool false ''
|
||||||
Use treesitter to check for a pair.
|
Use treesitter to check for a pair.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
ts_config = helpers.defaultNullOpts.mkAttrsOf types.anything {
|
ts_config = lib.nixvim.defaultNullOpts.mkAttrsOf types.anything {
|
||||||
lua = [
|
lua = [
|
||||||
"string"
|
"string"
|
||||||
"source"
|
"source"
|
||||||
|
|
@ -73,29 +72,29 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
];
|
];
|
||||||
} "Configuration for TreeSitter.";
|
} "Configuration for TreeSitter.";
|
||||||
|
|
||||||
map_cr = helpers.defaultNullOpts.mkBool true ''
|
map_cr = lib.nixvim.defaultNullOpts.mkBool true ''
|
||||||
Map the `<CR>` key to confirm the completion.
|
Map the `<CR>` key to confirm the completion.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
map_bs = helpers.defaultNullOpts.mkBool true ''
|
map_bs = lib.nixvim.defaultNullOpts.mkBool true ''
|
||||||
Map the `<BS>` key to delete the pair.
|
Map the `<BS>` key to delete the pair.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
map_c_h = helpers.defaultNullOpts.mkBool false ''
|
map_c_h = lib.nixvim.defaultNullOpts.mkBool false ''
|
||||||
Map the `<C-h>` key to delete a pair.
|
Map the `<C-h>` key to delete a pair.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
map_c_w = helpers.defaultNullOpts.mkBool false ''
|
map_c_w = lib.nixvim.defaultNullOpts.mkBool false ''
|
||||||
Map the `<C-w>` key to delete a pair if possible.
|
Map the `<C-w>` key to delete a pair if possible.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
fast_wrap = {
|
fast_wrap = {
|
||||||
map = helpers.defaultNullOpts.mkStr "<M-e>" ''
|
map = lib.nixvim.defaultNullOpts.mkStr "<M-e>" ''
|
||||||
The key to trigger fast_wrap.
|
The key to trigger fast_wrap.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
chars =
|
chars =
|
||||||
helpers.defaultNullOpts.mkListOf types.str
|
lib.nixvim.defaultNullOpts.mkListOf types.str
|
||||||
[
|
[
|
||||||
"{"
|
"{"
|
||||||
"["
|
"["
|
||||||
|
|
@ -107,41 +106,41 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
Characters for which to enable fast wrap.
|
Characters for which to enable fast wrap.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
pattern = helpers.defaultNullOpts.mkLua ''[=[[%'%"%>%]%)%}%,%`]]=]'' ''
|
pattern = lib.nixvim.defaultNullOpts.mkLua ''[=[[%'%"%>%]%)%}%,%`]]=]'' ''
|
||||||
The pattern to match against.
|
The pattern to match against.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
end_key = helpers.defaultNullOpts.mkStr "$" ''
|
end_key = lib.nixvim.defaultNullOpts.mkStr "$" ''
|
||||||
End key.
|
End key.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
before_key = helpers.defaultNullOpts.mkStr "h" ''
|
before_key = lib.nixvim.defaultNullOpts.mkStr "h" ''
|
||||||
Before key.
|
Before key.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
after_key = helpers.defaultNullOpts.mkStr "l" ''
|
after_key = lib.nixvim.defaultNullOpts.mkStr "l" ''
|
||||||
After key.
|
After key.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
cursor_pos_before = helpers.defaultNullOpts.mkBool true ''
|
cursor_pos_before = lib.nixvim.defaultNullOpts.mkBool true ''
|
||||||
Whether the cursor should be placed before or after the substitution.
|
Whether the cursor should be placed before or after the substitution.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
keys = helpers.defaultNullOpts.mkStr "qwertyuiopzxcvbnmasdfghjkl" '''';
|
keys = lib.nixvim.defaultNullOpts.mkStr "qwertyuiopzxcvbnmasdfghjkl" '''';
|
||||||
|
|
||||||
highlight = helpers.defaultNullOpts.mkStr "Search" ''
|
highlight = lib.nixvim.defaultNullOpts.mkStr "Search" ''
|
||||||
Which highlight group to use for the match.
|
Which highlight group to use for the match.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
highlight_grey = helpers.defaultNullOpts.mkStr "Comment" ''
|
highlight_grey = lib.nixvim.defaultNullOpts.mkStr "Comment" ''
|
||||||
Which highlight group to use for the grey part.
|
Which highlight group to use for the grey part.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
manual_position = helpers.defaultNullOpts.mkBool true ''
|
manual_position = lib.nixvim.defaultNullOpts.mkBool true ''
|
||||||
Whether to enable manual position.
|
Whether to enable manual position.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
use_virt_lines = helpers.defaultNullOpts.mkBool true ''
|
use_virt_lines = lib.nixvim.defaultNullOpts.mkBool true ''
|
||||||
Whether to use `virt_lines`.
|
Whether to use `virt_lines`.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
helpers,
|
|
||||||
config,
|
config,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
|
@ -145,7 +144,7 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
autoCmd =
|
autoCmd =
|
||||||
(lib.optional autoOpenEnabled {
|
(lib.optional autoOpenEnabled {
|
||||||
event = "VimEnter";
|
event = "VimEnter";
|
||||||
callback = helpers.mkRaw "open_nvim_tree";
|
callback = lib.nixvim.mkRaw "open_nvim_tree";
|
||||||
})
|
})
|
||||||
++ (lib.optional cfg.autoClose {
|
++ (lib.optional cfg.autoClose {
|
||||||
event = "BufEnter";
|
event = "BufEnter";
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
helpers,
|
|
||||||
config,
|
config,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
|
@ -18,7 +17,7 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
settingsOptions = {
|
settingsOptions = {
|
||||||
lsp = {
|
lsp = {
|
||||||
hover = {
|
hover = {
|
||||||
border = helpers.defaultNullOpts.mkListOf lib.types.str [
|
border = lib.nixvim.defaultNullOpts.mkListOf lib.types.str [
|
||||||
"╭"
|
"╭"
|
||||||
"─"
|
"─"
|
||||||
"╮"
|
"╮"
|
||||||
|
|
@ -30,7 +29,7 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
] "";
|
] "";
|
||||||
};
|
};
|
||||||
|
|
||||||
diagnostic_update_events = helpers.defaultNullOpts.mkListOf' {
|
diagnostic_update_events = lib.nixvim.defaultNullOpts.mkListOf' {
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
pluginDefault = [ "BufWritePost" ];
|
pluginDefault = [ "BufWritePost" ];
|
||||||
description = ''
|
description = ''
|
||||||
|
|
@ -47,13 +46,13 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
};
|
};
|
||||||
|
|
||||||
buffers = {
|
buffers = {
|
||||||
set_filetype = helpers.defaultNullOpts.mkBool false ''
|
set_filetype = lib.nixvim.defaultNullOpts.mkBool false ''
|
||||||
If set to true, the filetype of the otterbuffers will be set.
|
If set to true, the filetype of the otterbuffers will be set.
|
||||||
Otherwise only the autocommand of lspconfig that attaches
|
Otherwise only the autocommand of lspconfig that attaches
|
||||||
the language server will be executed without setting the filetype.
|
the language server will be executed without setting the filetype.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
write_to_disk = helpers.defaultNullOpts.mkBool false ''
|
write_to_disk = lib.nixvim.defaultNullOpts.mkBool false ''
|
||||||
Write `<path>.otter.<embedded language extension>` files
|
Write `<path>.otter.<embedded language extension>` files
|
||||||
to disk on save of main buffer.
|
to disk on save of main buffer.
|
||||||
Useful for some linters that require actual files,
|
Useful for some linters that require actual files,
|
||||||
|
|
@ -61,13 +60,13 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
strip_wrapping_quote_characters = helpers.defaultNullOpts.mkListOf lib.types.str [
|
strip_wrapping_quote_characters = lib.nixvim.defaultNullOpts.mkListOf lib.types.str [
|
||||||
"'"
|
"'"
|
||||||
"\""
|
"\""
|
||||||
"\`"
|
"\`"
|
||||||
] "";
|
] "";
|
||||||
|
|
||||||
handle_leading_whitespace = helpers.defaultNullOpts.mkBool false ''
|
handle_leading_whitespace = lib.nixvim.defaultNullOpts.mkBool false ''
|
||||||
Otter may not work the way you expect when entire code blocks are indented (eg. in Org files).
|
Otter may not work the way you expect when entire code blocks are indented (eg. in Org files).
|
||||||
When true, otter handles these cases fully. This is a (minor) performance hit.
|
When true, otter handles these cases fully. This is a (minor) performance hit.
|
||||||
'';
|
'';
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
helpers,
|
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
lib.nixvim.plugins.mkVimPlugin {
|
lib.nixvim.plugins.mkVimPlugin {
|
||||||
|
|
@ -12,7 +11,7 @@ lib.nixvim.plugins.mkVimPlugin {
|
||||||
|
|
||||||
settingsOptions = {
|
settingsOptions = {
|
||||||
mode =
|
mode =
|
||||||
helpers.defaultNullOpts.mkEnumFirstDefault
|
lib.nixvim.defaultNullOpts.mkEnumFirstDefault
|
||||||
[
|
[
|
||||||
"smart"
|
"smart"
|
||||||
"indent"
|
"indent"
|
||||||
|
|
@ -22,7 +21,7 @@ lib.nixvim.plugins.mkVimPlugin {
|
||||||
The mode used to process buffer changes.
|
The mode used to process buffer changes.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
force_balance = helpers.defaultNullOpts.mkBool false ''
|
force_balance = lib.nixvim.defaultNullOpts.mkBool false ''
|
||||||
In smart mode and indent mode, parinfer will sometimes leave unbalanced brackets around the
|
In smart mode and indent mode, parinfer will sometimes leave unbalanced brackets around the
|
||||||
cursor and fix them when the cursor moves away.
|
cursor and fix them when the cursor moves away.
|
||||||
When this option is set to `true`, the brackets will be fixed immediately (and fixed again
|
When this option is set to `true`, the brackets will be fixed immediately (and fixed again
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
helpers,
|
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib;
|
with lib;
|
||||||
|
|
@ -41,7 +40,7 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
};
|
};
|
||||||
|
|
||||||
variant =
|
variant =
|
||||||
helpers.defaultNullOpts.mkEnumFirstDefault
|
lib.nixvim.defaultNullOpts.mkEnumFirstDefault
|
||||||
[
|
[
|
||||||
"qmk"
|
"qmk"
|
||||||
"zmk"
|
"zmk"
|
||||||
|
|
@ -50,17 +49,17 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
Chooses the expected hardware target.
|
Chooses the expected hardware target.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
timeout = helpers.defaultNullOpts.mkUnsignedInt 5000 ''
|
timeout = lib.nixvim.defaultNullOpts.mkUnsignedInt 5000 ''
|
||||||
Duration of `vim.notify` timeout if using `nvim-notify`.
|
Duration of `vim.notify` timeout if using `nvim-notify`.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
auto_format_pattern = helpers.defaultNullOpts.mkStr "*keymap.c" ''
|
auto_format_pattern = lib.nixvim.defaultNullOpts.mkStr "*keymap.c" ''
|
||||||
The autocommand file pattern to use when applying `QMKFormat` on save.
|
The autocommand file pattern to use when applying `QMKFormat` on save.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
comment_preview = {
|
comment_preview = {
|
||||||
position =
|
position =
|
||||||
helpers.defaultNullOpts.mkEnumFirstDefault
|
lib.nixvim.defaultNullOpts.mkEnumFirstDefault
|
||||||
[
|
[
|
||||||
"top"
|
"top"
|
||||||
"bottom"
|
"bottom"
|
||||||
|
|
@ -72,13 +71,13 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
`variant=qmk`).
|
`variant=qmk`).
|
||||||
'';
|
'';
|
||||||
|
|
||||||
keymap_overrides = helpers.defaultNullOpts.mkAttrsOf types.str { } ''
|
keymap_overrides = lib.nixvim.defaultNullOpts.mkAttrsOf types.str { } ''
|
||||||
A dictionary of key codes to text replacements, any provided value will be merged with the
|
A dictionary of key codes to text replacements, any provided value will be merged with the
|
||||||
existing dictionary, see [key_map.lua](https://github.com/codethread/qmk.nvim/blob/main/lua/qmk/config/key_map.lua) for details.
|
existing dictionary, see [key_map.lua](https://github.com/codethread/qmk.nvim/blob/main/lua/qmk/config/key_map.lua) for details.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
symbols =
|
symbols =
|
||||||
helpers.defaultNullOpts.mkAttrsOf types.str
|
lib.nixvim.defaultNullOpts.mkAttrsOf types.str
|
||||||
{
|
{
|
||||||
space = " ";
|
space = " ";
|
||||||
horz = "─";
|
horz = "─";
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
helpers,
|
|
||||||
config,
|
config,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
|
@ -31,7 +30,7 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
|
|
||||||
settingsOptions = with lib.types; {
|
settingsOptions = with lib.types; {
|
||||||
prompt_func_return_type =
|
prompt_func_return_type =
|
||||||
helpers.defaultNullOpts.mkAttrsOf bool
|
lib.nixvim.defaultNullOpts.mkAttrsOf bool
|
||||||
{
|
{
|
||||||
go = false;
|
go = false;
|
||||||
java = false;
|
java = false;
|
||||||
|
|
@ -60,7 +59,7 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
'';
|
'';
|
||||||
|
|
||||||
prompt_func_param_type =
|
prompt_func_param_type =
|
||||||
helpers.defaultNullOpts.mkAttrsOf bool
|
lib.nixvim.defaultNullOpts.mkAttrsOf bool
|
||||||
{
|
{
|
||||||
go = false;
|
go = false;
|
||||||
java = false;
|
java = false;
|
||||||
|
|
@ -87,7 +86,7 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
printf_statements = helpers.defaultNullOpts.mkAttrsOf (listOf (maybeRaw str)) { } ''
|
printf_statements = lib.nixvim.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`.
|
||||||
|
|
||||||
|
|
@ -106,7 +105,7 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
[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 = lib.nixvim.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`.
|
||||||
|
|
@ -126,7 +125,7 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
[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 = lib.nixvim.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.
|
||||||
|
|
||||||
|
|
@ -140,7 +139,7 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
```
|
```
|
||||||
'';
|
'';
|
||||||
|
|
||||||
show_success_message = helpers.defaultNullOpts.mkBool false ''
|
show_success_message = lib.nixvim.defaultNullOpts.mkBool false ''
|
||||||
Shows a message with information about the refactor on success. Such as:
|
Shows a message with information about the refactor on success. Such as:
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
helpers,
|
|
||||||
config,
|
config,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
|
@ -21,7 +20,7 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
settingsOptions = import ./settings-options.nix { inherit lib helpers; };
|
settingsOptions = import ./settings-options.nix { inherit lib; };
|
||||||
|
|
||||||
settingsExample = {
|
settingsExample = {
|
||||||
server = {
|
server = {
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{ lib, helpers }:
|
{ lib }:
|
||||||
with lib;
|
with lib;
|
||||||
{
|
{
|
||||||
tools =
|
tools =
|
||||||
|
|
@ -13,7 +13,7 @@ with lib;
|
||||||
testExecutors = executors ++ [ "background" ];
|
testExecutors = executors ++ [ "background" ];
|
||||||
executorSubmodule = types.submodule {
|
executorSubmodule = types.submodule {
|
||||||
options = {
|
options = {
|
||||||
execute_command = helpers.mkNullOrLuaFn ''
|
execute_command = lib.nixvim.mkNullOrLuaFn ''
|
||||||
```lua
|
```lua
|
||||||
fun(cmd:string,args:string[],cwd:string|nil,opts?:RustaceanExecutorOpts)
|
fun(cmd:string,args:string[],cwd:string|nil,opts?:RustaceanExecutorOpts)
|
||||||
|
|
||||||
|
|
@ -37,7 +37,7 @@ with lib;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
executor =
|
executor =
|
||||||
helpers.defaultNullOpts.mkNullable (with types; either (enum executors) executorSubmodule)
|
lib.nixvim.defaultNullOpts.mkNullable (with types; either (enum executors) executorSubmodule)
|
||||||
"termopen"
|
"termopen"
|
||||||
''
|
''
|
||||||
The executor to use for runnables/debuggables.
|
The executor to use for runnables/debuggables.
|
||||||
|
|
@ -45,67 +45,67 @@ with lib;
|
||||||
'';
|
'';
|
||||||
|
|
||||||
test_executor =
|
test_executor =
|
||||||
helpers.mkNullOrOption (with types; either (enum testExecutors) executorSubmodule)
|
lib.nixvim.mkNullOrOption (with types; either (enum testExecutors) executorSubmodule)
|
||||||
''
|
''
|
||||||
The executor to use for runnables that are tests/testables
|
The executor to use for runnables that are tests/testables
|
||||||
Either a test executor alias or an attrs with the `execute_command` key.
|
Either a test executor alias or an attrs with the `execute_command` key.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
crate_test_executor =
|
crate_test_executor =
|
||||||
helpers.mkNullOrOption (with types; either (enum testExecutors) executorSubmodule)
|
lib.nixvim.mkNullOrOption (with types; either (enum testExecutors) executorSubmodule)
|
||||||
''
|
''
|
||||||
The executor to use for runnables that are crate test suites (`--all-targets`).
|
The executor to use for runnables that are crate test suites (`--all-targets`).
|
||||||
Either a test executor alias or an attrs with the `execute_command` key.
|
Either a test executor alias or an attrs with the `execute_command` key.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
cargo_override = helpers.mkNullOrStr ''
|
cargo_override = lib.nixvim.mkNullOrStr ''
|
||||||
Set this to override the 'cargo' command for runnables, debuggables (etc., e.g. to `"cross"`).
|
Set this to override the 'cargo' command for runnables, debuggables (etc., e.g. to `"cross"`).
|
||||||
If set, this takes precedence over `enable_nextest`.
|
If set, this takes precedence over `enable_nextest`.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
enable_nextest = helpers.defaultNullOpts.mkBool true ''
|
enable_nextest = lib.nixvim.defaultNullOpts.mkBool true ''
|
||||||
Whether to enable nextest.
|
Whether to enable nextest.
|
||||||
If enabled, `cargo test` commands will be transformed to `cargo nextest run` commands.
|
If enabled, `cargo test` commands will be transformed to `cargo nextest run` commands.
|
||||||
Defaults to `true` if cargo-nextest is detected.
|
Defaults to `true` if cargo-nextest is detected.
|
||||||
Ignored if `cargo_override` is set.
|
Ignored if `cargo_override` is set.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
enable_clippy = helpers.defaultNullOpts.mkBool true ''
|
enable_clippy = lib.nixvim.defaultNullOpts.mkBool true ''
|
||||||
Whether to enable clippy checks on save if a clippy installation is detected.
|
Whether to enable clippy checks on save if a clippy installation is detected.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
on_initialized = helpers.mkNullOrLuaFn ''
|
on_initialized = lib.nixvim.mkNullOrLuaFn ''
|
||||||
`fun(health:RustAnalyzerInitializedStatus)`
|
`fun(health:RustAnalyzerInitializedStatus)`
|
||||||
Function that is invoked when the LSP server has finished initializing.
|
Function that is invoked when the LSP server has finished initializing.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
reload_workspace_from_cargo_toml = helpers.defaultNullOpts.mkBool true ''
|
reload_workspace_from_cargo_toml = lib.nixvim.defaultNullOpts.mkBool true ''
|
||||||
Automatically call `RustReloadWorkspace` when writing to a `Cargo.toml` file.
|
Automatically call `RustReloadWorkspace` when writing to a `Cargo.toml` file.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
hover_actions = {
|
hover_actions = {
|
||||||
replace_builtin_hover = helpers.defaultNullOpts.mkBool true ''
|
replace_builtin_hover = lib.nixvim.defaultNullOpts.mkBool true ''
|
||||||
Whether to replace Neovim's built-in `vim.lsp.buf.hover` with hover actions.
|
Whether to replace Neovim's built-in `vim.lsp.buf.hover` with hover actions.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
code_actions = {
|
code_actions = {
|
||||||
group_icon = helpers.defaultNullOpts.mkStr " ▶" ''
|
group_icon = lib.nixvim.defaultNullOpts.mkStr " ▶" ''
|
||||||
Text appended to a group action.
|
Text appended to a group action.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
ui_select_fallback = helpers.defaultNullOpts.mkBool false ''
|
ui_select_fallback = lib.nixvim.defaultNullOpts.mkBool false ''
|
||||||
Whether to fall back to `vim.ui.select` if there are no grouped code actions.
|
Whether to fall back to `vim.ui.select` if there are no grouped code actions.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
float_win_config = {
|
float_win_config = {
|
||||||
auto_focus = helpers.defaultNullOpts.mkBool false ''
|
auto_focus = lib.nixvim.defaultNullOpts.mkBool false ''
|
||||||
Whether the window gets automatically focused.
|
Whether the window gets automatically focused.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
open_split =
|
open_split =
|
||||||
helpers.defaultNullOpts.mkEnumFirstDefault
|
lib.nixvim.defaultNullOpts.mkEnumFirstDefault
|
||||||
[
|
[
|
||||||
"horizontal"
|
"horizontal"
|
||||||
"vertical"
|
"vertical"
|
||||||
|
|
@ -116,23 +116,23 @@ with lib;
|
||||||
};
|
};
|
||||||
|
|
||||||
crate_graph = {
|
crate_graph = {
|
||||||
backend = helpers.defaultNullOpts.mkStr "x11" ''
|
backend = lib.nixvim.defaultNullOpts.mkStr "x11" ''
|
||||||
Backend used for displaying the graph.
|
Backend used for displaying the graph.
|
||||||
See: https://graphviz.org/docs/outputs
|
See: https://graphviz.org/docs/outputs
|
||||||
'';
|
'';
|
||||||
|
|
||||||
output = helpers.mkNullOrStr ''
|
output = lib.nixvim.mkNullOrStr ''
|
||||||
Where to store the output.
|
Where to store the output.
|
||||||
No output if unset.
|
No output if unset.
|
||||||
Relative path from `cwd`.
|
Relative path from `cwd`.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
full = helpers.defaultNullOpts.mkBool true ''
|
full = lib.nixvim.defaultNullOpts.mkBool true ''
|
||||||
`true` for all crates.io and external crates, false only the local crates.
|
`true` for all crates.io and external crates, false only the local crates.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
enabled_graphviz_backends =
|
enabled_graphviz_backends =
|
||||||
helpers.defaultNullOpts.mkListOf types.str
|
lib.nixvim.defaultNullOpts.mkListOf types.str
|
||||||
[
|
[
|
||||||
"bmp"
|
"bmp"
|
||||||
"cgimage"
|
"cgimage"
|
||||||
|
|
@ -193,20 +193,20 @@ with lib;
|
||||||
Override the enabled graphviz backends list, used for input validation and autocompletion.
|
Override the enabled graphviz backends list, used for input validation and autocompletion.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
pipe = helpers.mkNullOrStr ''
|
pipe = lib.nixvim.mkNullOrStr ''
|
||||||
Override the pipe symbol in the shell command.
|
Override the pipe symbol in the shell command.
|
||||||
Useful if using a shell that is not supported by this plugin.
|
Useful if using a shell that is not supported by this plugin.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
open_url = helpers.defaultNullOpts.mkLuaFn "require('rustaceanvim.os').open_url" ''
|
open_url = lib.nixvim.defaultNullOpts.mkLuaFn "require('rustaceanvim.os').open_url" ''
|
||||||
If set, overrides how to open URLs.
|
If set, overrides how to open URLs.
|
||||||
`fun(url:string):nil`
|
`fun(url:string):nil`
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
server = {
|
server = {
|
||||||
auto_attach = helpers.mkNullOrStrLuaFnOr types.bool ''
|
auto_attach = lib.nixvim.mkNullOrStrLuaFnOr types.bool ''
|
||||||
Whether to automatically attach the LSP client.
|
Whether to automatically attach the LSP client.
|
||||||
Defaults to `true` if the `rust-analyzer` executable is found.
|
Defaults to `true` if the `rust-analyzer` executable is found.
|
||||||
|
|
||||||
|
|
@ -230,9 +230,9 @@ with lib;
|
||||||
```
|
```
|
||||||
'';
|
'';
|
||||||
|
|
||||||
on_attach = helpers.defaultNullOpts.mkLuaFn null "Function to call when rustaceanvim attaches to a buffer.";
|
on_attach = lib.nixvim.defaultNullOpts.mkLuaFn null "Function to call when rustaceanvim attaches to a buffer.";
|
||||||
|
|
||||||
cmd = helpers.mkNullOrStrLuaFnOr (with types; listOf str) ''
|
cmd = lib.nixvim.mkNullOrStrLuaFnOr (with types; listOf str) ''
|
||||||
Command and arguments for starting rust-analyzer.
|
Command and arguments for starting rust-analyzer.
|
||||||
|
|
||||||
This can also be the definition of a function:
|
This can also be the definition of a function:
|
||||||
|
|
@ -247,7 +247,7 @@ with lib;
|
||||||
'';
|
'';
|
||||||
|
|
||||||
default_settings =
|
default_settings =
|
||||||
helpers.mkNullOrStrLuaFnOr
|
lib.nixvim.mkNullOrStrLuaFnOr
|
||||||
(types.submodule {
|
(types.submodule {
|
||||||
options.rust-analyzer = import ../../lsp/language-servers/rust-analyzer-config.nix lib;
|
options.rust-analyzer = import ../../lsp/language-servers/rust-analyzer-config.nix lib;
|
||||||
freeformType = with types; attrsOf anything;
|
freeformType = with types; attrsOf anything;
|
||||||
|
|
@ -268,23 +268,23 @@ with lib;
|
||||||
```
|
```
|
||||||
'';
|
'';
|
||||||
|
|
||||||
standalone = helpers.defaultNullOpts.mkBool true ''
|
standalone = lib.nixvim.defaultNullOpts.mkBool true ''
|
||||||
Standalone file support (enabled by default).
|
Standalone file support (enabled by default).
|
||||||
Disabling it may improve rust-analyzer's startup time.
|
Disabling it may improve rust-analyzer's startup time.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
logfile = helpers.defaultNullOpts.mkStr (lib.nixvim.literalLua "vim.fn.tempname() .. '-rust-analyzer.log'") ''
|
logfile = lib.nixvim.defaultNullOpts.mkStr (lib.nixvim.literalLua "vim.fn.tempname() .. '-rust-analyzer.log'") ''
|
||||||
The path to the rust-analyzer log file.
|
The path to the rust-analyzer log file.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
load_vscode_settings = helpers.defaultNullOpts.mkBool false ''
|
load_vscode_settings = lib.nixvim.defaultNullOpts.mkBool false ''
|
||||||
Whether to search (upward from the buffer) for rust-analyzer settings in `.vscode/settings` json.
|
Whether to search (upward from the buffer) for rust-analyzer settings in `.vscode/settings` json.
|
||||||
If found, loaded settings will override configured options.
|
If found, loaded settings will override configured options.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
dap = {
|
dap = {
|
||||||
autoload_configurations = helpers.defaultNullOpts.mkBool true ''
|
autoload_configurations = lib.nixvim.defaultNullOpts.mkBool true ''
|
||||||
Whether to autoload nvim-dap configurations when rust-analyzer has attached.
|
Whether to autoload nvim-dap configurations when rust-analyzer has attached.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
|
@ -302,31 +302,31 @@ with lib;
|
||||||
description = "The type for the debug adapter.";
|
description = "The type for the debug adapter.";
|
||||||
};
|
};
|
||||||
|
|
||||||
name = helpers.mkNullOrStr "The name of this adapter.";
|
name = lib.nixvim.mkNullOrStr "The name of this adapter.";
|
||||||
|
|
||||||
# Executable
|
# Executable
|
||||||
command = helpers.defaultNullOpts.mkStr "lldb-vscode" ''
|
command = lib.nixvim.defaultNullOpts.mkStr "lldb-vscode" ''
|
||||||
The command to run for this adapter.
|
The command to run for this adapter.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
args = helpers.mkNullOrStr "Its arguments.";
|
args = lib.nixvim.mkNullOrStr "Its arguments.";
|
||||||
|
|
||||||
# Server
|
# Server
|
||||||
host = helpers.mkNullOrStr "The host to connect to.";
|
host = lib.nixvim.mkNullOrStr "The host to connect to.";
|
||||||
|
|
||||||
port = helpers.mkNullOrStr "The port to connect to.";
|
port = lib.nixvim.mkNullOrStr "The port to connect to.";
|
||||||
|
|
||||||
executable = {
|
executable = {
|
||||||
command = helpers.mkNullOrStr "The command for the executable.";
|
command = lib.nixvim.mkNullOrStr "The command for the executable.";
|
||||||
|
|
||||||
args = helpers.mkNullOrOption (with lib.types; maybeRaw (listOf str)) ''
|
args = lib.nixvim.mkNullOrOption (with lib.types; maybeRaw (listOf str)) ''
|
||||||
Its arguments.
|
Its arguments.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
helpers.mkNullOrStrLuaFnOr (with types; either (enum [ false ]) dapConfig) ''
|
lib.nixvim.mkNullOrStrLuaFnOr (with types; either (enum [ false ]) dapConfig) ''
|
||||||
Defaults to creating the `rt_lldb` adapter, which is a `DapServerConfig` if `codelldb`
|
Defaults to creating the `rt_lldb` adapter, which is a `DapServerConfig` if `codelldb`
|
||||||
is detected, and a `DapExecutableConfig` if `lldb` is detected.
|
is detected, and a `DapExecutableConfig` if `lldb` is detected.
|
||||||
Set to `false` to disable.
|
Set to `false` to disable.
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
helpers,
|
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib;
|
with lib;
|
||||||
|
|
@ -32,7 +31,7 @@ lib.nixvim.plugins.mkVimPlugin {
|
||||||
maintainers = [ maintainers.GaetanLepage ];
|
maintainers = [ maintainers.GaetanLepage ];
|
||||||
|
|
||||||
settingsOptions = {
|
settingsOptions = {
|
||||||
no_default_key_mappings = helpers.defaultNullOpts.mkFlagInt 0 ''
|
no_default_key_mappings = lib.nixvim.defaultNullOpts.mkFlagInt 0 ''
|
||||||
Whether to disable the default mappings.
|
Whether to disable the default mappings.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
helpers,
|
|
||||||
config,
|
config,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
|
@ -22,10 +21,10 @@ lib.nixvim.plugins.mkVimPlugin {
|
||||||
description = "The name of the schema.";
|
description = "The name of the schema.";
|
||||||
};
|
};
|
||||||
|
|
||||||
description = helpers.mkNullOrStr "A description for this schema.";
|
description = lib.nixvim.mkNullOrStr "A description for this schema.";
|
||||||
|
|
||||||
fileMatch =
|
fileMatch =
|
||||||
helpers.mkNullOrOption (with lib.types; maybeRaw (either str (listOf (maybeRaw str))))
|
lib.nixvim.mkNullOrOption (with lib.types; maybeRaw (either str (listOf (maybeRaw str))))
|
||||||
''
|
''
|
||||||
Which filename to match against for this schema.
|
Which filename to match against for this schema.
|
||||||
'';
|
'';
|
||||||
|
|
@ -38,7 +37,7 @@ lib.nixvim.plugins.mkVimPlugin {
|
||||||
};
|
};
|
||||||
|
|
||||||
schemaOpts = {
|
schemaOpts = {
|
||||||
select = helpers.defaultNullOpts.mkListOf types.str [ ] ''
|
select = lib.nixvim.defaultNullOpts.mkListOf types.str [ ] ''
|
||||||
A list of strings representing the names of schemas to select.
|
A list of strings representing the names of schemas to select.
|
||||||
If this option is not present, all schemas are returned.
|
If this option is not present, all schemas are returned.
|
||||||
If it is present, only the selected schemas are returned.
|
If it is present, only the selected schemas are returned.
|
||||||
|
|
@ -47,21 +46,21 @@ lib.nixvim.plugins.mkVimPlugin {
|
||||||
See the [schema catalog](https://github.com/SchemaStore/schemastore/blob/master/src/api/json/catalog.json).
|
See the [schema catalog](https://github.com/SchemaStore/schemastore/blob/master/src/api/json/catalog.json).
|
||||||
'';
|
'';
|
||||||
|
|
||||||
ignore = helpers.defaultNullOpts.mkListOf types.str [ ] ''
|
ignore = lib.nixvim.defaultNullOpts.mkListOf types.str [ ] ''
|
||||||
A list of strings representing the names of schemas to ignore.
|
A list of strings representing the names of schemas to ignore.
|
||||||
`select` and `ignore` are mutually exclusive.
|
`select` and `ignore` are mutually exclusive.
|
||||||
|
|
||||||
See the [schema catalog](https://github.com/SchemaStore/schemastore/blob/master/src/api/json/catalog.json).
|
See the [schema catalog](https://github.com/SchemaStore/schemastore/blob/master/src/api/json/catalog.json).
|
||||||
'';
|
'';
|
||||||
|
|
||||||
replace = helpers.defaultNullOpts.mkAttrsOf schemaEntry { } ''
|
replace = lib.nixvim.defaultNullOpts.mkAttrsOf schemaEntry { } ''
|
||||||
An attrs of elements representing schemas to replace with a custom schema.
|
An attrs of elements representing schemas to replace with a custom schema.
|
||||||
|
|
||||||
The string key is the name of the schema to replace, the table value is the schema definition.
|
The string key is the name of the schema to replace, the table value is the schema definition.
|
||||||
If a schema with the given name isn't found, the custom schema will not be returned.
|
If a schema with the given name isn't found, the custom schema will not be returned.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
extra = helpers.defaultNullOpts.mkListOf schemaEntry [ ] ''
|
extra = lib.nixvim.defaultNullOpts.mkListOf schemaEntry [ ] ''
|
||||||
Additional schemas to include.
|
Additional schemas to include.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
@ -75,7 +74,7 @@ lib.nixvim.plugins.mkVimPlugin {
|
||||||
description = "Whether to enable the json schemas in jsonls.";
|
description = "Whether to enable the json schemas in jsonls.";
|
||||||
};
|
};
|
||||||
|
|
||||||
settings = helpers.mkSettingsOption {
|
settings = lib.nixvim.mkSettingsOption {
|
||||||
options = schemaOpts;
|
options = schemaOpts;
|
||||||
description = "Options supplied to the `require('schemastore').json.schemas` function.";
|
description = "Options supplied to the `require('schemastore').json.schemas` function.";
|
||||||
example = {
|
example = {
|
||||||
|
|
@ -114,7 +113,7 @@ lib.nixvim.plugins.mkVimPlugin {
|
||||||
description = "Whether to enable the yaml schemas in yamlls.";
|
description = "Whether to enable the yaml schemas in yamlls.";
|
||||||
};
|
};
|
||||||
|
|
||||||
settings = helpers.mkSettingsOption {
|
settings = lib.nixvim.mkSettingsOption {
|
||||||
options = schemaOpts;
|
options = schemaOpts;
|
||||||
description = "Options supplied to the `require('schemastore').yaml.schemas` function.";
|
description = "Options supplied to the `require('schemastore').yaml.schemas` function.";
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
helpers,
|
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
lib.nixvim.plugins.mkVimPlugin {
|
lib.nixvim.plugins.mkVimPlugin {
|
||||||
|
|
@ -12,7 +11,7 @@ lib.nixvim.plugins.mkVimPlugin {
|
||||||
maintainers = [ lib.maintainers.GaetanLepage ];
|
maintainers = [ lib.maintainers.GaetanLepage ];
|
||||||
|
|
||||||
settingsOptions = {
|
settingsOptions = {
|
||||||
heuristics = helpers.defaultNullOpts.mkFlagInt 1 ''
|
heuristics = lib.nixvim.defaultNullOpts.mkFlagInt 1 ''
|
||||||
Whether to enable/disable heuristics by default.
|
Whether to enable/disable heuristics by default.
|
||||||
|
|
||||||
You can also disable heuristics for individual filetypes:
|
You can also disable heuristics for individual filetypes:
|
||||||
|
|
@ -24,7 +23,7 @@ lib.nixvim.plugins.mkVimPlugin {
|
||||||
```
|
```
|
||||||
'';
|
'';
|
||||||
|
|
||||||
no_filetype_indent_on = helpers.defaultNullOpts.mkFlagInt 0 ''
|
no_filetype_indent_on = lib.nixvim.defaultNullOpts.mkFlagInt 0 ''
|
||||||
Sleuth forces `|:filetype-indent-on|` by default, which enables file-type specific indenting
|
Sleuth forces `|:filetype-indent-on|` by default, which enables file-type specific indenting
|
||||||
algorithms and is highly recommended.
|
algorithms and is highly recommended.
|
||||||
'';
|
'';
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
helpers,
|
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib;
|
with lib;
|
||||||
|
|
@ -15,19 +14,19 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
|
|
||||||
# https://michaelb.github.io/sniprun/sources/README.html#configuration
|
# https://michaelb.github.io/sniprun/sources/README.html#configuration
|
||||||
settingsOptions = {
|
settingsOptions = {
|
||||||
selected_interpreters = helpers.defaultNullOpts.mkListOf types.str [ ] ''
|
selected_interpreters = lib.nixvim.defaultNullOpts.mkListOf types.str [ ] ''
|
||||||
Use those instead of the default for the current filetype.
|
Use those instead of the default for the current filetype.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
repl_enable = helpers.defaultNullOpts.mkListOf types.str [ ] ''
|
repl_enable = lib.nixvim.defaultNullOpts.mkListOf types.str [ ] ''
|
||||||
Enable REPL-like behavior for the given interpreters.
|
Enable REPL-like behavior for the given interpreters.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
repl_disable = helpers.defaultNullOpts.mkListOf types.str [ ] ''
|
repl_disable = lib.nixvim.defaultNullOpts.mkListOf types.str [ ] ''
|
||||||
Disable REPL-like behavior for the given interpreters.
|
Disable REPL-like behavior for the given interpreters.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
interpreter_options = helpers.defaultNullOpts.mkAttrsOf' {
|
interpreter_options = lib.nixvim.defaultNullOpts.mkAttrsOf' {
|
||||||
type = types.anything;
|
type = types.anything;
|
||||||
pluginDefault = { };
|
pluginDefault = { };
|
||||||
description = ''
|
description = ''
|
||||||
|
|
@ -51,7 +50,7 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
display = helpers.defaultNullOpts.mkListOf' {
|
display = lib.nixvim.defaultNullOpts.mkListOf' {
|
||||||
type = types.str;
|
type = types.str;
|
||||||
pluginDefault = [
|
pluginDefault = [
|
||||||
"Classic"
|
"Classic"
|
||||||
|
|
@ -77,43 +76,43 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
live_display = helpers.defaultNullOpts.mkListOf types.str [
|
live_display = lib.nixvim.defaultNullOpts.mkListOf types.str [
|
||||||
"VirtualTextOk"
|
"VirtualTextOk"
|
||||||
] "Display modes used in `live_mode`.";
|
] "Display modes used in `live_mode`.";
|
||||||
|
|
||||||
display_options = {
|
display_options = {
|
||||||
terminal_scrollback = helpers.defaultNullOpts.mkUnsignedInt (lib.nixvim.literalLua "vim.o.scrollback") ''
|
terminal_scrollback = lib.nixvim.defaultNullOpts.mkUnsignedInt (lib.nixvim.literalLua "vim.o.scrollback") ''
|
||||||
Change terminal display scrollback lines.
|
Change terminal display scrollback lines.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
terminal_line_number = helpers.defaultNullOpts.mkBool false ''
|
terminal_line_number = lib.nixvim.defaultNullOpts.mkBool false ''
|
||||||
Whether show line number in terminal window.
|
Whether show line number in terminal window.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
terminal_signcolumn = helpers.defaultNullOpts.mkBool false ''
|
terminal_signcolumn = lib.nixvim.defaultNullOpts.mkBool false ''
|
||||||
Whether show signcolumn in terminal window.
|
Whether show signcolumn in terminal window.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
terminal_position = helpers.defaultNullOpts.mkEnumFirstDefault [
|
terminal_position = lib.nixvim.defaultNullOpts.mkEnumFirstDefault [
|
||||||
"vertical"
|
"vertical"
|
||||||
"horizontal"
|
"horizontal"
|
||||||
] "Terminal split position.";
|
] "Terminal split position.";
|
||||||
|
|
||||||
terminal_width = helpers.defaultNullOpts.mkUnsignedInt 45 ''
|
terminal_width = lib.nixvim.defaultNullOpts.mkUnsignedInt 45 ''
|
||||||
Change the terminal display option width (if vertical).
|
Change the terminal display option width (if vertical).
|
||||||
'';
|
'';
|
||||||
|
|
||||||
terminal_height = helpers.defaultNullOpts.mkUnsignedInt 20 ''
|
terminal_height = lib.nixvim.defaultNullOpts.mkUnsignedInt 20 ''
|
||||||
Change the terminal display option height (if horizontal).
|
Change the terminal display option height (if horizontal).
|
||||||
'';
|
'';
|
||||||
|
|
||||||
notification_timeout = helpers.defaultNullOpts.mkUnsignedInt 5 ''
|
notification_timeout = lib.nixvim.defaultNullOpts.mkUnsignedInt 5 ''
|
||||||
Timeout for nvim_notify output.
|
Timeout for nvim_notify output.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
show_no_output =
|
show_no_output =
|
||||||
helpers.defaultNullOpts.mkListOf types.str
|
lib.nixvim.defaultNullOpts.mkListOf types.str
|
||||||
[
|
[
|
||||||
"Classic"
|
"Classic"
|
||||||
"TempFloatingWindow"
|
"TempFloatingWindow"
|
||||||
|
|
@ -135,13 +134,13 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
ctermfg ? "",
|
ctermfg ? "",
|
||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
bg = helpers.defaultNullOpts.mkStr fg "Background color";
|
bg = lib.nixvim.defaultNullOpts.mkStr fg "Background color";
|
||||||
fg = helpers.defaultNullOpts.mkStr bg "Foreground color";
|
fg = lib.nixvim.defaultNullOpts.mkStr bg "Foreground color";
|
||||||
ctermbg = helpers.defaultNullOpts.mkStr ctermbg "Foreground color";
|
ctermbg = lib.nixvim.defaultNullOpts.mkStr ctermbg "Foreground color";
|
||||||
ctermfg = helpers.defaultNullOpts.mkStr ctermfg "Foreground color";
|
ctermfg = lib.nixvim.defaultNullOpts.mkStr ctermfg "Foreground color";
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
helpers.defaultNullOpts.mkNullable' {
|
lib.nixvim.defaultNullOpts.mkNullable' {
|
||||||
description = ''
|
description = ''
|
||||||
Customize highlight groups (setting this overrides colorscheme)
|
Customize highlight groups (setting this overrides colorscheme)
|
||||||
any parameters of `nvim_set_hl()` can be passed as-is.
|
any parameters of `nvim_set_hl()` can be passed as-is.
|
||||||
|
|
@ -173,18 +172,18 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
live_mode_toggle = helpers.defaultNullOpts.mkStr "off" ''
|
live_mode_toggle = lib.nixvim.defaultNullOpts.mkStr "off" ''
|
||||||
Live mode toggle, see [Usage - Running] for more info.
|
Live mode toggle, see [Usage - Running] for more info.
|
||||||
|
|
||||||
[Usage - Running]: https://michaelb.github.io/sniprun/sources/README.html#running
|
[Usage - Running]: https://michaelb.github.io/sniprun/sources/README.html#running
|
||||||
'';
|
'';
|
||||||
|
|
||||||
inline_messages = helpers.defaultNullOpts.mkBool false ''
|
inline_messages = lib.nixvim.defaultNullOpts.mkBool false ''
|
||||||
Boolean toggle for a one-line way to display messages
|
Boolean toggle for a one-line way to display messages
|
||||||
to workaround sniprun not being able to display anything.
|
to workaround sniprun not being able to display anything.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
borders = helpers.defaultNullOpts.mkEnum [
|
borders = lib.nixvim.defaultNullOpts.mkEnum [
|
||||||
"none"
|
"none"
|
||||||
"single"
|
"single"
|
||||||
"double"
|
"double"
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
helpers,
|
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib;
|
with lib;
|
||||||
|
|
@ -12,50 +11,50 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
maintainers = [ maintainers.GaetanLepage ];
|
maintainers = [ maintainers.GaetanLepage ];
|
||||||
|
|
||||||
settingsOptions = {
|
settingsOptions = {
|
||||||
show_jumps = helpers.defaultNullOpts.mkBool true ''
|
show_jumps = lib.nixvim.defaultNullOpts.mkBool true ''
|
||||||
Whether to show an animation each time the cursor jumps.
|
Whether to show an animation each time the cursor jumps.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
min_jump = helpers.defaultNullOpts.mkUnsignedInt 30 ''
|
min_jump = lib.nixvim.defaultNullOpts.mkUnsignedInt 30 ''
|
||||||
Minimum jump distance to trigger the animation.
|
Minimum jump distance to trigger the animation.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
popup = {
|
popup = {
|
||||||
delay_ms = helpers.defaultNullOpts.mkUnsignedInt 10 ''
|
delay_ms = lib.nixvim.defaultNullOpts.mkUnsignedInt 10 ''
|
||||||
Delay before popup displays.
|
Delay before popup displays.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
inc_ms = helpers.defaultNullOpts.mkUnsignedInt 5 ''
|
inc_ms = lib.nixvim.defaultNullOpts.mkUnsignedInt 5 ''
|
||||||
Time increments used for fade/resize effects.
|
Time increments used for fade/resize effects.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
blend = helpers.defaultNullOpts.mkUnsignedInt 10 ''
|
blend = lib.nixvim.defaultNullOpts.mkUnsignedInt 10 ''
|
||||||
Starting blend, between 0 (opaque) and 100 (transparent), see `:h winblend`.
|
Starting blend, between 0 (opaque) and 100 (transparent), see `:h winblend`.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
width = helpers.defaultNullOpts.mkUnsignedInt 20 ''
|
width = lib.nixvim.defaultNullOpts.mkUnsignedInt 20 ''
|
||||||
Width of the popup.
|
Width of the popup.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
winhl = helpers.defaultNullOpts.mkStr "PMenu" ''
|
winhl = lib.nixvim.defaultNullOpts.mkStr "PMenu" ''
|
||||||
The name of the window highlight group of the popup.
|
The name of the window highlight group of the popup.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
fader = helpers.defaultNullOpts.mkLuaFn "require('specs').exp_fader" ''
|
fader = lib.nixvim.defaultNullOpts.mkLuaFn "require('specs').exp_fader" ''
|
||||||
The fader function to use.
|
The fader function to use.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
resizer = helpers.defaultNullOpts.mkLuaFn "require('specs').shrink_resizer" ''
|
resizer = lib.nixvim.defaultNullOpts.mkLuaFn "require('specs').shrink_resizer" ''
|
||||||
The resizer function to use.
|
The resizer function to use.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
ignore_filetypes = helpers.defaultNullOpts.mkAttrsOf types.bool { } ''
|
ignore_filetypes = lib.nixvim.defaultNullOpts.mkAttrsOf types.bool { } ''
|
||||||
An attrs where keys are filetypes and values are a boolean stating whether animation should be
|
An attrs where keys are filetypes and values are a boolean stating whether animation should be
|
||||||
enabled or not for this filetype.
|
enabled or not for this filetype.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
ignore_buftypes = helpers.defaultNullOpts.mkAttrsOf types.bool { nofile = true; } ''
|
ignore_buftypes = lib.nixvim.defaultNullOpts.mkAttrsOf types.bool { nofile = true; } ''
|
||||||
An attrs where keys are buftypes and values are a boolean stating whether animation should be
|
An attrs where keys are buftypes and values are a boolean stating whether animation should be
|
||||||
enabled or not for this buftype.
|
enabled or not for this buftype.
|
||||||
'';
|
'';
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
config,
|
config,
|
||||||
helpers,
|
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib;
|
with lib;
|
||||||
|
|
@ -50,7 +49,7 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
let
|
let
|
||||||
mkEngineOption =
|
mkEngineOption =
|
||||||
type:
|
type:
|
||||||
helpers.mkNullOrOption
|
lib.nixvim.mkNullOrOption
|
||||||
(
|
(
|
||||||
with types;
|
with types;
|
||||||
attrsOf (submodule {
|
attrsOf (submodule {
|
||||||
|
|
@ -61,11 +60,11 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
description = "Executable to run.";
|
description = "Executable to run.";
|
||||||
};
|
};
|
||||||
|
|
||||||
args = helpers.defaultNullOpts.mkListOf types.str [ ] ''
|
args = lib.nixvim.defaultNullOpts.mkListOf types.str [ ] ''
|
||||||
List of arguments to provide to the engine.
|
List of arguments to provide to the engine.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
options = helpers.defaultNullOpts.mkAttrsOf (types.submodule {
|
options = lib.nixvim.defaultNullOpts.mkAttrsOf (types.submodule {
|
||||||
options = {
|
options = {
|
||||||
value = mkOption {
|
value = mkOption {
|
||||||
type = types.str;
|
type = types.str;
|
||||||
|
|
@ -79,7 +78,7 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
description = "The option icon.";
|
description = "The option icon.";
|
||||||
};
|
};
|
||||||
|
|
||||||
desc = helpers.mkNullOrStr ''
|
desc = lib.nixvim.mkNullOrStr ''
|
||||||
The description for this option.
|
The description for this option.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
@ -94,31 +93,31 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
'';
|
'';
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
color_devicons = helpers.defaultNullOpts.mkBool true ''
|
color_devicons = lib.nixvim.defaultNullOpts.mkBool true ''
|
||||||
Whether to enable color devicons.
|
Whether to enable color devicons.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
open_cmd = helpers.defaultNullOpts.mkStr "vnew" ''
|
open_cmd = lib.nixvim.defaultNullOpts.mkStr "vnew" ''
|
||||||
The open command.
|
The open command.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
live_update = helpers.defaultNullOpts.mkBool false ''
|
live_update = lib.nixvim.defaultNullOpts.mkBool false ''
|
||||||
Auto execute search again when you write to any file in vim.
|
Auto execute search again when you write to any file in vim.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
lnum_for_results = helpers.defaultNullOpts.mkBool false ''
|
lnum_for_results = lib.nixvim.defaultNullOpts.mkBool false ''
|
||||||
Show line number for search/replace results.
|
Show line number for search/replace results.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
line_sep_start = helpers.defaultNullOpts.mkStr "┌──────────────────────────────────────────────────────" "Start of the line separator";
|
line_sep_start = lib.nixvim.defaultNullOpts.mkStr "┌──────────────────────────────────────────────────────" "Start of the line separator";
|
||||||
|
|
||||||
result_padding = helpers.defaultNullOpts.mkStr "│ " ''
|
result_padding = lib.nixvim.defaultNullOpts.mkStr "│ " ''
|
||||||
Result padding string.
|
Result padding string.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
line_sep = helpers.defaultNullOpts.mkStr "└──────────────────────────────────────────────────────" "Line separator.";
|
line_sep = lib.nixvim.defaultNullOpts.mkStr "└──────────────────────────────────────────────────────" "Line separator.";
|
||||||
|
|
||||||
highlight = helpers.defaultNullOpts.mkAttrsOf types.str {
|
highlight = lib.nixvim.defaultNullOpts.mkAttrsOf types.str {
|
||||||
headers = "SpectreHeader";
|
headers = "SpectreHeader";
|
||||||
ui = "SpectreBody";
|
ui = "SpectreBody";
|
||||||
filename = "SpectreFile";
|
filename = "SpectreFile";
|
||||||
|
|
@ -129,7 +128,7 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
} "Highlight groups.";
|
} "Highlight groups.";
|
||||||
|
|
||||||
mapping =
|
mapping =
|
||||||
helpers.mkNullOrOption
|
lib.nixvim.mkNullOrOption
|
||||||
(
|
(
|
||||||
with types;
|
with types;
|
||||||
attrsOf (submodule {
|
attrsOf (submodule {
|
||||||
|
|
@ -145,7 +144,7 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
example = "<cmd>lua require('spectre').tab()<cr>";
|
example = "<cmd>lua require('spectre').tab()<cr>";
|
||||||
};
|
};
|
||||||
|
|
||||||
desc = helpers.mkNullOrStr ''
|
desc = lib.nixvim.mkNullOrStr ''
|
||||||
Description for this mapping.
|
Description for this mapping.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
@ -163,39 +162,39 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
|
|
||||||
default = {
|
default = {
|
||||||
find = {
|
find = {
|
||||||
cmd = helpers.defaultNullOpts.mkStr "rg" ''
|
cmd = lib.nixvim.defaultNullOpts.mkStr "rg" ''
|
||||||
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 = lib.nixvim.defaultNullOpts.mkListOf types.str [ "ignore-case" ] ''
|
||||||
Options to use for this engine.
|
Options to use for this engine.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
replace = {
|
replace = {
|
||||||
cmd = helpers.defaultNullOpts.mkStr "rg" ''
|
cmd = lib.nixvim.defaultNullOpts.mkStr "rg" ''
|
||||||
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 = lib.nixvim.defaultNullOpts.mkListOf types.str [ ] ''
|
||||||
Options to use for this engine.
|
Options to use for this engine.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
replace_vim_cmd = helpers.defaultNullOpts.mkStr "cdo" ''
|
replace_vim_cmd = lib.nixvim.defaultNullOpts.mkStr "cdo" ''
|
||||||
The replace command to use within vim.
|
The replace command to use within vim.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
is_open_target_win = helpers.defaultNullOpts.mkBool true ''
|
is_open_target_win = lib.nixvim.defaultNullOpts.mkBool true ''
|
||||||
Open file on opener window.
|
Open file on opener window.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
is_insert_mode = helpers.defaultNullOpts.mkBool false ''
|
is_insert_mode = lib.nixvim.defaultNullOpts.mkBool false ''
|
||||||
Start open panel in insert mode.
|
Start open panel in insert mode.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
is_block_ui_break = helpers.defaultNullOpts.mkBool false ''
|
is_block_ui_break = lib.nixvim.defaultNullOpts.mkBool false ''
|
||||||
Mapping backspace and enter key to avoid ui break.
|
Mapping backspace and enter key to avoid ui break.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
helpers,
|
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib;
|
with lib;
|
||||||
|
|
@ -13,7 +12,7 @@ mkVimPlugin {
|
||||||
|
|
||||||
maintainers = [ maintainers.GaetanLepage ];
|
maintainers = [ maintainers.GaetanLepage ];
|
||||||
|
|
||||||
settingsOptions = import ./settings-options.nix { inherit lib helpers; };
|
settingsOptions = import ./settings-options.nix { inherit lib; };
|
||||||
|
|
||||||
# TODO
|
# TODO
|
||||||
settingsExample = {
|
settingsExample = {
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
{ lib, helpers }:
|
{ lib }:
|
||||||
with lib;
|
with lib;
|
||||||
{
|
{
|
||||||
session_dir = helpers.defaultNullOpts.mkStr "~/.vim/session" ''
|
session_dir = lib.nixvim.defaultNullOpts.mkStr "~/.vim/session" ''
|
||||||
The directory to save/load sessions to/from.
|
The directory to save/load sessions to/from.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
|
@ -18,12 +18,12 @@ with lib;
|
||||||
example = "files";
|
example = "files";
|
||||||
};
|
};
|
||||||
|
|
||||||
header = helpers.mkNullOrOption (with lib.types; listOf (maybeRaw str)) ''
|
header = lib.nixvim.mkNullOrOption (with lib.types; listOf (maybeRaw str)) ''
|
||||||
The 'header' is a list of strings, whereas each string will be put on its own
|
The 'header' is a list of strings, whereas each string will be put on its own
|
||||||
line in the header.
|
line in the header.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
indices = helpers.mkNullOrOption (with lib.types; listOf (maybeRaw str)) ''
|
indices = lib.nixvim.mkNullOrOption (with lib.types; listOf (maybeRaw str)) ''
|
||||||
The 'indices' is a list of strings, which act as indices for the current list.
|
The 'indices' is a list of strings, which act as indices for the current list.
|
||||||
Opposed to the global `custom_indices`, this is limited to the current list.
|
Opposed to the global `custom_indices`, this is limited to the current list.
|
||||||
'';
|
'';
|
||||||
|
|
@ -64,7 +64,7 @@ with lib;
|
||||||
};
|
};
|
||||||
|
|
||||||
bookmarks =
|
bookmarks =
|
||||||
helpers.defaultNullOpts.mkListOf
|
lib.nixvim.defaultNullOpts.mkListOf
|
||||||
(
|
(
|
||||||
with lib.types;
|
with lib.types;
|
||||||
oneOf [
|
oneOf [
|
||||||
|
|
@ -81,7 +81,7 @@ with lib;
|
||||||
'';
|
'';
|
||||||
|
|
||||||
commands =
|
commands =
|
||||||
helpers.defaultNullOpts.mkListOf
|
lib.nixvim.defaultNullOpts.mkListOf
|
||||||
(
|
(
|
||||||
with types;
|
with types;
|
||||||
oneOf [
|
oneOf [
|
||||||
|
|
@ -107,16 +107,16 @@ with lib;
|
||||||
```
|
```
|
||||||
'';
|
'';
|
||||||
|
|
||||||
files_number = helpers.defaultNullOpts.mkUnsignedInt 10 ''
|
files_number = lib.nixvim.defaultNullOpts.mkUnsignedInt 10 ''
|
||||||
The number of files to list.
|
The number of files to list.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
update_oldfiles = helpers.defaultNullOpts.mkBool false ''
|
update_oldfiles = lib.nixvim.defaultNullOpts.mkBool false ''
|
||||||
Usually `|v:oldfiles|` only gets updated when Vim exits.
|
Usually `|v:oldfiles|` only gets updated when Vim exits.
|
||||||
Using this option updates it on-the-fly, so that `:Startify` is always up-to-date.
|
Using this option updates it on-the-fly, so that `:Startify` is always up-to-date.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
session_autoload = helpers.defaultNullOpts.mkBool false ''
|
session_autoload = lib.nixvim.defaultNullOpts.mkBool false ''
|
||||||
If this option is enabled and you start Vim in a directory that contains a `Session.vim`,
|
If this option is enabled and you start Vim in a directory that contains a `Session.vim`,
|
||||||
that session will be loaded automatically.
|
that session will be loaded automatically.
|
||||||
Otherwise it will be shown as the top entry in the Startify buffer.
|
Otherwise it will be shown as the top entry in the Startify buffer.
|
||||||
|
|
@ -131,19 +131,19 @@ 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 = lib.nixvim.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"]`
|
||||||
'';
|
'';
|
||||||
|
|
||||||
session_persistence = helpers.defaultNullOpts.mkBool false ''
|
session_persistence = lib.nixvim.defaultNullOpts.mkBool false ''
|
||||||
Automatically update sessions in two cases:
|
Automatically update sessions in two cases:
|
||||||
- Before leaving Vim
|
- Before leaving Vim
|
||||||
- Before loading a new session via `:SLoad`
|
- Before loading a new session via `:SLoad`
|
||||||
'';
|
'';
|
||||||
|
|
||||||
session_delete_buffers = helpers.defaultNullOpts.mkBool true ''
|
session_delete_buffers = lib.nixvim.defaultNullOpts.mkBool true ''
|
||||||
Delete all buffers when loading or closing a session:
|
Delete all buffers when loading or closing a session:
|
||||||
- When using `|startify-:SLoad|`.
|
- When using `|startify-:SLoad|`.
|
||||||
- When using `|startify-:SClose|`.
|
- When using `|startify-:SClose|`.
|
||||||
|
|
@ -153,7 +153,7 @@ with lib;
|
||||||
NOTE: Buffers with unsaved changes are silently ignored.
|
NOTE: Buffers with unsaved changes are silently ignored.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
change_to_dir = helpers.defaultNullOpts.mkBool true ''
|
change_to_dir = lib.nixvim.defaultNullOpts.mkBool true ''
|
||||||
When opening a file or bookmark, change to its directory.
|
When opening a file or bookmark, change to its directory.
|
||||||
|
|
||||||
You want to disable this, if you're using `|'autochdir'|` as well.
|
You want to disable this, if you're using `|'autochdir'|` as well.
|
||||||
|
|
@ -162,14 +162,14 @@ with lib;
|
||||||
introduced.
|
introduced.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
change_to_vcs_root = helpers.defaultNullOpts.mkBool false ''
|
change_to_vcs_root = lib.nixvim.defaultNullOpts.mkBool false ''
|
||||||
When opening a file or bookmark, seek and change to the root directory of the VCS (if there is
|
When opening a file or bookmark, seek and change to the root directory of the VCS (if there is
|
||||||
one).
|
one).
|
||||||
|
|
||||||
At the moment only git, hg, bzr and svn are supported.
|
At the moment only git, hg, bzr and svn are supported.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
change_cmd = helpers.defaultNullOpts.mkStr "lcd" ''
|
change_cmd = lib.nixvim.defaultNullOpts.mkStr "lcd" ''
|
||||||
The default command for switching directories.
|
The default command for switching directories.
|
||||||
|
|
||||||
Valid values:
|
Valid values:
|
||||||
|
|
@ -180,7 +180,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 = lib.nixvim.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.
|
||||||
|
|
||||||
|
|
@ -210,7 +210,7 @@ with lib;
|
||||||
```
|
```
|
||||||
'';
|
'';
|
||||||
|
|
||||||
fortune_use_unicode = helpers.defaultNullOpts.mkBool false ''
|
fortune_use_unicode = lib.nixvim.defaultNullOpts.mkBool false ''
|
||||||
By default, the fortune header uses ASCII characters, because they work for everyone.
|
By default, the fortune header uses ASCII characters, because they work for everyone.
|
||||||
If you set this option to `true` and your 'encoding' is "utf-8", Unicode box-drawing characters
|
If you set this option to `true` and your 'encoding' is "utf-8", Unicode box-drawing characters
|
||||||
will be used instead.
|
will be used instead.
|
||||||
|
|
@ -222,22 +222,22 @@ with lib;
|
||||||
For more information: http://unicode.org/reports/tr11
|
For more information: http://unicode.org/reports/tr11
|
||||||
'';
|
'';
|
||||||
|
|
||||||
padding_left = helpers.defaultNullOpts.mkUnsignedInt 3 ''
|
padding_left = lib.nixvim.defaultNullOpts.mkUnsignedInt 3 ''
|
||||||
The number of spaces used for left padding.
|
The number of spaces used for left padding.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
skiplist_server = helpers.defaultNullOpts.mkListOf (with lib.types; maybeRaw str) [ ] ''
|
skiplist_server = lib.nixvim.defaultNullOpts.mkListOf (with lib.types; 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.
|
||||||
|
|
||||||
Example: `["GVIM"]`
|
Example: `["GVIM"]`
|
||||||
'';
|
'';
|
||||||
|
|
||||||
enable_special = helpers.defaultNullOpts.mkBool true ''
|
enable_special = lib.nixvim.defaultNullOpts.mkBool true ''
|
||||||
Show `<empty buffer>` and `<quit>`.
|
Show `<empty buffer>` and `<quit>`.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
enable_unsafe = helpers.defaultNullOpts.mkBool false ''
|
enable_unsafe = lib.nixvim.defaultNullOpts.mkBool false ''
|
||||||
Enable the option only in case you think Vim starts too slowly (because of `:Startify`) or if
|
Enable the option only in case you think Vim starts too slowly (because of `:Startify`) or if
|
||||||
you often edit files on remote filesystems.
|
you often edit files on remote filesystems.
|
||||||
|
|
||||||
|
|
@ -254,7 +254,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 = lib.nixvim.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:
|
||||||
|
|
@ -271,7 +271,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 = lib.nixvim.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.
|
||||||
|
|
||||||
|
|
@ -285,7 +285,7 @@ with lib;
|
||||||
```
|
```
|
||||||
'';
|
'';
|
||||||
|
|
||||||
session_savecmds = helpers.defaultNullOpts.mkListOf types.str [ ] ''
|
session_savecmds = lib.nixvim.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:
|
||||||
|
|
@ -296,17 +296,17 @@ with lib;
|
||||||
```
|
```
|
||||||
'';
|
'';
|
||||||
|
|
||||||
session_number = helpers.defaultNullOpts.mkUnsignedInt 999 ''
|
session_number = lib.nixvim.defaultNullOpts.mkUnsignedInt 999 ''
|
||||||
The maximum number of sessions to display.
|
The maximum number of sessions to display.
|
||||||
Makes the most sense together with `session_sort`.
|
Makes the most sense together with `session_sort`.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
session_sort = helpers.defaultNullOpts.mkBool false ''
|
session_sort = lib.nixvim.defaultNullOpts.mkBool false ''
|
||||||
Sort sessions by modification time (when the session files were written) rather than
|
Sort sessions by modification time (when the session files were written) rather than
|
||||||
alphabetically.
|
alphabetically.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
custom_indices = helpers.defaultNullOpts.mkListOf' {
|
custom_indices = lib.nixvim.defaultNullOpts.mkListOf' {
|
||||||
type = types.str;
|
type = types.str;
|
||||||
pluginDefault = [ ];
|
pluginDefault = [ ];
|
||||||
description = ''
|
description = ''
|
||||||
|
|
@ -324,7 +324,7 @@ with lib;
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
custom_header = helpers.defaultNullOpts.mkListOf' {
|
custom_header = lib.nixvim.defaultNullOpts.mkListOf' {
|
||||||
type = types.str;
|
type = types.str;
|
||||||
description = ''
|
description = ''
|
||||||
Define your own header.
|
Define your own header.
|
||||||
|
|
@ -343,7 +343,7 @@ with lib;
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
custom_header_quotes = helpers.defaultNullOpts.mkListOf' {
|
custom_header_quotes = lib.nixvim.defaultNullOpts.mkListOf' {
|
||||||
type = with types; listOf str;
|
type = with types; listOf str;
|
||||||
pluginDefault = [ ];
|
pluginDefault = [ ];
|
||||||
description = ''
|
description = ''
|
||||||
|
|
@ -363,19 +363,19 @@ with lib;
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
custom_footer = helpers.defaultNullOpts.mkListOf' {
|
custom_footer = lib.nixvim.defaultNullOpts.mkListOf' {
|
||||||
type = types.str;
|
type = types.str;
|
||||||
description = ''
|
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 = lib.nixvim.defaultNullOpts.mkBool false ''
|
||||||
Don't run Startify at Vim startup.
|
Don't run Startify at Vim startup.
|
||||||
You can still call it anytime via `:Startify`.
|
You can still call it anytime via `:Startify`.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
relative_path = helpers.defaultNullOpts.mkBool false ''
|
relative_path = lib.nixvim.defaultNullOpts.mkBool false ''
|
||||||
If the file is in or below the current working directory, use a relative path.
|
If the file is in or below the current working directory, use a relative path.
|
||||||
Otherwise an absolute path is used.
|
Otherwise an absolute path is used.
|
||||||
The latter prevents hard to grasp entries like `../../../../../foo`.
|
The latter prevents hard to grasp entries like `../../../../../foo`.
|
||||||
|
|
@ -383,7 +383,7 @@ with lib;
|
||||||
NOTE: This only applies to the "files" list, since the "dir" list is relative by nature.
|
NOTE: This only applies to the "files" list, since the "dir" list is relative by nature.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
use_env = helpers.defaultNullOpts.mkBool false ''
|
use_env = lib.nixvim.defaultNullOpts.mkBool false ''
|
||||||
Show environment variables in path, if their name is shorter than their value.
|
Show environment variables in path, if their name is shorter than their value.
|
||||||
See `|startify-colors|` for highlighting them.
|
See `|startify-colors|` for highlighting them.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
helpers,
|
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib;
|
with lib;
|
||||||
|
|
@ -12,26 +11,26 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
maintainers = [ maintainers.GaetanLepage ];
|
maintainers = [ maintainers.GaetanLepage ];
|
||||||
|
|
||||||
settingsOptions = {
|
settingsOptions = {
|
||||||
setopt = helpers.defaultNullOpts.mkBool true ''
|
setopt = lib.nixvim.defaultNullOpts.mkBool true ''
|
||||||
Whether to set the `statuscolumn` option, may be set to false for those who want to use the
|
Whether to set the `statuscolumn` option, may be set to false for those who want to use the
|
||||||
click handlers in their own `statuscolumn`: `_G.Sc[SFL]a()`.
|
click handlers in their own `statuscolumn`: `_G.Sc[SFL]a()`.
|
||||||
Although I recommend just using the segments field below to build your statuscolumn to
|
Although I recommend just using the segments field below to build your statuscolumn to
|
||||||
benefit from the performance optimizations in this plugin.
|
benefit from the performance optimizations in this plugin.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
thousands = helpers.defaultNullOpts.mkNullable (with types; either str (enum [ false ])) false ''
|
thousands = lib.nixvim.defaultNullOpts.mkNullable (with types; either str (enum [ false ])) false ''
|
||||||
`false` or line number thousands separator string ("." / ",").
|
`false` or line number thousands separator string ("." / ",").
|
||||||
'';
|
'';
|
||||||
|
|
||||||
relculright = helpers.defaultNullOpts.mkBool false ''
|
relculright = lib.nixvim.defaultNullOpts.mkBool false ''
|
||||||
Whether to right-align the cursor line number with `relativenumber` set.
|
Whether to right-align the cursor line number with `relativenumber` set.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
ft_ignore = helpers.defaultNullOpts.mkListOf types.str null ''
|
ft_ignore = lib.nixvim.defaultNullOpts.mkListOf types.str null ''
|
||||||
Lua table with 'filetype' values for which `statuscolumn` will be unset.
|
Lua table with 'filetype' values for which `statuscolumn` will be unset.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
bt_ignore = helpers.defaultNullOpts.mkListOf types.str null ''
|
bt_ignore = lib.nixvim.defaultNullOpts.mkListOf types.str null ''
|
||||||
Lua table with 'buftype' values for which `statuscolumn` will be unset.
|
Lua table with 'buftype' values for which `statuscolumn` will be unset.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
|
@ -47,56 +46,56 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
example = [ "%C" ];
|
example = [ "%C" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
click = helpers.mkNullOrStr ''
|
click = lib.nixvim.mkNullOrStr ''
|
||||||
`%@` click function label, applies to each text element.
|
`%@` click function label, applies to each text element.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
hl = helpers.mkNullOrStr ''
|
hl = lib.nixvim.mkNullOrStr ''
|
||||||
`%#` highlight group label, applies to each text element.
|
`%#` highlight group label, applies to each text element.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
condition = helpers.mkNullOrOption (
|
condition = lib.nixvim.mkNullOrOption (
|
||||||
with lib.types; listOf (either bool rawLua)
|
with lib.types; listOf (either bool rawLua)
|
||||||
) "Table of booleans or functions returning a boolean.";
|
) "Table of booleans or functions returning a boolean.";
|
||||||
|
|
||||||
sign = {
|
sign = {
|
||||||
name = helpers.defaultNullOpts.mkListOf types.str [ ] ''
|
name = lib.nixvim.defaultNullOpts.mkListOf types.str [ ] ''
|
||||||
List of lua patterns to match the sign name against.
|
List of lua patterns to match the sign name against.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
text = helpers.defaultNullOpts.mkListOf types.str [ ] ''
|
text = lib.nixvim.defaultNullOpts.mkListOf types.str [ ] ''
|
||||||
List of lua patterns to match the extmark sign text against.
|
List of lua patterns to match the extmark sign text against.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
namespace = helpers.defaultNullOpts.mkListOf types.str [ ] ''
|
namespace = lib.nixvim.defaultNullOpts.mkListOf types.str [ ] ''
|
||||||
List of lua patterns to match the extmark sign namespace against.
|
List of lua patterns to match the extmark sign namespace against.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
maxwidth = helpers.defaultNullOpts.mkUnsignedInt 1 ''
|
maxwidth = lib.nixvim.defaultNullOpts.mkUnsignedInt 1 ''
|
||||||
Maximum number of signs that will be displayed in this segment
|
Maximum number of signs that will be displayed in this segment
|
||||||
'';
|
'';
|
||||||
|
|
||||||
colwidth = helpers.defaultNullOpts.mkUnsignedInt 2 ''
|
colwidth = lib.nixvim.defaultNullOpts.mkUnsignedInt 2 ''
|
||||||
Maximum number of display cells per sign in this segment.
|
Maximum number of display cells per sign in this segment.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
auto = helpers.defaultNullOpts.mkBool false ''
|
auto = lib.nixvim.defaultNullOpts.mkBool false ''
|
||||||
When true, the segment will not be drawn if no signs matching the pattern are
|
When true, the segment will not be drawn if no signs matching the pattern are
|
||||||
currently placed in the buffer.
|
currently placed in the buffer.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
fillchar = helpers.defaultNullOpts.mkStr " " ''
|
fillchar = lib.nixvim.defaultNullOpts.mkStr " " ''
|
||||||
Character used to fill a segment with less signs than maxwidth.
|
Character used to fill a segment with less signs than maxwidth.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
fillcharhl = helpers.mkNullOrStr ''
|
fillcharhl = lib.nixvim.mkNullOrStr ''
|
||||||
Highlight group used for fillchar (SignColumn/CursorLineSign if omitted).
|
Highlight group used for fillchar (SignColumn/CursorLineSign if omitted).
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
helpers.defaultNullOpts.mkListOf segmentType [
|
lib.nixvim.defaultNullOpts.mkListOf segmentType [
|
||||||
{
|
{
|
||||||
text = [ "%C" ];
|
text = [ "%C" ];
|
||||||
click = "v:lua.ScFa";
|
click = "v:lua.ScFa";
|
||||||
|
|
@ -118,7 +117,7 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
}
|
}
|
||||||
] "The statuscolumn can be customized through the `segments` option.";
|
] "The statuscolumn can be customized through the `segments` option.";
|
||||||
|
|
||||||
clickmod = helpers.defaultNullOpts.mkStr "c" ''
|
clickmod = lib.nixvim.defaultNullOpts.mkStr "c" ''
|
||||||
Modifier used for certain actions in the builtin clickhandlers:
|
Modifier used for certain actions in the builtin clickhandlers:
|
||||||
`a` for Alt, `c` for Ctrl and `m` for Meta.
|
`a` for Alt, `c` for Ctrl and `m` for Meta.
|
||||||
'';
|
'';
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
helpers,
|
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib;
|
with lib;
|
||||||
|
|
@ -97,7 +96,7 @@ lib.nixvim.plugins.mkVimPlugin {
|
||||||
|
|
||||||
settingsOptions = {
|
settingsOptions = {
|
||||||
save_on_switch =
|
save_on_switch =
|
||||||
helpers.mkNullOrOption
|
lib.nixvim.mkNullOrOption
|
||||||
(types.enum [
|
(types.enum [
|
||||||
1
|
1
|
||||||
2
|
2
|
||||||
|
|
@ -110,14 +109,14 @@ lib.nixvim.plugins.mkVimPlugin {
|
||||||
2: `:wall` (write all buffers)
|
2: `:wall` (write all buffers)
|
||||||
'';
|
'';
|
||||||
|
|
||||||
disable_when_zoomed = helpers.defaultNullOpts.mkFlagInt 0 ''
|
disable_when_zoomed = lib.nixvim.defaultNullOpts.mkFlagInt 0 ''
|
||||||
By default, if you zoom the tmux pane running vim and then attempt to navigate "past" the edge of the vim session, tmux will unzoom the pane.
|
By default, if you zoom the tmux pane running vim and then attempt to navigate "past" the edge of the vim session, tmux will unzoom the pane.
|
||||||
This is the default tmux behavior, but may be confusing if you've become accustomed to navigation "wrapping" around the sides due to this plugin.
|
This is the default tmux behavior, but may be confusing if you've become accustomed to navigation "wrapping" around the sides due to this plugin.
|
||||||
|
|
||||||
This option disables the unzooming behavior, keeping all navigation within vim until the tmux pane is explicitly unzoomed.
|
This option disables the unzooming behavior, keeping all navigation within vim until the tmux pane is explicitly unzoomed.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
preserve_zoom = helpers.defaultNullOpts.mkFlagInt 0 ''
|
preserve_zoom = lib.nixvim.defaultNullOpts.mkFlagInt 0 ''
|
||||||
As noted in `disable_when_zoomed`, navigating from a vim pane to another tmux pane normally causes the window to be unzoomed.
|
As noted in `disable_when_zoomed`, navigating from a vim pane to another tmux pane normally causes the window to be unzoomed.
|
||||||
Some users may prefer the behavior of tmux's `-Z` option to `select-pane`, which keeps the window zoomed if it was zoomed.
|
Some users may prefer the behavior of tmux's `-Z` option to `select-pane`, which keeps the window zoomed if it was zoomed.
|
||||||
|
|
||||||
|
|
@ -126,7 +125,7 @@ lib.nixvim.plugins.mkVimPlugin {
|
||||||
Naturally, if `disable_when_zoomed` is enabled, this option will have no effect.
|
Naturally, if `disable_when_zoomed` is enabled, this option will have no effect.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
no_wrap = helpers.defaultNullOpts.mkFlagInt 0 ''
|
no_wrap = lib.nixvim.defaultNullOpts.mkFlagInt 0 ''
|
||||||
By default, if you try to move past the edge of the screen, tmux/vim will "wrap" around to the opposite side.
|
By default, if you try to move past the edge of the screen, tmux/vim will "wrap" around to the opposite side.
|
||||||
|
|
||||||
This option disables "wrapping" in vim, but tmux will need to be configured separately.
|
This option disables "wrapping" in vim, but tmux will need to be configured separately.
|
||||||
|
|
@ -149,7 +148,7 @@ lib.nixvim.plugins.mkVimPlugin {
|
||||||
```
|
```
|
||||||
'';
|
'';
|
||||||
|
|
||||||
no_mappings = helpers.defaultNullOpts.mkFlagInt 0 ''
|
no_mappings = lib.nixvim.defaultNullOpts.mkFlagInt 0 ''
|
||||||
By default `<C-h>`, `<C-j>`, `<C-k>`, `<C-l>`, & `<C-\\>`
|
By default `<C-h>`, `<C-j>`, `<C-k>`, `<C-l>`, & `<C-\\>`
|
||||||
are mapped to navigating left, down, up, right, & previous, respectively.
|
are mapped to navigating left, down, up, right, & previous, respectively.
|
||||||
|
|
||||||
|
|
@ -196,7 +195,7 @@ lib.nixvim.plugins.mkVimPlugin {
|
||||||
];
|
];
|
||||||
default = [ ];
|
default = [ ];
|
||||||
type = types.listOf (
|
type = types.listOf (
|
||||||
helpers.keymaps.mkMapOptionSubmodule {
|
lib.nixvim.keymaps.mkMapOptionSubmodule {
|
||||||
action = {
|
action = {
|
||||||
description = "The direction in which to navigate.";
|
description = "The direction in which to navigate.";
|
||||||
type = types.enum [
|
type = types.enum [
|
||||||
|
|
@ -211,13 +210,13 @@ lib.nixvim.plugins.mkVimPlugin {
|
||||||
lua = true;
|
lua = true;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
apply = map helpers.keymaps.removeDeprecatedMapAttrs;
|
apply = map lib.nixvim.keymaps.removeDeprecatedMapAttrs;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
extraConfig = cfg: {
|
extraConfig = cfg: {
|
||||||
keymaps = map (
|
keymaps = map (
|
||||||
mapping: mapping // { action = "<cmd>TmuxNavigate${helpers.upperFirstChar mapping.action}<cr>"; }
|
mapping: mapping // { action = "<cmd>TmuxNavigate${lib.nixvim.upperFirstChar mapping.action}<cr>"; }
|
||||||
) cfg.keymaps;
|
) cfg.keymaps;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
helpers,
|
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib;
|
with lib;
|
||||||
|
|
@ -13,7 +12,7 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
|
|
||||||
settingsOptions = {
|
settingsOptions = {
|
||||||
groups =
|
groups =
|
||||||
helpers.defaultNullOpts.mkListOf types.str
|
lib.nixvim.defaultNullOpts.mkListOf types.str
|
||||||
[
|
[
|
||||||
"Normal"
|
"Normal"
|
||||||
"NormalNC"
|
"NormalNC"
|
||||||
|
|
@ -45,11 +44,11 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
The list of transparent groups.
|
The list of transparent groups.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
extra_groups = helpers.defaultNullOpts.mkListOf types.str [ ] ''
|
extra_groups = lib.nixvim.defaultNullOpts.mkListOf types.str [ ] ''
|
||||||
Additional groups that should be cleared.
|
Additional groups that should be cleared.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
exclude_groups = helpers.defaultNullOpts.mkListOf types.str [ ] ''
|
exclude_groups = lib.nixvim.defaultNullOpts.mkListOf types.str [ ] ''
|
||||||
Groups that you don't want to clear.
|
Groups that you don't want to clear.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
helpers,
|
|
||||||
config,
|
config,
|
||||||
options,
|
options,
|
||||||
...
|
...
|
||||||
|
|
@ -208,13 +207,13 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
}) buildGrammarDeps;
|
}) buildGrammarDeps;
|
||||||
|
|
||||||
settingsOptions = {
|
settingsOptions = {
|
||||||
auto_install = helpers.defaultNullOpts.mkBool false ''
|
auto_install = lib.nixvim.defaultNullOpts.mkBool false ''
|
||||||
Whether to automatically install missing parsers when entering a buffer.
|
Whether to automatically install missing parsers when entering a buffer.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
highlight = {
|
highlight = {
|
||||||
additional_vim_regex_highlighting =
|
additional_vim_regex_highlighting =
|
||||||
helpers.defaultNullOpts.mkNullableWithRaw (with lib.types; either bool (listOf (maybeRaw str)))
|
lib.nixvim.defaultNullOpts.mkNullableWithRaw (with lib.types; either bool (listOf (maybeRaw str)))
|
||||||
false
|
false
|
||||||
''
|
''
|
||||||
Setting this to true will run `syntax` and tree-sitter at the same time. \
|
Setting this to true will run `syntax` and tree-sitter at the same time. \
|
||||||
|
|
@ -225,22 +224,22 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
Instead of true, it can also be a list of languages.
|
Instead of true, it can also be a list of languages.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
enable = helpers.defaultNullOpts.mkBool false ''
|
enable = lib.nixvim.defaultNullOpts.mkBool false ''
|
||||||
Whether to enable treesitter highlighting.
|
Whether to enable treesitter highlighting.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
disable = helpers.defaultNullOpts.mkStrLuaFnOr (with lib.types; listOf (maybeRaw str)) null ''
|
disable = lib.nixvim.defaultNullOpts.mkStrLuaFnOr (with lib.types; listOf (maybeRaw str)) null ''
|
||||||
Can either be a list of the names of parsers you wish to disable or
|
Can either be a list of the names of parsers you wish to disable or
|
||||||
a lua function that returns a boolean indicating the parser should be disabled.
|
a lua function that returns a boolean indicating the parser should be disabled.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
custom_captures = helpers.defaultNullOpts.mkAttrsOf types.str { } ''
|
custom_captures = lib.nixvim.defaultNullOpts.mkAttrsOf types.str { } ''
|
||||||
Custom capture group highlighting.
|
Custom capture group highlighting.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
incremental_selection = {
|
incremental_selection = {
|
||||||
enable = helpers.defaultNullOpts.mkBool false ''
|
enable = lib.nixvim.defaultNullOpts.mkBool false ''
|
||||||
Incremental selection based on the named nodes from the grammar.
|
Incremental selection based on the named nodes from the grammar.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
|
@ -248,7 +247,7 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
let
|
let
|
||||||
mkKeymap =
|
mkKeymap =
|
||||||
default:
|
default:
|
||||||
helpers.defaultNullOpts.mkNullableWithRaw (
|
lib.nixvim.defaultNullOpts.mkNullableWithRaw (
|
||||||
with types; either str bool
|
with types; either str bool
|
||||||
) default "Key shortcut or false to unset.";
|
) default "Key shortcut or false to unset.";
|
||||||
in
|
in
|
||||||
|
|
@ -261,12 +260,12 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
};
|
};
|
||||||
|
|
||||||
indent = {
|
indent = {
|
||||||
enable = helpers.defaultNullOpts.mkBool false ''
|
enable = lib.nixvim.defaultNullOpts.mkBool false ''
|
||||||
Whether to enable treesitter indentation.
|
Whether to enable treesitter indentation.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
ensure_installed = helpers.defaultNullOpts.mkNullable' {
|
ensure_installed = lib.nixvim.defaultNullOpts.mkNullable' {
|
||||||
type =
|
type =
|
||||||
with lib.types;
|
with lib.types;
|
||||||
oneOf [
|
oneOf [
|
||||||
|
|
@ -280,11 +279,11 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
ignore_install = helpers.defaultNullOpts.mkListOf types.str [ ] ''
|
ignore_install = lib.nixvim.defaultNullOpts.mkListOf types.str [ ] ''
|
||||||
List of parsers to ignore installing. Used when `ensure_installed` is set to `"all"`.
|
List of parsers to ignore installing. Used when `ensure_installed` is set to `"all"`.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
parser_install_dir = helpers.mkNullOrOption' {
|
parser_install_dir = lib.nixvim.mkNullOrOption' {
|
||||||
type = with lib.types; maybeRaw str;
|
type = with lib.types; maybeRaw str;
|
||||||
# Backport the default from nvim-treesitter 1.0
|
# Backport the default from nvim-treesitter 1.0
|
||||||
# The current default doesn't work on nix, as it is readonly
|
# The current default doesn't work on nix, as it is readonly
|
||||||
|
|
@ -298,7 +297,7 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
sync_install = helpers.defaultNullOpts.mkBool false ''
|
sync_install = lib.nixvim.defaultNullOpts.mkBool false ''
|
||||||
Install parsers synchronously (only applied to `ensure_installed`).
|
Install parsers synchronously (only applied to `ensure_installed`).
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
helpers,
|
|
||||||
config,
|
config,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
|
@ -23,15 +22,15 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
settingsOptions =
|
settingsOptions =
|
||||||
let
|
let
|
||||||
opts = {
|
opts = {
|
||||||
enable_close = helpers.defaultNullOpts.mkBool true ''
|
enable_close = lib.nixvim.defaultNullOpts.mkBool true ''
|
||||||
Whether or not to auto close tags.
|
Whether or not to auto close tags.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
enable_rename = helpers.defaultNullOpts.mkBool true ''
|
enable_rename = lib.nixvim.defaultNullOpts.mkBool true ''
|
||||||
Whether or not to auto rename paired tags.
|
Whether or not to auto rename paired tags.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
enable_close_on_slash = helpers.defaultNullOpts.mkBool true ''
|
enable_close_on_slash = lib.nixvim.defaultNullOpts.mkBool true ''
|
||||||
Whether or not to auto close tags when a `/` is inserted.
|
Whether or not to auto close tags when a `/` is inserted.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
@ -39,7 +38,7 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
{
|
{
|
||||||
inherit opts;
|
inherit opts;
|
||||||
|
|
||||||
aliases = helpers.defaultNullOpts.mkAttrsOf types.str {
|
aliases = lib.nixvim.defaultNullOpts.mkAttrsOf types.str {
|
||||||
"astro" = "html";
|
"astro" = "html";
|
||||||
"eruby" = "html";
|
"eruby" = "html";
|
||||||
"vue" = "html";
|
"vue" = "html";
|
||||||
|
|
@ -59,7 +58,7 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
"rust" = "rust";
|
"rust" = "rust";
|
||||||
} "Filetype aliases.";
|
} "Filetype aliases.";
|
||||||
|
|
||||||
per_filetype = helpers.defaultNullOpts.mkAttrsOf (types.submodule {
|
per_filetype = lib.nixvim.defaultNullOpts.mkAttrsOf (types.submodule {
|
||||||
freeformType = with types; attrsOf anything;
|
freeformType = with types; attrsOf anything;
|
||||||
options = opts;
|
options = opts;
|
||||||
}) { } "Per filetype config overrides.";
|
}) { } "Per filetype config overrides.";
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
helpers,
|
|
||||||
config,
|
config,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
|
@ -14,12 +13,12 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
|
|
||||||
settingsOptions = {
|
settingsOptions = {
|
||||||
dimming = {
|
dimming = {
|
||||||
alpha = helpers.defaultNullOpts.mkProportion 0.25 ''
|
alpha = lib.nixvim.defaultNullOpts.mkProportion 0.25 ''
|
||||||
Amount of dimming.
|
Amount of dimming.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
color =
|
color =
|
||||||
helpers.defaultNullOpts.mkListOf types.str
|
lib.nixvim.defaultNullOpts.mkListOf types.str
|
||||||
[
|
[
|
||||||
"Normal"
|
"Normal"
|
||||||
"#ffffff"
|
"#ffffff"
|
||||||
|
|
@ -28,33 +27,33 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
Highlight groups / colors to use.
|
Highlight groups / colors to use.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
term_bg = helpers.defaultNullOpts.mkStr "#000000" ''
|
term_bg = lib.nixvim.defaultNullOpts.mkStr "#000000" ''
|
||||||
If `guibg=NONE`, this will be used to calculate text color.
|
If `guibg=NONE`, this will be used to calculate text color.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
inactive = helpers.defaultNullOpts.mkBool false ''
|
inactive = lib.nixvim.defaultNullOpts.mkBool false ''
|
||||||
When true, other windows will be fully dimmed (unless they contain the same buffer).
|
When true, other windows will be fully dimmed (unless they contain the same buffer).
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
context = helpers.defaultNullOpts.mkUnsignedInt 10 ''
|
context = lib.nixvim.defaultNullOpts.mkUnsignedInt 10 ''
|
||||||
Amount of lines we will try to show around the current line.
|
Amount of lines we will try to show around the current line.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
treesitter = helpers.defaultNullOpts.mkBool true ''
|
treesitter = lib.nixvim.defaultNullOpts.mkBool true ''
|
||||||
Use `treesitter` when available for the filetype.
|
Use `treesitter` when available for the filetype.
|
||||||
`treesitter` is used to automatically expand the visible text, but you can further control
|
`treesitter` is used to automatically expand the visible text, but you can further control
|
||||||
the types of nodes that should always be fully expanded.
|
the types of nodes that should always be fully expanded.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
expand = helpers.defaultNullOpts.mkListOf types.str [
|
expand = lib.nixvim.defaultNullOpts.mkListOf types.str [
|
||||||
"function"
|
"function"
|
||||||
"method"
|
"method"
|
||||||
"table"
|
"table"
|
||||||
"if_statement"
|
"if_statement"
|
||||||
] "For treesitter, we will always try to expand to the top-most ancestor with these types.";
|
] "For treesitter, we will always try to expand to the top-most ancestor with these types.";
|
||||||
|
|
||||||
exclude = helpers.defaultNullOpts.mkListOf types.str [ ] ''
|
exclude = lib.nixvim.defaultNullOpts.mkListOf types.str [ ] ''
|
||||||
Exclude these filetypes.
|
Exclude these filetypes.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
helpers,
|
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib;
|
with lib;
|
||||||
|
|
@ -29,14 +28,14 @@ lib.nixvim.plugins.mkVimPlugin {
|
||||||
default = false;
|
default = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
watch = helpers.mkNullOrOption types.str "Keymap to preview the document and recompile on change.";
|
watch = lib.nixvim.mkNullOrOption types.str "Keymap to preview the document and recompile on change.";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
extraConfig = cfg: {
|
extraConfig = cfg: {
|
||||||
keymaps =
|
keymaps =
|
||||||
with cfg.keymaps;
|
with cfg.keymaps;
|
||||||
helpers.keymaps.mkKeymaps
|
lib.nixvim.keymaps.mkKeymaps
|
||||||
{
|
{
|
||||||
mode = "n";
|
mode = "n";
|
||||||
options.silent = silent;
|
options.silent = silent;
|
||||||
|
|
@ -51,21 +50,21 @@ lib.nixvim.plugins.mkVimPlugin {
|
||||||
};
|
};
|
||||||
|
|
||||||
settingsOptions = {
|
settingsOptions = {
|
||||||
cmd = helpers.defaultNullOpts.mkStr "typst" ''
|
cmd = lib.nixvim.defaultNullOpts.mkStr "typst" ''
|
||||||
Specifies the location of the Typst executable.
|
Specifies the location of the Typst executable.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
pdf_viewer = helpers.mkNullOrOption types.str ''
|
pdf_viewer = lib.nixvim.mkNullOrOption types.str ''
|
||||||
Specifies pdf viewer that `typst watch --open` will use.
|
Specifies pdf viewer that `typst watch --open` will use.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
conceal_math = helpers.defaultNullOpts.mkFlagInt 0 ''
|
conceal_math = lib.nixvim.defaultNullOpts.mkFlagInt 0 ''
|
||||||
Enable concealment for math symbols in math mode (i.e. replaces symbols with their actual
|
Enable concealment for math symbols in math mode (i.e. replaces symbols with their actual
|
||||||
unicode character).
|
unicode character).
|
||||||
Warning: this can affect performance
|
Warning: this can affect performance
|
||||||
'';
|
'';
|
||||||
|
|
||||||
auto_close_toc = helpers.defaultNullOpts.mkFlagInt 0 ''
|
auto_close_toc = lib.nixvim.defaultNullOpts.mkFlagInt 0 ''
|
||||||
Specifies whether TOC will be automatically closed after using it.
|
Specifies whether TOC will be automatically closed after using it.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
helpers,
|
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib;
|
with lib;
|
||||||
|
|
@ -13,7 +12,7 @@ mkVimPlugin {
|
||||||
maintainers = [ maintainers.GaetanLepage ];
|
maintainers = [ maintainers.GaetanLepage ];
|
||||||
|
|
||||||
settingsOptions = {
|
settingsOptions = {
|
||||||
target = helpers.defaultNullOpts.mkEnum [
|
target = lib.nixvim.defaultNullOpts.mkEnum [
|
||||||
"dtach"
|
"dtach"
|
||||||
"kitty"
|
"kitty"
|
||||||
"neovim"
|
"neovim"
|
||||||
|
|
@ -26,25 +25,25 @@ mkVimPlugin {
|
||||||
"zellij"
|
"zellij"
|
||||||
] "screen" "Which backend vim-slime should use.";
|
] "screen" "Which backend vim-slime should use.";
|
||||||
|
|
||||||
vimterminal_cmd = helpers.mkNullOrStr ''
|
vimterminal_cmd = lib.nixvim.mkNullOrStr ''
|
||||||
The vim terminal command to execute.
|
The vim terminal command to execute.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
no_mappings = helpers.defaultNullOpts.mkFlagInt 0 ''
|
no_mappings = lib.nixvim.defaultNullOpts.mkFlagInt 0 ''
|
||||||
Whether to disable the default mappings.
|
Whether to disable the default mappings.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
paste_file = helpers.defaultNullOpts.mkStr "$HOME/.slime_paste" ''
|
paste_file = lib.nixvim.defaultNullOpts.mkStr "$HOME/.slime_paste" ''
|
||||||
Required to transfer data from vim to GNU screen or tmux.
|
Required to transfer data from vim to GNU screen or tmux.
|
||||||
Setting this explicitly can work around some occasional portability issues.
|
Setting this explicitly can work around some occasional portability issues.
|
||||||
whimrepl does not require or support this setting.
|
whimrepl does not require or support this setting.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
preserve_curpos = helpers.defaultNullOpts.mkFlagInt 1 ''
|
preserve_curpos = lib.nixvim.defaultNullOpts.mkFlagInt 1 ''
|
||||||
Whether to preserve cursor position when sending a line or paragraph.
|
Whether to preserve cursor position when sending a line or paragraph.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
default_config = helpers.mkNullOrOption (with lib.types; attrsOf (either str rawLua)) ''
|
default_config = lib.nixvim.mkNullOrOption (with lib.types; attrsOf (either str rawLua)) ''
|
||||||
Pre-filled prompt answer.
|
Pre-filled prompt answer.
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
|
|
@ -64,11 +63,11 @@ mkVimPlugin {
|
||||||
```
|
```
|
||||||
'';
|
'';
|
||||||
|
|
||||||
dont_ask_default = helpers.defaultNullOpts.mkFlagInt 0 ''
|
dont_ask_default = lib.nixvim.defaultNullOpts.mkFlagInt 0 ''
|
||||||
Whether to bypass the prompt and use the specified default configuration options.
|
Whether to bypass the prompt and use the specified default configuration options.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
bracketed_paste = helpers.defaultNullOpts.mkFlagInt 0 ''
|
bracketed_paste = lib.nixvim.defaultNullOpts.mkFlagInt 0 ''
|
||||||
Sometimes REPL are too smart for their own good, e.g. autocompleting a bracket that should
|
Sometimes REPL are too smart for their own good, e.g. autocompleting a bracket that should
|
||||||
not be autocompleted when pasting code from a file.
|
not be autocompleted when pasting code from a file.
|
||||||
In this case it can be useful to rely on bracketed-paste
|
In this case it can be useful to rely on bracketed-paste
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
helpers,
|
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
|
@ -53,7 +52,7 @@ lib.nixvim.plugins.mkVimPlugin {
|
||||||
};
|
};
|
||||||
|
|
||||||
filetypes =
|
filetypes =
|
||||||
helpers.defaultNullOpts.mkAttrsOf types.bool
|
lib.nixvim.defaultNullOpts.mkAttrsOf types.bool
|
||||||
{
|
{
|
||||||
help = false;
|
help = false;
|
||||||
gitcommit = false;
|
gitcommit = false;
|
||||||
|
|
@ -65,30 +64,30 @@ lib.nixvim.plugins.mkVimPlugin {
|
||||||
This can be used to opt out of completions for certain filetypes.
|
This can be used to opt out of completions for certain filetypes.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
manual = helpers.defaultNullOpts.mkBool false ''
|
manual = lib.nixvim.defaultNullOpts.mkBool false ''
|
||||||
If true, codeium completions will never automatically trigger.
|
If true, codeium completions will never automatically trigger.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
no_map_tab = helpers.defaultNullOpts.mkBool false ''
|
no_map_tab = lib.nixvim.defaultNullOpts.mkBool false ''
|
||||||
Whether to disable the `<Tab>` keybinding.
|
Whether to disable the `<Tab>` keybinding.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
idle_delay = helpers.defaultNullOpts.mkPositiveInt 75 ''
|
idle_delay = lib.nixvim.defaultNullOpts.mkPositiveInt 75 ''
|
||||||
Delay in milliseconds before autocompletions are shown (limited by language server to a
|
Delay in milliseconds before autocompletions are shown (limited by language server to a
|
||||||
minimum of 75).
|
minimum of 75).
|
||||||
'';
|
'';
|
||||||
|
|
||||||
render = helpers.defaultNullOpts.mkBool true ''
|
render = lib.nixvim.defaultNullOpts.mkBool true ''
|
||||||
A global boolean flag that controls whether codeium renders are enabled or disabled.
|
A global boolean flag that controls whether codeium renders are enabled or disabled.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
tab_fallback = helpers.mkNullOrOption types.str ''
|
tab_fallback = lib.nixvim.mkNullOrOption types.str ''
|
||||||
The fallback key when there is no suggestion display in `codeium#Accept()`.
|
The fallback key when there is no suggestion display in `codeium#Accept()`.
|
||||||
|
|
||||||
Default: "\<C-N>" when a popup menu is visible, else "\t".
|
Default: "\<C-N>" when a popup menu is visible, else "\t".
|
||||||
'';
|
'';
|
||||||
|
|
||||||
disable_bindings = helpers.defaultNullOpts.mkBool false ''
|
disable_bindings = lib.nixvim.defaultNullOpts.mkBool false ''
|
||||||
Whether to disable default keybindings.
|
Whether to disable default keybindings.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
@ -96,7 +95,7 @@ lib.nixvim.plugins.mkVimPlugin {
|
||||||
extraOptions = {
|
extraOptions = {
|
||||||
keymaps = mapAttrs (
|
keymaps = mapAttrs (
|
||||||
optionName: v:
|
optionName: v:
|
||||||
helpers.defaultNullOpts.mkStr v.default ''
|
lib.nixvim.defaultNullOpts.mkStr v.default ''
|
||||||
${v.description}
|
${v.description}
|
||||||
Command: `${v.command}`
|
Command: `${v.command}`
|
||||||
''
|
''
|
||||||
|
|
@ -116,7 +115,7 @@ lib.nixvim.plugins.mkVimPlugin {
|
||||||
let
|
let
|
||||||
inherit (keymapsDefinitions.${optionName}) command;
|
inherit (keymapsDefinitions.${optionName}) command;
|
||||||
in
|
in
|
||||||
helpers.mkRaw "function() ${command} end";
|
lib.nixvim.mkRaw "function() ${command} end";
|
||||||
};
|
};
|
||||||
|
|
||||||
keymapsList = flatten (mapAttrsToList processKeymap cfg.keymaps);
|
keymapsList = flatten (mapAttrsToList processKeymap cfg.keymaps);
|
||||||
|
|
@ -129,6 +128,6 @@ lib.nixvim.plugins.mkVimPlugin {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
helpers.keymaps.mkKeymaps defaults keymapsList;
|
lib.nixvim.keymaps.mkKeymaps defaults keymapsList;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
config,
|
config,
|
||||||
helpers,
|
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib;
|
with lib;
|
||||||
|
|
@ -23,12 +22,12 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
'';
|
'';
|
||||||
settingsOptions = {
|
settingsOptions = {
|
||||||
ring = {
|
ring = {
|
||||||
history_length = helpers.defaultNullOpts.mkUnsignedInt 100 ''
|
history_length = lib.nixvim.defaultNullOpts.mkUnsignedInt 100 ''
|
||||||
Define the number of yanked items that will be saved and used for ring.
|
Define the number of yanked items that will be saved and used for ring.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
storage =
|
storage =
|
||||||
helpers.defaultNullOpts.mkEnumFirstDefault
|
lib.nixvim.defaultNullOpts.mkEnumFirstDefault
|
||||||
[
|
[
|
||||||
"shada"
|
"shada"
|
||||||
"sqlite"
|
"sqlite"
|
||||||
|
|
@ -52,11 +51,11 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
You can change the storage path using `ring.storagePath` option.
|
You can change the storage path using `ring.storagePath` option.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
storage_path = helpers.defaultNullOpts.mkStr {
|
storage_path = lib.nixvim.defaultNullOpts.mkStr {
|
||||||
__raw = "vim.fn.stdpath('data') .. '/databases/yanky.db'";
|
__raw = "vim.fn.stdpath('data') .. '/databases/yanky.db'";
|
||||||
} "Only for sqlite storage.";
|
} "Only for sqlite storage.";
|
||||||
|
|
||||||
sync_with_numbered_registers = helpers.defaultNullOpts.mkBool true ''
|
sync_with_numbered_registers = lib.nixvim.defaultNullOpts.mkBool true ''
|
||||||
History can also be synchronized with numbered registers.
|
History can also be synchronized with numbered registers.
|
||||||
Every time the yank history changes the numbered registers 1 - 9 will be updated to sync
|
Every time the yank history changes the numbered registers 1 - 9 will be updated to sync
|
||||||
with the first 9 entries in the yank history.
|
with the first 9 entries in the yank history.
|
||||||
|
|
@ -64,7 +63,7 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
'';
|
'';
|
||||||
|
|
||||||
cancel_event =
|
cancel_event =
|
||||||
helpers.defaultNullOpts.mkEnumFirstDefault
|
lib.nixvim.defaultNullOpts.mkEnumFirstDefault
|
||||||
[
|
[
|
||||||
"update"
|
"update"
|
||||||
"move"
|
"move"
|
||||||
|
|
@ -75,12 +74,12 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
cursor or content changed.
|
cursor or content changed.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
ignore_registers = helpers.defaultNullOpts.mkListOf types.str [ "_" ] ''
|
ignore_registers = lib.nixvim.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.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
update_register_on_cycle = helpers.defaultNullOpts.mkBool false ''
|
update_register_on_cycle = lib.nixvim.defaultNullOpts.mkBool false ''
|
||||||
If true, when you cycle through the ring, the contents of the register used to update will
|
If true, when you cycle through the ring, the contents of the register used to update will
|
||||||
be updated with the last content cycled.
|
be updated with the last content cycled.
|
||||||
'';
|
'';
|
||||||
|
|
@ -88,7 +87,7 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
|
|
||||||
picker = {
|
picker = {
|
||||||
select = {
|
select = {
|
||||||
action = helpers.defaultNullOpts.mkLuaFn' {
|
action = lib.nixvim.defaultNullOpts.mkLuaFn' {
|
||||||
pluginDefault = null;
|
pluginDefault = null;
|
||||||
description = ''
|
description = ''
|
||||||
This define the action that should be done when selecting an item in the
|
This define the action that should be done when selecting an item in the
|
||||||
|
|
@ -101,25 +100,25 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
};
|
};
|
||||||
|
|
||||||
telescope = {
|
telescope = {
|
||||||
use_default_mappings = helpers.defaultNullOpts.mkBool true ''
|
use_default_mappings = lib.nixvim.defaultNullOpts.mkBool true ''
|
||||||
This define or overrides the mappings available in Telescope.
|
This define or overrides the mappings available in Telescope.
|
||||||
|
|
||||||
If you set this option to `true`, mappings will be merged with default mappings.
|
If you set this option to `true`, mappings will be merged with default mappings.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
mappings = helpers.defaultNullOpts.mkAttrsOf' {
|
mappings = lib.nixvim.defaultNullOpts.mkAttrsOf' {
|
||||||
type = with lib.types; either strLuaFn (attrsOf strLuaFn);
|
type = with lib.types; either strLuaFn (attrsOf strLuaFn);
|
||||||
apply =
|
apply =
|
||||||
mappings:
|
mappings:
|
||||||
helpers.ifNonNull' mappings (
|
lib.nixvim.ifNonNull' mappings (
|
||||||
mapAttrs (
|
mapAttrs (
|
||||||
_: v:
|
_: v:
|
||||||
if isString v then
|
if isString v then
|
||||||
# `mappings.default` is a lua function
|
# `mappings.default` is a lua function
|
||||||
helpers.mkRaw v
|
lib.nixvim.mkRaw v
|
||||||
else
|
else
|
||||||
# `mappings.<mode>` is an attrs of lua function
|
# `mappings.<mode>` is an attrs of lua function
|
||||||
mapAttrs (_: helpers.mkRaw) v
|
mapAttrs (_: lib.nixvim.mkRaw) v
|
||||||
) mappings
|
) mappings
|
||||||
);
|
);
|
||||||
pluginDefault = null;
|
pluginDefault = null;
|
||||||
|
|
@ -149,7 +148,7 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
};
|
};
|
||||||
|
|
||||||
system_clipboard = {
|
system_clipboard = {
|
||||||
sync_with_ring = helpers.defaultNullOpts.mkBool true ''
|
sync_with_ring = lib.nixvim.defaultNullOpts.mkBool true ''
|
||||||
Yanky can automatically adds to ring history yanks that occurs outside of Neovim.
|
Yanky can automatically adds to ring history yanks that occurs outside of Neovim.
|
||||||
This works regardless to your `&clipboard` setting.
|
This works regardless to your `&clipboard` setting.
|
||||||
|
|
||||||
|
|
@ -166,35 +165,35 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
Also note that the syncing happens when neovim gains focus.
|
Also note that the syncing happens when neovim gains focus.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
clipboard_register = helpers.defaultNullOpts.mkStr null ''
|
clipboard_register = lib.nixvim.defaultNullOpts.mkStr null ''
|
||||||
Choose the register that is synced with ring (from above).
|
Choose the register that is synced with ring (from above).
|
||||||
If `&clipboard` is empty then `*` is used.
|
If `&clipboard` is empty then `*` is used.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
highlight = {
|
highlight = {
|
||||||
on_put = helpers.defaultNullOpts.mkBool true ''
|
on_put = lib.nixvim.defaultNullOpts.mkBool true ''
|
||||||
Define if highlight put text feature is enabled.
|
Define if highlight put text feature is enabled.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
on_yank = helpers.defaultNullOpts.mkBool true ''
|
on_yank = lib.nixvim.defaultNullOpts.mkBool true ''
|
||||||
Define if highlight yanked text feature is enabled.
|
Define if highlight yanked text feature is enabled.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
timer = helpers.defaultNullOpts.mkUnsignedInt 500 ''
|
timer = lib.nixvim.defaultNullOpts.mkUnsignedInt 500 ''
|
||||||
Define the duration of highlight.
|
Define the duration of highlight.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
preserve_cursor_position = {
|
preserve_cursor_position = {
|
||||||
enabled = helpers.defaultNullOpts.mkBool true ''
|
enabled = lib.nixvim.defaultNullOpts.mkBool true ''
|
||||||
Whether cursor position should be preserved on yank.
|
Whether cursor position should be preserved on yank.
|
||||||
This works only if mappings has been defined.
|
This works only if mappings has been defined.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
textobj = {
|
textobj = {
|
||||||
enabled = helpers.defaultNullOpts.mkBool true ''
|
enabled = lib.nixvim.defaultNullOpts.mkBool true ''
|
||||||
Yanky comes with a text object corresponding to last put text.
|
Yanky comes with a text object corresponding to last put text.
|
||||||
To use it, you have to enable it and set a keymap.
|
To use it, you have to enable it and set a keymap.
|
||||||
'';
|
'';
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
helpers,
|
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
lib.nixvim.plugins.mkNeovimPlugin {
|
lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
|
|
@ -11,19 +10,19 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
maintainers = [ lib.maintainers.hmajid2301 ];
|
maintainers = [ lib.maintainers.hmajid2301 ];
|
||||||
|
|
||||||
settingsOptions = {
|
settingsOptions = {
|
||||||
path = helpers.defaultNullOpts.mkStr "zellij" ''
|
path = lib.nixvim.defaultNullOpts.mkStr "zellij" ''
|
||||||
Path to the zellij binary.
|
Path to the zellij binary.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
replaceVimWindowNavigationKeybinds = helpers.defaultNullOpts.mkBool false ''
|
replaceVimWindowNavigationKeybinds = lib.nixvim.defaultNullOpts.mkBool false ''
|
||||||
Will set keybinds like `<C-w>h` to left.
|
Will set keybinds like `<C-w>h` to left.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
vimTmuxNavigatorKeybinds = helpers.defaultNullOpts.mkBool false ''
|
vimTmuxNavigatorKeybinds = lib.nixvim.defaultNullOpts.mkBool false ''
|
||||||
Will set keybinds like `<C-h>` to left.
|
Will set keybinds like `<C-h>` to left.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
debug = helpers.defaultNullOpts.mkBool false ''
|
debug = lib.nixvim.defaultNullOpts.mkBool false ''
|
||||||
Will log things to `/tmp/zellij.nvim`.
|
Will log things to `/tmp/zellij.nvim`.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
helpers,
|
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib;
|
with lib;
|
||||||
|
|
@ -14,13 +13,13 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
# Optionally, explicitly declare some options. You don't have to.
|
# Optionally, explicitly declare some options. You don't have to.
|
||||||
settingsOptions = {
|
settingsOptions = {
|
||||||
window = {
|
window = {
|
||||||
backdrop = helpers.defaultNullOpts.mkProportion 0.95 ''
|
backdrop = lib.nixvim.defaultNullOpts.mkProportion 0.95 ''
|
||||||
Shade the backdrop of the Zen window.
|
Shade the backdrop of the Zen window.
|
||||||
Set to 1 to keep the same as Normal.
|
Set to 1 to keep the same as Normal.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
width =
|
width =
|
||||||
helpers.defaultNullOpts.mkNullable
|
lib.nixvim.defaultNullOpts.mkNullable
|
||||||
(
|
(
|
||||||
with lib.types;
|
with lib.types;
|
||||||
oneOf [
|
oneOf [
|
||||||
|
|
@ -40,7 +39,7 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
'';
|
'';
|
||||||
|
|
||||||
height =
|
height =
|
||||||
helpers.defaultNullOpts.mkNullable
|
lib.nixvim.defaultNullOpts.mkNullable
|
||||||
(
|
(
|
||||||
with lib.types;
|
with lib.types;
|
||||||
oneOf [
|
oneOf [
|
||||||
|
|
@ -59,7 +58,7 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
- a function that returns the width or the height
|
- a function that returns the width or the height
|
||||||
'';
|
'';
|
||||||
|
|
||||||
options = helpers.defaultNullOpts.mkAttrsOf types.anything { } ''
|
options = lib.nixvim.defaultNullOpts.mkAttrsOf types.anything { } ''
|
||||||
By default, no options are changed for the Zen window.
|
By default, no options are changed for the Zen window.
|
||||||
You can set any `vim.wo` option here.
|
You can set any `vim.wo` option here.
|
||||||
|
|
||||||
|
|
@ -79,7 +78,7 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
};
|
};
|
||||||
plugins = {
|
plugins = {
|
||||||
options =
|
options =
|
||||||
helpers.defaultNullOpts.mkAttrsOf types.anything
|
lib.nixvim.defaultNullOpts.mkAttrsOf types.anything
|
||||||
{
|
{
|
||||||
enabled = true;
|
enabled = true;
|
||||||
ruler = false;
|
ruler = false;
|
||||||
|
|
@ -91,11 +90,11 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
on_open = helpers.defaultNullOpts.mkLuaFn "function(win) end" ''
|
on_open = lib.nixvim.defaultNullOpts.mkLuaFn "function(win) end" ''
|
||||||
Callback where you can add custom code when the Zen window opens.
|
Callback where you can add custom code when the Zen window opens.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
on_close = helpers.defaultNullOpts.mkLuaFn "function(win) end" ''
|
on_close = lib.nixvim.defaultNullOpts.mkLuaFn "function(win) end" ''
|
||||||
Callback where you can add custom code when the Zen window closes.
|
Callback where you can add custom code when the Zen window closes.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
helpers,
|
|
||||||
config,
|
config,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
|
@ -24,7 +23,7 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
|
|
||||||
settingsOptions = {
|
settingsOptions = {
|
||||||
picker =
|
picker =
|
||||||
helpers.defaultNullOpts.mkEnumFirstDefault
|
lib.nixvim.defaultNullOpts.mkEnumFirstDefault
|
||||||
[
|
[
|
||||||
"select"
|
"select"
|
||||||
"fzf"
|
"fzf"
|
||||||
|
|
@ -39,20 +38,20 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
|
|
||||||
lsp = {
|
lsp = {
|
||||||
config =
|
config =
|
||||||
helpers.defaultNullOpts.mkNullable
|
lib.nixvim.defaultNullOpts.mkNullable
|
||||||
(types.submodule {
|
(types.submodule {
|
||||||
freeformType = with types; attrsOf anything;
|
freeformType = with types; attrsOf anything;
|
||||||
options = {
|
options = {
|
||||||
cmd = helpers.defaultNullOpts.mkListOf types.str [
|
cmd = lib.nixvim.defaultNullOpts.mkListOf types.str [
|
||||||
"zk"
|
"zk"
|
||||||
"lsp"
|
"lsp"
|
||||||
] "Command to start the language server.";
|
] "Command to start the language server.";
|
||||||
|
|
||||||
name = helpers.defaultNullOpts.mkStr "zk" ''
|
name = lib.nixvim.defaultNullOpts.mkStr "zk" ''
|
||||||
The name for this server.
|
The name for this server.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
on_attach = helpers.mkNullOrLuaFn ''
|
on_attach = lib.nixvim.mkNullOrLuaFn ''
|
||||||
Command to run when the client is attached.
|
Command to run when the client is attached.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
@ -69,11 +68,11 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
'';
|
'';
|
||||||
|
|
||||||
auto_attach = {
|
auto_attach = {
|
||||||
enabled = helpers.defaultNullOpts.mkBool true ''
|
enabled = lib.nixvim.defaultNullOpts.mkBool true ''
|
||||||
Automatically attach buffers in a zk notebook.
|
Automatically attach buffers in a zk notebook.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
filetypes = helpers.defaultNullOpts.mkListOf types.str [ "markdown" ] ''
|
filetypes = lib.nixvim.defaultNullOpts.mkListOf types.str [ "markdown" ] ''
|
||||||
Filetypes for which zk should automatically attach.
|
Filetypes for which zk should automatically attach.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
helpers,
|
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
|
@ -11,7 +10,7 @@ let
|
||||||
|
|
||||||
lspExtraArgs = {
|
lspExtraArgs = {
|
||||||
dartls = {
|
dartls = {
|
||||||
settingsOptions = import ./dartls-settings.nix { inherit lib helpers; };
|
settingsOptions = import ./dartls-settings.nix { inherit lib; };
|
||||||
settings = cfg: { dart = cfg; };
|
settings = cfg: { dart = cfg; };
|
||||||
};
|
};
|
||||||
gopls = {
|
gopls = {
|
||||||
|
|
@ -39,23 +38,23 @@ let
|
||||||
settings = cfg: { json = cfg; };
|
settings = cfg: { json = cfg; };
|
||||||
};
|
};
|
||||||
jsonnet_ls = {
|
jsonnet_ls = {
|
||||||
settingsOptions = import ./jsonnet-ls-settings.nix { inherit lib helpers; };
|
settingsOptions = import ./jsonnet-ls-settings.nix { inherit lib; };
|
||||||
};
|
};
|
||||||
ltex = {
|
ltex = {
|
||||||
settingsOptions = import ./ltex-settings.nix { inherit lib helpers; };
|
settingsOptions = import ./ltex-settings.nix { inherit lib; };
|
||||||
settings = cfg: { ltex = cfg; };
|
settings = cfg: { ltex = cfg; };
|
||||||
};
|
};
|
||||||
lua_ls = {
|
lua_ls = {
|
||||||
settingsOptions = import ./lua-ls-settings.nix { inherit lib helpers; };
|
settingsOptions = import ./lua-ls-settings.nix { inherit lib; };
|
||||||
settings = cfg: { Lua = cfg; };
|
settings = cfg: { Lua = cfg; };
|
||||||
};
|
};
|
||||||
nil_ls = {
|
nil_ls = {
|
||||||
settingsOptions = import ./nil-ls-settings.nix { inherit lib helpers; };
|
settingsOptions = import ./nil-ls-settings.nix { inherit lib; };
|
||||||
settings = cfg: { nil = cfg; };
|
settings = cfg: { nil = cfg; };
|
||||||
};
|
};
|
||||||
nixd = {
|
nixd = {
|
||||||
settings = cfg: { nixd = cfg; };
|
settings = cfg: { nixd = cfg; };
|
||||||
settingsOptions = import ./nixd-settings.nix { inherit lib helpers; };
|
settingsOptions = import ./nixd-settings.nix { inherit lib; };
|
||||||
extraConfig = cfg: {
|
extraConfig = cfg: {
|
||||||
extraPackages = optional (cfg.settings.formatting.command == [ "nixpkgs-fmt" ]) pkgs.nixpkgs-fmt;
|
extraPackages = optional (cfg.settings.formatting.command == [ "nixpkgs-fmt" ]) pkgs.nixpkgs-fmt;
|
||||||
};
|
};
|
||||||
|
|
@ -63,12 +62,12 @@ let
|
||||||
omnisharp = {
|
omnisharp = {
|
||||||
settings = cfg: { omnisharp = cfg; };
|
settings = cfg: { omnisharp = cfg; };
|
||||||
settingsOptions = {
|
settingsOptions = {
|
||||||
enableEditorConfigSupport = helpers.defaultNullOpts.mkBool true ''
|
enableEditorConfigSupport = lib.nixvim.defaultNullOpts.mkBool true ''
|
||||||
Enables support for reading code style, naming convention and analyzer settings from
|
Enables support for reading code style, naming convention and analyzer settings from
|
||||||
`.editorconfig`.
|
`.editorconfig`.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
enableMsBuildLoadProjectsOnDemand = helpers.defaultNullOpts.mkBool false ''
|
enableMsBuildLoadProjectsOnDemand = lib.nixvim.defaultNullOpts.mkBool false ''
|
||||||
If true, MSBuild project system will only load projects for files that were opened in the
|
If true, MSBuild project system will only load projects for files that were opened in the
|
||||||
editor.
|
editor.
|
||||||
This setting is useful for big C# codebases and allows for faster initialization of code
|
This setting is useful for big C# codebases and allows for faster initialization of code
|
||||||
|
|
@ -77,7 +76,7 @@ let
|
||||||
incomplete reference lists for symbols.
|
incomplete reference lists for symbols.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
enableRoslynAnalyzers = helpers.defaultNullOpts.mkBool false ''
|
enableRoslynAnalyzers = lib.nixvim.defaultNullOpts.mkBool false ''
|
||||||
If true, MSBuild project system will only load projects for files that were opened in the
|
If true, MSBuild project system will only load projects for files that were opened in the
|
||||||
editor.
|
editor.
|
||||||
This setting is useful for big C# codebases and allows for faster initialization of code
|
This setting is useful for big C# codebases and allows for faster initialization of code
|
||||||
|
|
@ -86,12 +85,12 @@ let
|
||||||
incomplete reference lists for symbols.
|
incomplete reference lists for symbols.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
organizeImportsOnFormat = helpers.defaultNullOpts.mkBool false ''
|
organizeImportsOnFormat = lib.nixvim.defaultNullOpts.mkBool false ''
|
||||||
Specifies whether 'using' directives should be grouped and sorted during document
|
Specifies whether 'using' directives should be grouped and sorted during document
|
||||||
formatting.
|
formatting.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
enableImportCompletion = helpers.defaultNullOpts.mkBool false ''
|
enableImportCompletion = lib.nixvim.defaultNullOpts.mkBool false ''
|
||||||
Enables support for showing unimported types and unimported extension methods in
|
Enables support for showing unimported types and unimported extension methods in
|
||||||
completion lists.
|
completion lists.
|
||||||
When committed, the appropriate using directive will be added at the top of the current
|
When committed, the appropriate using directive will be added at the top of the current
|
||||||
|
|
@ -100,12 +99,12 @@ let
|
||||||
for the first few completion sessions after opening a solution.
|
for the first few completion sessions after opening a solution.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
sdkIncludePrereleases = helpers.defaultNullOpts.mkBool true ''
|
sdkIncludePrereleases = lib.nixvim.defaultNullOpts.mkBool true ''
|
||||||
Specifies whether to include preview versions of the .NET SDK when determining which
|
Specifies whether to include preview versions of the .NET SDK when determining which
|
||||||
version to use for project loading.
|
version to use for project loading.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
analyzeOpenDocumentsOnly = helpers.defaultNullOpts.mkBool true ''
|
analyzeOpenDocumentsOnly = lib.nixvim.defaultNullOpts.mkBool true ''
|
||||||
Only run analyzers against open files when 'enableRoslynAnalyzers' is true.
|
Only run analyzers against open files when 'enableRoslynAnalyzers' is true.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{ helpers, ... }:
|
{ lib, ... }:
|
||||||
{
|
{
|
||||||
example = {
|
example = {
|
||||||
keymaps = [
|
keymaps = [
|
||||||
|
|
@ -19,7 +19,7 @@
|
||||||
|
|
||||||
mkKeymaps = {
|
mkKeymaps = {
|
||||||
keymaps =
|
keymaps =
|
||||||
helpers.keymaps.mkKeymaps
|
lib.nixvim.keymaps.mkKeymaps
|
||||||
{
|
{
|
||||||
mode = "x";
|
mode = "x";
|
||||||
options.silent = true;
|
options.silent = true;
|
||||||
|
|
@ -60,7 +60,7 @@
|
||||||
mkKeymapsOnEvents = {
|
mkKeymapsOnEvents = {
|
||||||
keymapsOnEvents = {
|
keymapsOnEvents = {
|
||||||
"InsertEnter" =
|
"InsertEnter" =
|
||||||
helpers.keymaps.mkKeymaps
|
lib.nixvim.keymaps.mkKeymaps
|
||||||
{
|
{
|
||||||
mode = "x";
|
mode = "x";
|
||||||
options.silent = true;
|
options.silent = true;
|
||||||
|
|
|
||||||
|
|
@ -79,7 +79,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
files-default-empty =
|
files-default-empty =
|
||||||
{ config, helpers, ... }:
|
{ config, lib, ... }:
|
||||||
{
|
{
|
||||||
files = {
|
files = {
|
||||||
# lua type
|
# lua type
|
||||||
|
|
@ -90,11 +90,11 @@
|
||||||
|
|
||||||
assertions = [
|
assertions = [
|
||||||
{
|
{
|
||||||
assertion = !helpers.hasContent config.files."test.lua".content;
|
assertion = !lib.nixvim.hasContent config.files."test.lua".content;
|
||||||
message = "Default content of test.lua file is expected to be empty.";
|
message = "Default content of test.lua file is expected to be empty.";
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
assertion = !helpers.hasContent config.files."test.vim".content;
|
assertion = !lib.nixvim.hasContent config.files."test.vim".content;
|
||||||
message = "Default content of test.vim file is expected to be empty.";
|
message = "Default content of test.vim file is expected to be empty.";
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{ helpers, ... }:
|
{ lib, ... }:
|
||||||
{
|
{
|
||||||
empty = {
|
empty = {
|
||||||
plugins.flash.enable = true;
|
plugins.flash.enable = true;
|
||||||
|
|
@ -21,7 +21,7 @@
|
||||||
"cmp_menu"
|
"cmp_menu"
|
||||||
"noice"
|
"noice"
|
||||||
"flash_prompt"
|
"flash_prompt"
|
||||||
(helpers.mkRaw ''
|
(lib.nixvim.mkRaw ''
|
||||||
function(win)
|
function(win)
|
||||||
-- exclude non-focusable windows
|
-- exclude non-focusable windows
|
||||||
return not vim.api.nvim_win_get_config(win).focusable
|
return not vim.api.nvim_win_get_config(win).focusable
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue