mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 00:25:42 +02:00
helpers/vim-plugin/mkVimPlugin: refactor
This commit is contained in:
parent
66c069c48d
commit
3c174e874c
20 changed files with 739 additions and 744 deletions
|
@ -3,11 +3,7 @@
|
|||
nixvimOptions,
|
||||
}:
|
||||
with lib; {
|
||||
mkVimPlugin = {
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
mkVimPlugin = config: {
|
||||
name,
|
||||
description ? null,
|
||||
package ? null,
|
||||
|
|
|
@ -1,42 +1,43 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
helpers,
|
||||
pkgs,
|
||||
...
|
||||
} @ args:
|
||||
with lib; (
|
||||
with (import ../helpers.nix {inherit lib;}).vim-plugin;
|
||||
mkVimPlugin args {
|
||||
name = "copilot-vim";
|
||||
description = "copilot.vim";
|
||||
package = pkgs.vimPlugins.copilot-vim;
|
||||
globalPrefix = "copilot_";
|
||||
}:
|
||||
with lib;
|
||||
with helpers.vim-plugin;
|
||||
helpers.vim-plugin.mkVimPlugin config {
|
||||
name = "copilot-vim";
|
||||
description = "copilot.vim";
|
||||
package = pkgs.vimPlugins.copilot-vim;
|
||||
globalPrefix = "copilot_";
|
||||
|
||||
options = {
|
||||
nodeCommand = mkDefaultOpt {
|
||||
global = "node_command";
|
||||
type = types.str;
|
||||
default = "${pkgs.nodejs-18_x}/bin/node";
|
||||
description = "Tell Copilot what `node` binary to use.";
|
||||
};
|
||||
options = {
|
||||
nodeCommand = mkDefaultOpt {
|
||||
global = "node_command";
|
||||
type = types.str;
|
||||
default = "${pkgs.nodejs-18_x}/bin/node";
|
||||
description = "Tell Copilot what `node` binary to use.";
|
||||
};
|
||||
|
||||
filetypes = mkDefaultOpt {
|
||||
type = with types; attrsOf bool;
|
||||
description = ''
|
||||
A dictionary mapping file types to their enabled status
|
||||
filetypes = mkDefaultOpt {
|
||||
type = with types; attrsOf bool;
|
||||
description = ''
|
||||
A dictionary mapping file types to their enabled status
|
||||
|
||||
Default: `{}`
|
||||
'';
|
||||
example = {
|
||||
"*" = false;
|
||||
python = true;
|
||||
};
|
||||
};
|
||||
|
||||
proxy = mkDefaultOpt {
|
||||
type = types.str;
|
||||
description = "Tell Copilot what proxy server to use.";
|
||||
example = "localhost:3128";
|
||||
Default: `{}`
|
||||
'';
|
||||
example = {
|
||||
"*" = false;
|
||||
python = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
)
|
||||
|
||||
proxy = mkDefaultOpt {
|
||||
type = types.str;
|
||||
description = "Tell Copilot what proxy server to use.";
|
||||
example = "localhost:3128";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@ in
|
|||
useDefaultPackage ? true,
|
||||
...
|
||||
}:
|
||||
mkVimPlugin {inherit lib config pkgs;} {
|
||||
mkVimPlugin config {
|
||||
inherit name;
|
||||
extraPlugins = extraPlugins ++ (lists.optional useDefaultPackage pkgs.vimPlugins.${name});
|
||||
};
|
||||
|
|
|
@ -1,18 +1,15 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
helpers,
|
||||
pkgs,
|
||||
...
|
||||
} @ attrs: let
|
||||
helpers = import ../helpers.nix {inherit lib;};
|
||||
in
|
||||
with helpers.vim-plugin;
|
||||
with lib;
|
||||
mkVimPlugin attrs {
|
||||
name = "fugitive";
|
||||
description = "vim-fugitive";
|
||||
package = pkgs.vimPlugins.vim-fugitive;
|
||||
extraPackages = [pkgs.git];
|
||||
}:
|
||||
helpers.vim-plugin.mkVimPlugin config {
|
||||
name = "fugitive";
|
||||
description = "vim-fugitive";
|
||||
package = pkgs.vimPlugins.vim-fugitive;
|
||||
extraPackages = [pkgs.git];
|
||||
|
||||
# In typical tpope fashion, this plugin has no config options
|
||||
options = {};
|
||||
}
|
||||
# In typical tpope fashion, this plugin has no config options
|
||||
options = {};
|
||||
}
|
||||
|
|
|
@ -1,11 +1,13 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
helpers,
|
||||
pkgs,
|
||||
...
|
||||
} @ args:
|
||||
}:
|
||||
with lib;
|
||||
with (import ../helpers.nix {inherit lib;}).vim-plugin;
|
||||
mkVimPlugin args {
|
||||
with helpers.vim-plugin;
|
||||
mkVimPlugin config {
|
||||
name = "ledger";
|
||||
description = "ledger language features";
|
||||
package = pkgs.vimPlugins.vim-ledger;
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
helpers,
|
||||
pkgs,
|
||||
...
|
||||
} @ args:
|
||||
}:
|
||||
with lib;
|
||||
with (import ../helpers.nix {inherit lib;}).vim-plugin;
|
||||
mkVimPlugin args {
|
||||
with helpers.vim-plugin;
|
||||
mkVimPlugin config {
|
||||
name = "markdown-preview";
|
||||
description = "markdown-preview.nvim";
|
||||
package = pkgs.vimPlugins.markdown-preview-nvim;
|
||||
|
|
|
@ -1,17 +1,14 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
helpers,
|
||||
pkgs,
|
||||
...
|
||||
} @ attrs: let
|
||||
helpers = import ../helpers.nix {inherit lib;};
|
||||
in
|
||||
with helpers.vim-plugin;
|
||||
with lib;
|
||||
mkVimPlugin attrs {
|
||||
name = "nix";
|
||||
description = "vim-nix";
|
||||
package = pkgs.vimPlugins.vim-nix;
|
||||
}:
|
||||
helpers.vim-plugin.mkVimPlugin config {
|
||||
name = "nix";
|
||||
description = "vim-nix";
|
||||
package = pkgs.vimPlugins.vim-nix;
|
||||
|
||||
# Possibly add option to disable Treesitter highlighting if this is installed
|
||||
options = {};
|
||||
}
|
||||
# Possibly add option to disable Treesitter highlighting if this is installed
|
||||
options = {};
|
||||
}
|
||||
|
|
|
@ -1,13 +1,12 @@
|
|||
{
|
||||
lib,
|
||||
helpers,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
} @ args:
|
||||
with lib;
|
||||
with (import ../helpers.nix {inherit lib;}).vim-plugin;
|
||||
mkVimPlugin args {
|
||||
name = "tagbar";
|
||||
package = pkgs.vimPlugins.tagbar;
|
||||
globalPrefix = "tagbar_";
|
||||
extraPackages = [pkgs.ctags];
|
||||
}
|
||||
}:
|
||||
helpers.vim-plugin.mkVimPlugin config {
|
||||
name = "tagbar";
|
||||
package = pkgs.vimPlugins.tagbar;
|
||||
globalPrefix = "tagbar_";
|
||||
extraPackages = [pkgs.ctags];
|
||||
}
|
||||
|
|
|
@ -1,125 +1,125 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
helpers,
|
||||
pkgs,
|
||||
...
|
||||
} @ args: let
|
||||
helpers = import ../helpers.nix {inherit lib;};
|
||||
in
|
||||
with lib;
|
||||
with helpers.vim-plugin;
|
||||
mkVimPlugin args {
|
||||
name = "vim-slime";
|
||||
package = pkgs.vimPlugins.vim-slime;
|
||||
globalPrefix = "slime_";
|
||||
}:
|
||||
with lib;
|
||||
with helpers.vim-plugin;
|
||||
mkVimPlugin config {
|
||||
name = "vim-slime";
|
||||
package = pkgs.vimPlugins.vim-slime;
|
||||
globalPrefix = "slime_";
|
||||
|
||||
options = {
|
||||
target = mkDefaultOpt {
|
||||
type = types.enum [
|
||||
"dtach"
|
||||
"kitty"
|
||||
"neovim"
|
||||
"screen"
|
||||
"tmux"
|
||||
"vimterminal"
|
||||
"wezterm"
|
||||
"whimrepl"
|
||||
"x11"
|
||||
"zellij"
|
||||
];
|
||||
description = ''
|
||||
Which backend vim-slime should use.
|
||||
options = {
|
||||
target = mkDefaultOpt {
|
||||
type = types.enum [
|
||||
"dtach"
|
||||
"kitty"
|
||||
"neovim"
|
||||
"screen"
|
||||
"tmux"
|
||||
"vimterminal"
|
||||
"wezterm"
|
||||
"whimrepl"
|
||||
"x11"
|
||||
"zellij"
|
||||
];
|
||||
description = ''
|
||||
Which backend vim-slime should use.
|
||||
|
||||
Default: "screen"
|
||||
'';
|
||||
example = "dtach";
|
||||
};
|
||||
|
||||
vimterminalCmd = mkDefaultOpt {
|
||||
global = "vimterminal_cmd";
|
||||
type = types.str;
|
||||
description = "The vim terminal command to execute.";
|
||||
};
|
||||
|
||||
noMappings = mkDefaultOpt {
|
||||
global = "no_mappings";
|
||||
type = types.bool;
|
||||
description = ''
|
||||
Whether to disable the default mappings.
|
||||
|
||||
Default: `false`
|
||||
'';
|
||||
};
|
||||
|
||||
pasteFile = mkDefaultOpt {
|
||||
global = "paste_file";
|
||||
type = types.str;
|
||||
description = ''
|
||||
Required to transfer data from vim to GNU screen or tmux.
|
||||
Setting this explicitly can work around some occasional portability issues.
|
||||
whimrepl does not require or support this setting.
|
||||
|
||||
Default: "$HOME/.slime_paste"
|
||||
'';
|
||||
};
|
||||
|
||||
preserveCurpos = mkDefaultOpt {
|
||||
global = "preserve_curpos";
|
||||
type = types.bool;
|
||||
description = ''
|
||||
Whether to preserve cursor position when sending a line or paragraph.
|
||||
|
||||
Default: `true`
|
||||
'';
|
||||
};
|
||||
|
||||
defaultConfig = mkDefaultOpt {
|
||||
global = "default_config";
|
||||
type = with helpers.nixvimTypes; attrsOf (either str rawLua);
|
||||
description = ''
|
||||
Pre-filled prompt answer.
|
||||
|
||||
Default: `null`
|
||||
|
||||
Examples:
|
||||
- `tmux`:
|
||||
```nix
|
||||
{
|
||||
socket_name = "default";
|
||||
target_pane = "{last}";
|
||||
}
|
||||
```
|
||||
- `zellij`:
|
||||
```nix
|
||||
{
|
||||
session_id = "current";
|
||||
relative_pane = "right";
|
||||
}
|
||||
```
|
||||
'';
|
||||
};
|
||||
|
||||
dontAskDefault = mkDefaultOpt {
|
||||
global = "dont_ask_default";
|
||||
type = types.bool;
|
||||
description = ''
|
||||
Whether to bypass the prompt and use the specified default configuration options.
|
||||
|
||||
Default: `false`
|
||||
'';
|
||||
};
|
||||
|
||||
bracketedPaste = mkDefaultOpt {
|
||||
global = "bracketed_paste";
|
||||
type = with types; nullOr bool;
|
||||
description = ''
|
||||
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.
|
||||
In this case it can be useful to rely on bracketed-paste
|
||||
(https://cirw.in/blog/bracketed-paste).
|
||||
Luckily, tmux knows how to handle that. See tmux's manual.
|
||||
|
||||
Default: `false`
|
||||
'';
|
||||
};
|
||||
Default: "screen"
|
||||
'';
|
||||
example = "dtach";
|
||||
};
|
||||
}
|
||||
|
||||
vimterminalCmd = mkDefaultOpt {
|
||||
global = "vimterminal_cmd";
|
||||
type = types.str;
|
||||
description = "The vim terminal command to execute.";
|
||||
};
|
||||
|
||||
noMappings = mkDefaultOpt {
|
||||
global = "no_mappings";
|
||||
type = types.bool;
|
||||
description = ''
|
||||
Whether to disable the default mappings.
|
||||
|
||||
Default: `false`
|
||||
'';
|
||||
};
|
||||
|
||||
pasteFile = mkDefaultOpt {
|
||||
global = "paste_file";
|
||||
type = types.str;
|
||||
description = ''
|
||||
Required to transfer data from vim to GNU screen or tmux.
|
||||
Setting this explicitly can work around some occasional portability issues.
|
||||
whimrepl does not require or support this setting.
|
||||
|
||||
Default: "$HOME/.slime_paste"
|
||||
'';
|
||||
};
|
||||
|
||||
preserveCurpos = mkDefaultOpt {
|
||||
global = "preserve_curpos";
|
||||
type = types.bool;
|
||||
description = ''
|
||||
Whether to preserve cursor position when sending a line or paragraph.
|
||||
|
||||
Default: `true`
|
||||
'';
|
||||
};
|
||||
|
||||
defaultConfig = mkDefaultOpt {
|
||||
global = "default_config";
|
||||
type = with helpers.nixvimTypes; attrsOf (either str rawLua);
|
||||
description = ''
|
||||
Pre-filled prompt answer.
|
||||
|
||||
Default: `null`
|
||||
|
||||
Examples:
|
||||
- `tmux`:
|
||||
```nix
|
||||
{
|
||||
socket_name = "default";
|
||||
target_pane = "{last}";
|
||||
}
|
||||
```
|
||||
- `zellij`:
|
||||
```nix
|
||||
{
|
||||
session_id = "current";
|
||||
relative_pane = "right";
|
||||
}
|
||||
```
|
||||
'';
|
||||
};
|
||||
|
||||
dontAskDefault = mkDefaultOpt {
|
||||
global = "dont_ask_default";
|
||||
type = types.bool;
|
||||
description = ''
|
||||
Whether to bypass the prompt and use the specified default configuration options.
|
||||
|
||||
Default: `false`
|
||||
'';
|
||||
};
|
||||
|
||||
bracketedPaste = mkDefaultOpt {
|
||||
global = "bracketed_paste";
|
||||
type = with types; nullOr bool;
|
||||
description = ''
|
||||
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.
|
||||
In this case it can be useful to rely on bracketed-paste
|
||||
(https://cirw.in/blog/bracketed-paste).
|
||||
Luckily, tmux knows how to handle that. See tmux's manual.
|
||||
|
||||
Default: `false`
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,24 +1,24 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
helpers,
|
||||
pkgs,
|
||||
...
|
||||
} @ attrs: let
|
||||
helpers = import ../helpers.nix {inherit lib;};
|
||||
in
|
||||
with helpers.vim-plugin;
|
||||
with lib;
|
||||
mkVimPlugin attrs {
|
||||
name = "zig";
|
||||
description = "zig.vim";
|
||||
package = pkgs.vimPlugins.zig-vim;
|
||||
globalPrefix = "zig_";
|
||||
}:
|
||||
with lib;
|
||||
with helpers.vim-plugin;
|
||||
mkVimPlugin config {
|
||||
name = "zig";
|
||||
description = "zig.vim";
|
||||
package = pkgs.vimPlugins.zig-vim;
|
||||
globalPrefix = "zig_";
|
||||
|
||||
# Possibly add option to disable Treesitter highlighting if this is installed
|
||||
options = {
|
||||
formatOnSave = mkDefaultOpt {
|
||||
type = types.bool;
|
||||
global = "fmt_autosave";
|
||||
description = "Run zig fmt on save";
|
||||
};
|
||||
# Possibly add option to disable Treesitter highlighting if this is installed
|
||||
options = {
|
||||
formatOnSave = mkDefaultOpt {
|
||||
type = types.bool;
|
||||
global = "fmt_autosave";
|
||||
description = "Run zig fmt on save";
|
||||
};
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,11 +1,13 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
helpers,
|
||||
pkgs,
|
||||
...
|
||||
} @ args:
|
||||
}:
|
||||
with lib;
|
||||
with (import ../helpers.nix {inherit lib;}).vim-plugin;
|
||||
mkVimPlugin args {
|
||||
with helpers.vim-plugin;
|
||||
mkVimPlugin config {
|
||||
name = "airline";
|
||||
description = "vim-airline";
|
||||
package = pkgs.vimPlugins.vim-airline;
|
||||
|
|
|
@ -1,34 +1,34 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
helpers,
|
||||
pkgs,
|
||||
...
|
||||
} @ attrs:
|
||||
with lib; let
|
||||
helpers = import ../helpers.nix {inherit lib;};
|
||||
in
|
||||
with helpers.vim-plugin;
|
||||
mkVimPlugin attrs {
|
||||
name = "emmet";
|
||||
package = pkgs.vimPlugins.emmet-vim;
|
||||
globalPrefix = "user_emmet_";
|
||||
}:
|
||||
with lib;
|
||||
with helpers.vim-plugin;
|
||||
mkVimPlugin config {
|
||||
name = "emmet";
|
||||
package = pkgs.vimPlugins.emmet-vim;
|
||||
globalPrefix = "user_emmet_";
|
||||
|
||||
options = {
|
||||
mode = mkDefaultOpt {
|
||||
type = types.enum ["i" "n" "v" "a"];
|
||||
global = "mode";
|
||||
description = "Mode where emmet will enable";
|
||||
};
|
||||
|
||||
leader = mkDefaultOpt {
|
||||
type = types.str;
|
||||
global = "leader_key";
|
||||
description = "Set leader key";
|
||||
};
|
||||
|
||||
settings = mkDefaultOpt {
|
||||
type = with types; attrsOf anything;
|
||||
global = "settings";
|
||||
description = "Emmet settings";
|
||||
};
|
||||
options = {
|
||||
mode = mkDefaultOpt {
|
||||
type = types.enum ["i" "n" "v" "a"];
|
||||
global = "mode";
|
||||
description = "Mode where emmet will enable";
|
||||
};
|
||||
}
|
||||
|
||||
leader = mkDefaultOpt {
|
||||
type = types.str;
|
||||
global = "leader_key";
|
||||
description = "Set leader key";
|
||||
};
|
||||
|
||||
settings = mkDefaultOpt {
|
||||
type = with types; attrsOf anything;
|
||||
global = "settings";
|
||||
description = "Emmet settings";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,17 +1,14 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
helpers,
|
||||
...
|
||||
} @ attrs: let
|
||||
helpers = import ../helpers.nix {inherit lib;};
|
||||
in
|
||||
with helpers.vim-plugin;
|
||||
with lib;
|
||||
mkVimPlugin attrs {
|
||||
name = "endwise";
|
||||
description = "vim-endwise";
|
||||
package = pkgs.vimPlugins.vim-endwise;
|
||||
}:
|
||||
helpers.vim-plugin.mkVimPlugin config {
|
||||
name = "endwise";
|
||||
description = "vim-endwise";
|
||||
package = pkgs.vimPlugins.vim-endwise;
|
||||
|
||||
# Yes it's really not configurable
|
||||
options = {};
|
||||
}
|
||||
# Yes it's really not configurable
|
||||
options = {};
|
||||
}
|
||||
|
|
|
@ -1,35 +1,35 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
helpers,
|
||||
pkgs,
|
||||
...
|
||||
} @ attrs: let
|
||||
helpers = import ../helpers.nix {inherit lib;};
|
||||
in
|
||||
with helpers.vim-plugin;
|
||||
with lib;
|
||||
mkVimPlugin attrs {
|
||||
name = "goyo";
|
||||
description = "goyo.vim";
|
||||
package = pkgs.vimPlugins.goyo-vim;
|
||||
globalPrefix = "goyo_";
|
||||
}:
|
||||
with helpers.vim-plugin;
|
||||
with lib;
|
||||
mkVimPlugin config {
|
||||
name = "goyo";
|
||||
description = "goyo.vim";
|
||||
package = pkgs.vimPlugins.goyo-vim;
|
||||
globalPrefix = "goyo_";
|
||||
|
||||
options = {
|
||||
width = mkDefaultOpt {
|
||||
description = "Width";
|
||||
global = "width";
|
||||
type = types.int;
|
||||
};
|
||||
|
||||
height = mkDefaultOpt {
|
||||
description = "Height";
|
||||
global = "height";
|
||||
type = types.int;
|
||||
};
|
||||
|
||||
showLineNumbers = mkDefaultOpt {
|
||||
description = "Show line numbers when in Goyo mode";
|
||||
global = "linenr";
|
||||
type = types.bool;
|
||||
};
|
||||
options = {
|
||||
width = mkDefaultOpt {
|
||||
description = "Width";
|
||||
global = "width";
|
||||
type = types.int;
|
||||
};
|
||||
}
|
||||
|
||||
height = mkDefaultOpt {
|
||||
description = "Height";
|
||||
global = "height";
|
||||
type = types.int;
|
||||
};
|
||||
|
||||
showLineNumbers = mkDefaultOpt {
|
||||
description = "Show line numbers when in Goyo mode";
|
||||
global = "linenr";
|
||||
type = types.bool;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,11 +1,13 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
helpers,
|
||||
pkgs,
|
||||
...
|
||||
} @ args:
|
||||
}:
|
||||
with lib;
|
||||
with (import ../helpers.nix {inherit lib;}).vim-plugin;
|
||||
mkVimPlugin args {
|
||||
with helpers.vim-plugin;
|
||||
mkVimPlugin config {
|
||||
name = "instant";
|
||||
description = "instant.nvim";
|
||||
package = pkgs.vimPlugins.instant-nvim;
|
||||
|
|
|
@ -1,11 +1,13 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
helpers,
|
||||
pkgs,
|
||||
...
|
||||
} @ args:
|
||||
}:
|
||||
with lib;
|
||||
with (import ../helpers.nix {inherit lib;}).vim-plugin;
|
||||
mkVimPlugin args {
|
||||
with helpers.vim-plugin;
|
||||
mkVimPlugin config {
|
||||
name = "magma-nvim";
|
||||
description = "magma-nvim";
|
||||
package = pkgs.vimPlugins.magma-nvim-goose;
|
||||
|
|
|
@ -1,211 +1,211 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
helpers,
|
||||
pkgs,
|
||||
...
|
||||
} @ args: let
|
||||
helpers = import ../helpers.nix {inherit lib;};
|
||||
in
|
||||
with lib;
|
||||
with helpers.vim-plugin;
|
||||
mkVimPlugin args {
|
||||
name = "molten";
|
||||
description = "molten-nvim";
|
||||
package = pkgs.vimPlugins.molten-nvim;
|
||||
globalPrefix = "molten_";
|
||||
}:
|
||||
with lib;
|
||||
with helpers.vim-plugin;
|
||||
mkVimPlugin config {
|
||||
name = "molten";
|
||||
description = "molten-nvim";
|
||||
package = pkgs.vimPlugins.molten-nvim;
|
||||
globalPrefix = "molten_";
|
||||
|
||||
options = {
|
||||
autoOpenOutput = mkDefaultOpt {
|
||||
global = "auto_open_output";
|
||||
description = ''
|
||||
Automatically open the output window when your cursor moves over a cell.
|
||||
options = {
|
||||
autoOpenOutput = mkDefaultOpt {
|
||||
global = "auto_open_output";
|
||||
description = ''
|
||||
Automatically open the output window when your cursor moves over a cell.
|
||||
|
||||
Default: `true`
|
||||
'';
|
||||
type = types.bool;
|
||||
example = false;
|
||||
};
|
||||
|
||||
copyOutput = mkDefaultOpt {
|
||||
global = "copy_output";
|
||||
description = ''
|
||||
Copy evaluation output to clipboard automatically (requires pyperclip).
|
||||
|
||||
Default: `false`
|
||||
'';
|
||||
type = types.bool;
|
||||
example = true;
|
||||
};
|
||||
|
||||
enterOutputBehavior = mkDefaultOpt {
|
||||
global = "enter_output_behavior";
|
||||
description = ''
|
||||
The behavior of MoltenEnterOutput.
|
||||
|
||||
Default: `"open_then_enter"`
|
||||
'';
|
||||
type = types.enum ["open_then_enter" "open_and_enter" "no_open"];
|
||||
};
|
||||
|
||||
imageProvider = mkDefaultOpt {
|
||||
global = "image_provider";
|
||||
description = ''
|
||||
How images are displayed.
|
||||
|
||||
Default: `"none"`
|
||||
'';
|
||||
type = types.enum ["none" "image.nvim"];
|
||||
};
|
||||
|
||||
outputCropBorder = mkDefaultOpt {
|
||||
global = "output_crop_border";
|
||||
description = ''
|
||||
'crops' the bottom border of the output window when it would otherwise just sit at the
|
||||
bottom of the screen.
|
||||
|
||||
Default: `true`
|
||||
'';
|
||||
type = types.bool;
|
||||
};
|
||||
|
||||
outputShowMore = mkDefaultOpt {
|
||||
global = "output_show_more";
|
||||
description = ''
|
||||
When the window can't display the entire contents of the output buffer, shows the number
|
||||
of extra lines in the window footer (requires nvim 10.0+ and a window border).
|
||||
|
||||
Default: `false`
|
||||
'';
|
||||
type = types.bool;
|
||||
};
|
||||
|
||||
outputVirtLines = mkDefaultOpt {
|
||||
global = "output_virt_lines";
|
||||
description = ''
|
||||
Pad the main buffer with virtual lines so the output doesn't cover anything while it's
|
||||
open.
|
||||
|
||||
Default: `false`
|
||||
'';
|
||||
type = types.bool;
|
||||
};
|
||||
|
||||
outputWinBorder = mkDefaultOpt {
|
||||
global = "output_win_border";
|
||||
description = ''
|
||||
Some border features will not work if you don't specify your border as a table.
|
||||
See border option of `:h nvim_open_win()`.
|
||||
|
||||
Default: `["" "━" "" ""]`
|
||||
'';
|
||||
type = helpers.nixvimTypes.border;
|
||||
};
|
||||
|
||||
outputWinCoverGutter = mkDefaultOpt {
|
||||
global = "output_win_cover_gutter";
|
||||
description = ''
|
||||
Should the output window cover the gutter (numbers and sign col), or not.
|
||||
If you change this, you probably also want to change `outputWinStyle`.
|
||||
|
||||
Default: `true`
|
||||
'';
|
||||
type = types.bool;
|
||||
};
|
||||
|
||||
outputWinHideOnLeave = mkDefaultOpt {
|
||||
global = "output_win_hide_on_leave";
|
||||
description = ''
|
||||
After leaving the output window (via `:q` or switching windows), do not attempt to redraw
|
||||
the output window.
|
||||
|
||||
Default: `true`
|
||||
'';
|
||||
type = types.bool;
|
||||
};
|
||||
|
||||
outputWinMaxHeight = mkDefaultOpt {
|
||||
global = "output_win_max_height";
|
||||
description = ''
|
||||
Max height of the output window.
|
||||
|
||||
Default: `999999`
|
||||
'';
|
||||
type = types.ints.unsigned;
|
||||
};
|
||||
|
||||
outputWinMaxWidth = mkDefaultOpt {
|
||||
global = "output_win_max_width";
|
||||
description = ''
|
||||
Max width of the output window.
|
||||
|
||||
Default: `999999`
|
||||
'';
|
||||
type = types.ints.unsigned;
|
||||
};
|
||||
|
||||
outputWinStyle = mkDefaultOpt {
|
||||
global = "output_win_style";
|
||||
description = ''
|
||||
Value passed to the `style` option in `:h nvim_open_win()`
|
||||
|
||||
Default: `false`
|
||||
'';
|
||||
type = types.enum [false "minimal"];
|
||||
};
|
||||
|
||||
savePath = mkDefaultOpt {
|
||||
global = "save_path";
|
||||
description = ''
|
||||
Where to save/load data with `:MoltenSave` and `:MoltenLoad`.
|
||||
|
||||
Default: `{__raw = "vim.fn.stdpath('data')..'/molten'";}`
|
||||
'';
|
||||
type = with helpers.nixvimTypes; either str rawLua;
|
||||
};
|
||||
|
||||
useBorderHighlights = mkDefaultOpt {
|
||||
global = "use_border_highlights";
|
||||
description = ''
|
||||
When true, uses different highlights for output border depending on the state of the cell
|
||||
(running, done, error).
|
||||
See [highlights](https://github.com/benlubas/molten-nvim#highlights).
|
||||
|
||||
Default: `false`
|
||||
'';
|
||||
type = types.bool;
|
||||
};
|
||||
|
||||
virtLinesOffBy1 = mkDefaultOpt {
|
||||
global = "virt_lines_off_by_1";
|
||||
description = ''
|
||||
_Only has effect when `outputVirtLines` is true._
|
||||
Allows the output window to cover exactly one line of the regular buffer.
|
||||
(useful for running code in a markdown file where that covered line will just be ```)
|
||||
|
||||
Default: `false`
|
||||
'';
|
||||
type = types.bool;
|
||||
};
|
||||
|
||||
wrapOutput = mkDefaultOpt {
|
||||
global = "wrap_output";
|
||||
description = ''
|
||||
Wrap text in output windows.
|
||||
|
||||
Default: `false`
|
||||
'';
|
||||
type = types.bool;
|
||||
};
|
||||
|
||||
# Debug
|
||||
showMimetypeDebug = mkDefaultOpt {
|
||||
global = "show_mimetype_debug";
|
||||
description = ''
|
||||
Before any non-iostream output chunk, the mime-type for that output chunk is shown.
|
||||
Meant for debugging/plugin devlopment.
|
||||
|
||||
Default: `false`
|
||||
'';
|
||||
type = types.bool;
|
||||
};
|
||||
Default: `true`
|
||||
'';
|
||||
type = types.bool;
|
||||
example = false;
|
||||
};
|
||||
}
|
||||
|
||||
copyOutput = mkDefaultOpt {
|
||||
global = "copy_output";
|
||||
description = ''
|
||||
Copy evaluation output to clipboard automatically (requires pyperclip).
|
||||
|
||||
Default: `false`
|
||||
'';
|
||||
type = types.bool;
|
||||
example = true;
|
||||
};
|
||||
|
||||
enterOutputBehavior = mkDefaultOpt {
|
||||
global = "enter_output_behavior";
|
||||
description = ''
|
||||
The behavior of MoltenEnterOutput.
|
||||
|
||||
Default: `"open_then_enter"`
|
||||
'';
|
||||
type = types.enum ["open_then_enter" "open_and_enter" "no_open"];
|
||||
};
|
||||
|
||||
imageProvider = mkDefaultOpt {
|
||||
global = "image_provider";
|
||||
description = ''
|
||||
How images are displayed.
|
||||
|
||||
Default: `"none"`
|
||||
'';
|
||||
type = types.enum ["none" "image.nvim"];
|
||||
};
|
||||
|
||||
outputCropBorder = mkDefaultOpt {
|
||||
global = "output_crop_border";
|
||||
description = ''
|
||||
'crops' the bottom border of the output window when it would otherwise just sit at the
|
||||
bottom of the screen.
|
||||
|
||||
Default: `true`
|
||||
'';
|
||||
type = types.bool;
|
||||
};
|
||||
|
||||
outputShowMore = mkDefaultOpt {
|
||||
global = "output_show_more";
|
||||
description = ''
|
||||
When the window can't display the entire contents of the output buffer, shows the number
|
||||
of extra lines in the window footer (requires nvim 10.0+ and a window border).
|
||||
|
||||
Default: `false`
|
||||
'';
|
||||
type = types.bool;
|
||||
};
|
||||
|
||||
outputVirtLines = mkDefaultOpt {
|
||||
global = "output_virt_lines";
|
||||
description = ''
|
||||
Pad the main buffer with virtual lines so the output doesn't cover anything while it's
|
||||
open.
|
||||
|
||||
Default: `false`
|
||||
'';
|
||||
type = types.bool;
|
||||
};
|
||||
|
||||
outputWinBorder = mkDefaultOpt {
|
||||
global = "output_win_border";
|
||||
description = ''
|
||||
Some border features will not work if you don't specify your border as a table.
|
||||
See border option of `:h nvim_open_win()`.
|
||||
|
||||
Default: `["" "━" "" ""]`
|
||||
'';
|
||||
type = helpers.nixvimTypes.border;
|
||||
};
|
||||
|
||||
outputWinCoverGutter = mkDefaultOpt {
|
||||
global = "output_win_cover_gutter";
|
||||
description = ''
|
||||
Should the output window cover the gutter (numbers and sign col), or not.
|
||||
If you change this, you probably also want to change `outputWinStyle`.
|
||||
|
||||
Default: `true`
|
||||
'';
|
||||
type = types.bool;
|
||||
};
|
||||
|
||||
outputWinHideOnLeave = mkDefaultOpt {
|
||||
global = "output_win_hide_on_leave";
|
||||
description = ''
|
||||
After leaving the output window (via `:q` or switching windows), do not attempt to redraw
|
||||
the output window.
|
||||
|
||||
Default: `true`
|
||||
'';
|
||||
type = types.bool;
|
||||
};
|
||||
|
||||
outputWinMaxHeight = mkDefaultOpt {
|
||||
global = "output_win_max_height";
|
||||
description = ''
|
||||
Max height of the output window.
|
||||
|
||||
Default: `999999`
|
||||
'';
|
||||
type = types.ints.unsigned;
|
||||
};
|
||||
|
||||
outputWinMaxWidth = mkDefaultOpt {
|
||||
global = "output_win_max_width";
|
||||
description = ''
|
||||
Max width of the output window.
|
||||
|
||||
Default: `999999`
|
||||
'';
|
||||
type = types.ints.unsigned;
|
||||
};
|
||||
|
||||
outputWinStyle = mkDefaultOpt {
|
||||
global = "output_win_style";
|
||||
description = ''
|
||||
Value passed to the `style` option in `:h nvim_open_win()`
|
||||
|
||||
Default: `false`
|
||||
'';
|
||||
type = types.enum [false "minimal"];
|
||||
};
|
||||
|
||||
savePath = mkDefaultOpt {
|
||||
global = "save_path";
|
||||
description = ''
|
||||
Where to save/load data with `:MoltenSave` and `:MoltenLoad`.
|
||||
|
||||
Default: `{__raw = "vim.fn.stdpath('data')..'/molten'";}`
|
||||
'';
|
||||
type = with helpers.nixvimTypes; either str rawLua;
|
||||
};
|
||||
|
||||
useBorderHighlights = mkDefaultOpt {
|
||||
global = "use_border_highlights";
|
||||
description = ''
|
||||
When true, uses different highlights for output border depending on the state of the cell
|
||||
(running, done, error).
|
||||
See [highlights](https://github.com/benlubas/molten-nvim#highlights).
|
||||
|
||||
Default: `false`
|
||||
'';
|
||||
type = types.bool;
|
||||
};
|
||||
|
||||
virtLinesOffBy1 = mkDefaultOpt {
|
||||
global = "virt_lines_off_by_1";
|
||||
description = ''
|
||||
_Only has effect when `outputVirtLines` is true._
|
||||
Allows the output window to cover exactly one line of the regular buffer.
|
||||
(useful for running code in a markdown file where that covered line will just be ```)
|
||||
|
||||
Default: `false`
|
||||
'';
|
||||
type = types.bool;
|
||||
};
|
||||
|
||||
wrapOutput = mkDefaultOpt {
|
||||
global = "wrap_output";
|
||||
description = ''
|
||||
Wrap text in output windows.
|
||||
|
||||
Default: `false`
|
||||
'';
|
||||
type = types.bool;
|
||||
};
|
||||
|
||||
# Debug
|
||||
showMimetypeDebug = mkDefaultOpt {
|
||||
global = "show_mimetype_debug";
|
||||
description = ''
|
||||
Before any non-iostream output chunk, the mime-type for that output chunk is shown.
|
||||
Meant for debugging/plugin devlopment.
|
||||
|
||||
Default: `false`
|
||||
'';
|
||||
type = types.bool;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,233 +1,233 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
helpers,
|
||||
pkgs,
|
||||
...
|
||||
} @ args: let
|
||||
helpers = import ../helpers.nix {inherit lib;};
|
||||
in
|
||||
with lib;
|
||||
with helpers.vim-plugin;
|
||||
mkVimPlugin args {
|
||||
name = "startify";
|
||||
package = pkgs.vimPlugins.vim-startify;
|
||||
globalPrefix = "startify_";
|
||||
}:
|
||||
with lib;
|
||||
with helpers.vim-plugin;
|
||||
mkVimPlugin config {
|
||||
name = "startify";
|
||||
package = pkgs.vimPlugins.vim-startify;
|
||||
globalPrefix = "startify_";
|
||||
|
||||
options = {
|
||||
sessionDir = mkDefaultOpt {
|
||||
description = "Directory to save/load session";
|
||||
global = "session_dir";
|
||||
type = types.str;
|
||||
};
|
||||
|
||||
lists = mkDefaultOpt {
|
||||
description = "Startify display lists. If it's a string, it'll be interpreted as literal lua code";
|
||||
global = "lists";
|
||||
type = types.listOf (types.oneOf [
|
||||
(types.submodule {
|
||||
options = {
|
||||
type = mkOption {
|
||||
type = types.str;
|
||||
description = "The type of the list";
|
||||
};
|
||||
# TODO the header should be a literal lua string!
|
||||
header = mkOption {
|
||||
type = types.nullOr (types.listOf types.str);
|
||||
description = "Optional header. It's a list of strings";
|
||||
default = null;
|
||||
};
|
||||
indices = mkOption {
|
||||
type = types.nullOr (types.listOf types.str);
|
||||
description = "Optional indices for the current list";
|
||||
default = null;
|
||||
};
|
||||
};
|
||||
})
|
||||
types.str
|
||||
]);
|
||||
|
||||
value = val: let
|
||||
list = map (v:
|
||||
if builtins.isAttrs v
|
||||
then toLuaObject v
|
||||
else v)
|
||||
val;
|
||||
in
|
||||
"{" + (concatStringsSep "," list) + "}";
|
||||
};
|
||||
|
||||
bookmarks = mkDefaultOpt {
|
||||
description = "A list of files or directories to bookmark.";
|
||||
global = "bookmarks";
|
||||
type = with types; listOf (oneOf [str (attrsOf str)]);
|
||||
};
|
||||
|
||||
commands = mkDefaultOpt {
|
||||
description = "A list of commands to execute on selection";
|
||||
global = "commands";
|
||||
type = with types; listOf (oneOf [str (listOf str) attrs]);
|
||||
};
|
||||
|
||||
filesNumber = mkDefaultOpt {
|
||||
description = "The number of files to list";
|
||||
global = "files_number";
|
||||
type = types.int;
|
||||
};
|
||||
|
||||
updateOldFiles = mkDefaultOpt {
|
||||
description = "Update v:oldfiles on-the-fly, so that :Startify is always up-to-date";
|
||||
global = "update_oldfiles";
|
||||
type = types.bool;
|
||||
};
|
||||
|
||||
sessionAutoload = mkDefaultOpt {
|
||||
description = "Load Session.vim";
|
||||
global = "session_autoload";
|
||||
type = types.bool;
|
||||
};
|
||||
|
||||
sessionBeforeSave = mkDefaultOpt {
|
||||
description = "Commands to be executed before saving a session";
|
||||
global = "session_before_save";
|
||||
type = types.listOf types.str;
|
||||
};
|
||||
|
||||
sessionPersistence = mkDefaultOpt {
|
||||
description = "Automatically update sessions";
|
||||
global = "session_persistence";
|
||||
type = types.bool;
|
||||
};
|
||||
|
||||
sessionDeleteBuffers = mkDefaultOpt {
|
||||
description = "Delete all buffers when loading or closing a session";
|
||||
global = "session_delete_buffers";
|
||||
type = types.bool;
|
||||
};
|
||||
|
||||
changeToDir = mkDefaultOpt {
|
||||
description = "When opening a file or bookmark, change to its directory";
|
||||
global = "change_to_dir";
|
||||
type = types.bool;
|
||||
};
|
||||
|
||||
changeToVcsRoot = mkDefaultOpt {
|
||||
description = "When opening a file or bookmark, change to the root directory of the VCS";
|
||||
global = "change_to_vcs_root";
|
||||
type = types.bool;
|
||||
};
|
||||
|
||||
changeCmd = mkDefaultOpt {
|
||||
description = "The default command for switching directories";
|
||||
global = "change_cmd";
|
||||
type = types.enum ["cd" "lcd" "tcd"];
|
||||
};
|
||||
|
||||
skipList = mkDefaultOpt {
|
||||
description = "A list of regexes that is used to filter recently used files";
|
||||
global = "skiplist";
|
||||
type = types.listOf types.str;
|
||||
};
|
||||
|
||||
useUnicode = mkDefaultOpt {
|
||||
description = "Use unicode box drawing characters for the fortune header";
|
||||
global = "fortune_use_unicode";
|
||||
type = types.bool;
|
||||
};
|
||||
|
||||
paddingLeft = mkDefaultOpt {
|
||||
description = "Number of spaces used for left padding";
|
||||
global = "padding_left";
|
||||
type = types.int;
|
||||
};
|
||||
|
||||
skipListServer = mkDefaultOpt {
|
||||
description = "Do not create the startify buffer if this is a Vim server instance with a name contained in this list";
|
||||
global = "skiplist_server";
|
||||
type = types.listOf types.str;
|
||||
};
|
||||
|
||||
enableSpecial = mkDefaultOpt {
|
||||
description = "Show <empty buffer> and <quit>";
|
||||
global = "enable_special";
|
||||
type = types.bool;
|
||||
};
|
||||
|
||||
enableUnsafe = mkDefaultOpt {
|
||||
description = "Improves start time but reduces accuracy of the file list";
|
||||
global = "enable_unsafe";
|
||||
type = types.bool;
|
||||
};
|
||||
|
||||
sessionRemoveLines = mkDefaultOpt {
|
||||
description = "Lines matching any of the patterns in this list will be removed from the session file";
|
||||
global = "session_remove_lines";
|
||||
type = types.listOf types.str;
|
||||
};
|
||||
|
||||
sessionSaveVars = mkDefaultOpt {
|
||||
description = "List of variables for Startify to save into the session file";
|
||||
global = "session_savevars";
|
||||
type = types.listOf types.str;
|
||||
};
|
||||
|
||||
sessionSaveCmds = mkDefaultOpt {
|
||||
description = "List of cmdline commands to run when loading the session";
|
||||
global = "session_savecmds";
|
||||
type = types.listOf types.str;
|
||||
};
|
||||
|
||||
sessionNumber = mkDefaultOpt {
|
||||
description = "Maximum number of sessions to display";
|
||||
global = "session_number";
|
||||
type = types.listOf types.str;
|
||||
};
|
||||
|
||||
sessionSort = mkDefaultOpt {
|
||||
description = "Sort sessions by modification time rather than alphabetically";
|
||||
global = "session_sort";
|
||||
type = types.bool;
|
||||
};
|
||||
|
||||
customIndices = mkDefaultOpt {
|
||||
description = "Use this list as indices instead of increasing numbers";
|
||||
global = "custom_indices";
|
||||
type = types.listOf types.str;
|
||||
};
|
||||
|
||||
customHeader = mkDefaultOpt {
|
||||
description = "Define your own header";
|
||||
global = "custom_header";
|
||||
type = types.oneOf [types.str (types.listOf types.str)];
|
||||
};
|
||||
|
||||
customQuotes = mkDefaultOpt {
|
||||
description = "Own quotes for the cowsay header";
|
||||
global = "custom_header_quotes";
|
||||
# TODO this should also support funcrefs!
|
||||
type = types.listOf (types.listOf types.str);
|
||||
};
|
||||
|
||||
customFooter = mkDefaultOpt {
|
||||
description = "Custom footer";
|
||||
global = "custom_footer";
|
||||
type = types.str;
|
||||
};
|
||||
|
||||
disableAtVimEnter = mkDefaultOpt {
|
||||
description = "Don't run Startify at Vim startup";
|
||||
global = "disable_at_vimenter";
|
||||
type = types.bool;
|
||||
};
|
||||
|
||||
relativePath = mkDefaultOpt {
|
||||
description = "If the file is in or below the current working directory, use a relative path";
|
||||
global = "relative_path";
|
||||
type = types.bool;
|
||||
};
|
||||
|
||||
useEnv = mkDefaultOpt {
|
||||
description = "Show environment variables in path, if their name is shorter than their value";
|
||||
global = "use_env";
|
||||
type = types.bool;
|
||||
};
|
||||
options = {
|
||||
sessionDir = mkDefaultOpt {
|
||||
description = "Directory to save/load session";
|
||||
global = "session_dir";
|
||||
type = types.str;
|
||||
};
|
||||
}
|
||||
|
||||
lists = mkDefaultOpt {
|
||||
description = "Startify display lists. If it's a string, it'll be interpreted as literal lua code";
|
||||
global = "lists";
|
||||
type = types.listOf (types.oneOf [
|
||||
(types.submodule {
|
||||
options = {
|
||||
type = mkOption {
|
||||
type = types.str;
|
||||
description = "The type of the list";
|
||||
};
|
||||
# TODO the header should be a literal lua string!
|
||||
header = mkOption {
|
||||
type = types.nullOr (types.listOf types.str);
|
||||
description = "Optional header. It's a list of strings";
|
||||
default = null;
|
||||
};
|
||||
indices = mkOption {
|
||||
type = types.nullOr (types.listOf types.str);
|
||||
description = "Optional indices for the current list";
|
||||
default = null;
|
||||
};
|
||||
};
|
||||
})
|
||||
types.str
|
||||
]);
|
||||
|
||||
value = val: let
|
||||
list = map (v:
|
||||
if builtins.isAttrs v
|
||||
then toLuaObject v
|
||||
else v)
|
||||
val;
|
||||
in
|
||||
"{" + (concatStringsSep "," list) + "}";
|
||||
};
|
||||
|
||||
bookmarks = mkDefaultOpt {
|
||||
description = "A list of files or directories to bookmark.";
|
||||
global = "bookmarks";
|
||||
type = with types; listOf (oneOf [str (attrsOf str)]);
|
||||
};
|
||||
|
||||
commands = mkDefaultOpt {
|
||||
description = "A list of commands to execute on selection";
|
||||
global = "commands";
|
||||
type = with types; listOf (oneOf [str (listOf str) attrs]);
|
||||
};
|
||||
|
||||
filesNumber = mkDefaultOpt {
|
||||
description = "The number of files to list";
|
||||
global = "files_number";
|
||||
type = types.int;
|
||||
};
|
||||
|
||||
updateOldFiles = mkDefaultOpt {
|
||||
description = "Update v:oldfiles on-the-fly, so that :Startify is always up-to-date";
|
||||
global = "update_oldfiles";
|
||||
type = types.bool;
|
||||
};
|
||||
|
||||
sessionAutoload = mkDefaultOpt {
|
||||
description = "Load Session.vim";
|
||||
global = "session_autoload";
|
||||
type = types.bool;
|
||||
};
|
||||
|
||||
sessionBeforeSave = mkDefaultOpt {
|
||||
description = "Commands to be executed before saving a session";
|
||||
global = "session_before_save";
|
||||
type = types.listOf types.str;
|
||||
};
|
||||
|
||||
sessionPersistence = mkDefaultOpt {
|
||||
description = "Automatically update sessions";
|
||||
global = "session_persistence";
|
||||
type = types.bool;
|
||||
};
|
||||
|
||||
sessionDeleteBuffers = mkDefaultOpt {
|
||||
description = "Delete all buffers when loading or closing a session";
|
||||
global = "session_delete_buffers";
|
||||
type = types.bool;
|
||||
};
|
||||
|
||||
changeToDir = mkDefaultOpt {
|
||||
description = "When opening a file or bookmark, change to its directory";
|
||||
global = "change_to_dir";
|
||||
type = types.bool;
|
||||
};
|
||||
|
||||
changeToVcsRoot = mkDefaultOpt {
|
||||
description = "When opening a file or bookmark, change to the root directory of the VCS";
|
||||
global = "change_to_vcs_root";
|
||||
type = types.bool;
|
||||
};
|
||||
|
||||
changeCmd = mkDefaultOpt {
|
||||
description = "The default command for switching directories";
|
||||
global = "change_cmd";
|
||||
type = types.enum ["cd" "lcd" "tcd"];
|
||||
};
|
||||
|
||||
skipList = mkDefaultOpt {
|
||||
description = "A list of regexes that is used to filter recently used files";
|
||||
global = "skiplist";
|
||||
type = types.listOf types.str;
|
||||
};
|
||||
|
||||
useUnicode = mkDefaultOpt {
|
||||
description = "Use unicode box drawing characters for the fortune header";
|
||||
global = "fortune_use_unicode";
|
||||
type = types.bool;
|
||||
};
|
||||
|
||||
paddingLeft = mkDefaultOpt {
|
||||
description = "Number of spaces used for left padding";
|
||||
global = "padding_left";
|
||||
type = types.int;
|
||||
};
|
||||
|
||||
skipListServer = mkDefaultOpt {
|
||||
description = "Do not create the startify buffer if this is a Vim server instance with a name contained in this list";
|
||||
global = "skiplist_server";
|
||||
type = types.listOf types.str;
|
||||
};
|
||||
|
||||
enableSpecial = mkDefaultOpt {
|
||||
description = "Show <empty buffer> and <quit>";
|
||||
global = "enable_special";
|
||||
type = types.bool;
|
||||
};
|
||||
|
||||
enableUnsafe = mkDefaultOpt {
|
||||
description = "Improves start time but reduces accuracy of the file list";
|
||||
global = "enable_unsafe";
|
||||
type = types.bool;
|
||||
};
|
||||
|
||||
sessionRemoveLines = mkDefaultOpt {
|
||||
description = "Lines matching any of the patterns in this list will be removed from the session file";
|
||||
global = "session_remove_lines";
|
||||
type = types.listOf types.str;
|
||||
};
|
||||
|
||||
sessionSaveVars = mkDefaultOpt {
|
||||
description = "List of variables for Startify to save into the session file";
|
||||
global = "session_savevars";
|
||||
type = types.listOf types.str;
|
||||
};
|
||||
|
||||
sessionSaveCmds = mkDefaultOpt {
|
||||
description = "List of cmdline commands to run when loading the session";
|
||||
global = "session_savecmds";
|
||||
type = types.listOf types.str;
|
||||
};
|
||||
|
||||
sessionNumber = mkDefaultOpt {
|
||||
description = "Maximum number of sessions to display";
|
||||
global = "session_number";
|
||||
type = types.listOf types.str;
|
||||
};
|
||||
|
||||
sessionSort = mkDefaultOpt {
|
||||
description = "Sort sessions by modification time rather than alphabetically";
|
||||
global = "session_sort";
|
||||
type = types.bool;
|
||||
};
|
||||
|
||||
customIndices = mkDefaultOpt {
|
||||
description = "Use this list as indices instead of increasing numbers";
|
||||
global = "custom_indices";
|
||||
type = types.listOf types.str;
|
||||
};
|
||||
|
||||
customHeader = mkDefaultOpt {
|
||||
description = "Define your own header";
|
||||
global = "custom_header";
|
||||
type = types.oneOf [types.str (types.listOf types.str)];
|
||||
};
|
||||
|
||||
customQuotes = mkDefaultOpt {
|
||||
description = "Own quotes for the cowsay header";
|
||||
global = "custom_header_quotes";
|
||||
# TODO this should also support funcrefs!
|
||||
type = types.listOf (types.listOf types.str);
|
||||
};
|
||||
|
||||
customFooter = mkDefaultOpt {
|
||||
description = "Custom footer";
|
||||
global = "custom_footer";
|
||||
type = types.str;
|
||||
};
|
||||
|
||||
disableAtVimEnter = mkDefaultOpt {
|
||||
description = "Don't run Startify at Vim startup";
|
||||
global = "disable_at_vimenter";
|
||||
type = types.bool;
|
||||
};
|
||||
|
||||
relativePath = mkDefaultOpt {
|
||||
description = "If the file is in or below the current working directory, use a relative path";
|
||||
global = "relative_path";
|
||||
type = types.bool;
|
||||
};
|
||||
|
||||
useEnv = mkDefaultOpt {
|
||||
description = "Show environment variables in path, if their name is shorter than their value";
|
||||
global = "use_env";
|
||||
type = types.bool;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,16 +1,13 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
helpers,
|
||||
pkgs,
|
||||
...
|
||||
} @ attrs: let
|
||||
helpers = import ../helpers.nix {inherit lib;};
|
||||
in
|
||||
with helpers.vim-plugin;
|
||||
with lib;
|
||||
mkVimPlugin attrs {
|
||||
name = "surround";
|
||||
description = "surround.vim";
|
||||
package = pkgs.vimPlugins.surround;
|
||||
}:
|
||||
helpers.vim-plugin.mkVimPlugin config {
|
||||
name = "surround";
|
||||
description = "surround.vim";
|
||||
package = pkgs.vimPlugins.surround;
|
||||
|
||||
options = {};
|
||||
}
|
||||
options = {};
|
||||
}
|
||||
|
|
|
@ -1,11 +1,13 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
helpers,
|
||||
pkgs,
|
||||
...
|
||||
} @ args:
|
||||
}:
|
||||
with lib;
|
||||
with (import ../helpers.nix {inherit lib;}).vim-plugin;
|
||||
mkVimPlugin args {
|
||||
with helpers.vim-plugin;
|
||||
mkVimPlugin config {
|
||||
name = "undotree";
|
||||
package = pkgs.vimPlugins.undotree;
|
||||
globalPrefix = "undotree_";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue