2023-02-20 11:42:13 +01:00
|
|
|
{
|
|
|
|
pkgs,
|
|
|
|
lib,
|
|
|
|
...
|
2023-03-24 15:46:16 +01:00
|
|
|
} @ args:
|
|
|
|
with lib;
|
2023-05-19 12:38:24 +02:00
|
|
|
with import ../helpers.nix {inherit lib;};
|
|
|
|
mkPlugin args {
|
2023-03-24 15:46:16 +01:00
|
|
|
name = "magma-nvim";
|
|
|
|
description = "magma-nvim";
|
2023-03-26 15:44:45 +02:00
|
|
|
package = pkgs.vimPlugins.magma-nvim-goose;
|
2023-03-24 15:46:16 +01:00
|
|
|
globalPrefix = "magma_";
|
|
|
|
|
|
|
|
options = {
|
|
|
|
imageProvider = mkDefaultOpt {
|
|
|
|
global = "image_provider";
|
|
|
|
description = ''
|
|
|
|
This configures how to display images. The following options are available:
|
|
|
|
- "none" -- don't show images.
|
|
|
|
- "ueberzug" -- use Ueberzug to display images.
|
|
|
|
- "kitty" -- use the Kitty protocol to display images.
|
|
|
|
|
|
|
|
Default: "none"
|
|
|
|
'';
|
|
|
|
type = types.enum ["none" "uberzug" "kitty"];
|
2022-12-30 10:02:59 -05:00
|
|
|
};
|
2023-03-24 15:46:16 +01:00
|
|
|
|
|
|
|
automaticallyOpenOutput = mkDefaultOpt {
|
|
|
|
global = "automatically_open_output";
|
|
|
|
description = ''
|
|
|
|
If this is true, then whenever you have an active cell its output window will be
|
|
|
|
automatically shown.
|
|
|
|
|
|
|
|
If this is false, then the output window will only be automatically shown when you've just
|
|
|
|
evaluated the code.
|
|
|
|
So, if you take your cursor out of the cell, and then come back, the output window won't
|
|
|
|
be opened (but the cell will be highlighted).
|
|
|
|
This means that there will be nothing covering your code.
|
|
|
|
You can then open the output window at will using `:MagmaShowOutput`.
|
|
|
|
|
|
|
|
Default: true
|
|
|
|
'';
|
2022-12-30 10:02:59 -05:00
|
|
|
type = types.bool;
|
|
|
|
example = false;
|
|
|
|
};
|
|
|
|
|
2023-03-24 15:46:16 +01:00
|
|
|
wrapOutput = mkDefaultOpt {
|
|
|
|
global = "wrap_output";
|
2022-12-30 10:02:59 -05:00
|
|
|
type = types.bool;
|
|
|
|
example = false;
|
2023-03-24 15:46:16 +01:00
|
|
|
description = ''
|
|
|
|
If this is true, then text output in the output window will be wrapped
|
|
|
|
(akin to `set wrap`).
|
|
|
|
|
|
|
|
Default: true
|
|
|
|
'';
|
2022-12-30 10:02:59 -05:00
|
|
|
};
|
|
|
|
|
2023-03-24 15:46:16 +01:00
|
|
|
outputWindowBorders = mkDefaultOpt {
|
|
|
|
global = "output_window_borders";
|
2022-12-30 10:02:59 -05:00
|
|
|
type = types.bool;
|
|
|
|
example = false;
|
2023-03-24 15:46:16 +01:00
|
|
|
description = ''
|
|
|
|
If this is true, then the output window will have rounded borders.
|
|
|
|
If it is false, it will have no borders.
|
|
|
|
|
|
|
|
Default: true
|
|
|
|
'';
|
2022-12-30 10:02:59 -05:00
|
|
|
};
|
|
|
|
|
2023-03-24 15:46:16 +01:00
|
|
|
cellHighlightGroup = mkDefaultOpt {
|
|
|
|
global = "cell_highlight_group";
|
2022-12-30 10:02:59 -05:00
|
|
|
type = types.str;
|
2023-03-24 15:46:16 +01:00
|
|
|
description = ''
|
|
|
|
The highlight group to be used for highlighting cells.
|
|
|
|
|
|
|
|
Default: "CursorLine"
|
|
|
|
'';
|
2022-12-30 10:02:59 -05:00
|
|
|
};
|
2023-03-24 15:46:16 +01:00
|
|
|
|
|
|
|
savePath = mkDefaultOpt {
|
|
|
|
global = "save_path";
|
|
|
|
type = types.str;
|
|
|
|
description = ''
|
|
|
|
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
|
|
|
|
buffer's name, with % replaced by %% and / replaced by %, and postfixed with the extension
|
|
|
|
.json.
|
|
|
|
'';
|
2022-12-30 10:02:59 -05:00
|
|
|
};
|
2023-03-24 15:46:16 +01:00
|
|
|
|
|
|
|
showMimetypeDebug = mkDefaultOpt {
|
|
|
|
global = "show_mimetype_debug";
|
2022-12-30 10:02:59 -05:00
|
|
|
type = types.bool;
|
|
|
|
example = true;
|
2023-03-24 15:46:16 +01:00
|
|
|
description = ''
|
|
|
|
If this is true, then before any non-iostream output chunk, Magma shows the mimetypes it
|
|
|
|
received for it.
|
|
|
|
This is meant for debugging and adding new mimetypes.
|
2022-12-30 10:02:59 -05:00
|
|
|
|
2023-03-24 15:46:16 +01:00
|
|
|
Default: false
|
|
|
|
'';
|
|
|
|
};
|
2022-12-30 10:02:59 -05:00
|
|
|
};
|
2023-03-24 15:46:16 +01:00
|
|
|
}
|