plugins: fix "int flag" style options

This commit is contained in:
Matt Sturgeon 2024-09-08 13:52:18 +01:00
parent 555035ef79
commit ec61ca9b08
No known key found for this signature in database
GPG key ID: 4F91844CED1A8299
27 changed files with 168 additions and 168 deletions

View file

@ -96,16 +96,16 @@ mkVimPlugin {
Set this to get some kind of lines or visual aid.
'';
detailed_first = helpers.defaultNullOpts.mkBool true ''
detailed_first = helpers.defaultNullOpts.mkFlagInt 1 ''
If you want the account completion to be sorted by level of detail/depth instead of
alphabetical, set this option to `true`.
alphabetical, set this option to `1`.
'';
fold_blanks = helpers.defaultNullOpts.mkBool false ''
fold_blanks = helpers.defaultNullOpts.mkFlagInt 0 ''
By default vim will fold ledger transactions, leaving surrounding blank lines unfolded.
You can use this option to hide blank lines following a transaction.
A value of `false` will disable folding of blank lines, `true` will allow folding of a
A value of `0` will disable folding of blank lines, `1` will allow folding of a
single blank line between transactions; any larger value will enable folding
unconditionally.
@ -117,7 +117,7 @@ mkVimPlugin {
Decimal separator.
'';
align_last = helpers.defaultNullOpts.mkBool false ''
align_last = helpers.defaultNullOpts.mkFlagInt 0 ''
Specify alignment on first or last matching separator.
'';
@ -129,11 +129,11 @@ mkVimPlugin {
Default commodity used by `ledger#align_amount_at_cursor()`.
'';
align_commodity = helpers.defaultNullOpts.mkBool false ''
align_commodity = helpers.defaultNullOpts.mkFlagInt 0 ''
Align on the commodity location instead of the amount
'';
commodity_before = helpers.defaultNullOpts.mkBool true ''
commodity_before = helpers.defaultNullOpts.mkFlagInt 1 ''
Flag that tells whether the commodity should be prepended or appended to the amount.
'';
@ -141,7 +141,7 @@ mkVimPlugin {
String to be put between the commodity and the amount:
'';
commodity_spell = helpers.defaultNullOpts.mkBool false ''
commodity_spell = helpers.defaultNullOpts.mkFlagInt 0 ''
Flag that enable the spelling of the amount.
'';
@ -171,15 +171,15 @@ mkVimPlugin {
The format is specified using the standard Ledger syntax for `--format`.
'';
use_location_list = helpers.defaultNullOpts.mkBool false ''
use_location_list = helpers.defaultNullOpts.mkFlagInt 0 ''
Flag that tells whether a location list or a quickfix list should be used:
The default is to use the quickfix window.
Set to `true` to use a location list.
Set to `1` to use a location list.
'';
qf_vertical = helpers.defaultNullOpts.mkBool false ''
qf_vertical = helpers.defaultNullOpts.mkFlagInt 0 ''
Position of the quickfix/location list.
Set to `true` to open the quickfix window in a vertical split.
Set to `1` to open the quickfix window in a vertical split.
'';
qf_size = helpers.defaultNullOpts.mkUnsignedInt 10 ''
@ -189,7 +189,7 @@ mkVimPlugin {
vertical quickfix window.
'';
qf_hide_file = helpers.defaultNullOpts.mkBool true ''
qf_hide_file = helpers.defaultNullOpts.mkFlagInt 1 ''
Flag to show or hide filenames in the quickfix window:
Filenames in the quickfix window are hidden by default. Set this to 1 is
@ -210,8 +210,8 @@ mkVimPlugin {
};
settingsExample = {
detailed_first = true;
fold_blanks = false;
detailed_first = 1;
fold_blanks = 0;
maxwidth = 80;
fillstring = " ";
};

View file

@ -49,25 +49,25 @@ mkVimPlugin {
];
settingsOptions = {
auto_start = helpers.defaultNullOpts.mkBool false ''
auto_start = helpers.defaultNullOpts.mkFlagInt 0 ''
Open the preview window after entering the markdown buffer.
'';
auto_close = helpers.defaultNullOpts.mkBool true ''
auto_close = helpers.defaultNullOpts.mkFlagInt 1 ''
Auto close current preview window when change from markdown buffer to another buffer.
'';
refresh_slow = helpers.defaultNullOpts.mkBool false ''
Refresh markdown when save the buffer or leave from insert mode, default false is auto
refresh_slow = helpers.defaultNullOpts.mkFlagInt 0 ''
Refresh markdown when save the buffer or leave from insert mode, default `0` is auto
refresh markdown as you edit or move the cursor.
'';
command_for_global = helpers.defaultNullOpts.mkBool false ''
command_for_global = helpers.defaultNullOpts.mkFlagInt 0 ''
Enable markdown preview for all files (by default, the plugin is only enabled for markdown
files).
'';
open_to_the_world = helpers.defaultNullOpts.mkBool false ''
open_to_the_world = helpers.defaultNullOpts.mkFlagInt 0 ''
Make the preview server available to others in your network.
By default, the server listens on localhost (127.0.0.1).
'';
@ -82,7 +82,7 @@ mkVimPlugin {
The browser to open the preview page.
'';
echo_preview_url = helpers.defaultNullOpts.mkBool false ''
echo_preview_url = helpers.defaultNullOpts.mkFlagInt 0 ''
Echo preview page url in command line when opening the preview page.
'';
@ -111,7 +111,7 @@ mkVimPlugin {
`mermaid` options.
'';
disable_sync_scroll = helpers.defaultNullOpts.mkBool false ''
disable_sync_scroll = helpers.defaultNullOpts.mkFlagInt 0 ''
Disable sync scroll.
'';
@ -129,7 +129,7 @@ mkVimPlugin {
- "relative": The cursor position is always shown at the relative position of the preview page.
'';
hide_yaml_meta = helpers.defaultNullOpts.mkBool true ''
hide_yaml_meta = helpers.defaultNullOpts.mkFlagInt 1 ''
Hide yaml metadata.
'';
@ -141,11 +141,11 @@ mkVimPlugin {
`flowcharts` diagrams options.
'';
content_editable = helpers.defaultNullOpts.mkBool false ''
content_editable = helpers.defaultNullOpts.mkFlagInt 0 ''
Content editable from the preview page.
'';
disable_filename = helpers.defaultNullOpts.mkBool false ''
disable_filename = helpers.defaultNullOpts.mkFlagInt 0 ''
Disable filename header for the preview page.
'';
@ -195,27 +195,27 @@ mkVimPlugin {
pluginDefault = literalMD "chosen based on system preferences";
};
combine_preview = helpers.defaultNullOpts.mkBool false ''
combine_preview = helpers.defaultNullOpts.mkFlagInt 0 ''
Combine preview window.
If enable it will reuse previous opened preview window when you preview markdown file.
Ensure to set `auto_close = false` if you have enable this option.
Ensure to set `auto_close = 0` if you have enable this option.
'';
combine_preview_auto_refresh = helpers.defaultNullOpts.mkBool true ''
combine_preview_auto_refresh = helpers.defaultNullOpts.mkFlagInt 1 ''
Auto refetch combine preview contents when change markdown buffer only when
`combine_preview` is `true`.
`combine_preview` is `1`.
'';
};
settingsExample = {
auto_start = true;
auto_close = true;
auto_start = 1;
auto_close = 1;
browser = "firefox";
echo_preview_url = true;
echo_preview_url = 1;
preview_options = {
disable_sync_scroll = true;
disable_sync_scroll = 1;
sync_scroll_type = "middle";
disable_filename = true;
disable_filename = 1;
};
markdown_css = "/Users/username/markdown.css";
highlight_css.__raw = "vim.fn.expand('~/highlight.css')";

View file

@ -62,20 +62,20 @@ helpers.vim-plugin.mkVimPlugin {
Specifies pdf viewer that `typst watch --open` will use.
'';
conceal_math = helpers.defaultNullOpts.mkBool false ''
conceal_math = helpers.defaultNullOpts.mkFlagInt 0 ''
Enable concealment for math symbols in math mode (i.e. replaces symbols with their actual
unicode character).
Warning: this can affect performance
'';
auto_close_toc = helpers.defaultNullOpts.mkBool false ''
auto_close_toc = helpers.defaultNullOpts.mkFlagInt 0 ''
Specifies whether TOC will be automatically closed after using it.
'';
};
settingsExample = {
cmd = "typst";
conceal_math = true;
auto_close_toc = true;
conceal_math = 1;
auto_close_toc = 1;
};
}

View file

@ -42,7 +42,7 @@ mkVimPlugin {
The vim terminal command to execute.
'';
no_mappings = helpers.defaultNullOpts.mkBool false ''
no_mappings = helpers.defaultNullOpts.mkFlagInt 0 ''
Whether to disable the default mappings.
'';
@ -52,7 +52,7 @@ mkVimPlugin {
whimrepl does not require or support this setting.
'';
preserve_curpos = helpers.defaultNullOpts.mkBool true ''
preserve_curpos = helpers.defaultNullOpts.mkFlagInt 1 ''
Whether to preserve cursor position when sending a line or paragraph.
'';
@ -76,11 +76,11 @@ mkVimPlugin {
```
'';
dont_ask_default = helpers.defaultNullOpts.mkBool false ''
dont_ask_default = helpers.defaultNullOpts.mkFlagInt 0 ''
Whether to bypass the prompt and use the specified default configuration options.
'';
bracketed_paste = helpers.defaultNullOpts.mkBool false ''
bracketed_paste = helpers.defaultNullOpts.mkFlagInt 0 ''
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
@ -92,14 +92,14 @@ mkVimPlugin {
settingsExample = {
target = "screen";
vimterminal_cmd = null;
no_mappings = false;
no_mappings = 0;
paste_file = "$HOME/.slime_paste";
preserve_curpos = true;
preserve_curpos = 1;
default_config = {
socket_name = "default";
target_pane = "{last}";
};
dont_ask_default = false;
bracketed_paste = false;
dont_ask_default = 0;
bracketed_paste = 0;
};
}

View file

@ -32,13 +32,13 @@ mkVimPlugin {
];
settingsOptions = {
fmt_autosave = helpers.defaultNullOpts.mkBool true ''
fmt_autosave = helpers.defaultNullOpts.mkFlagInt 1 ''
This plugin enables automatic code formatting on save by default using zig fmt.
To disable it, you can set this option to `false`.
To disable it, you can set this option to `0`.
'';
};
settingsExample = {
fmt_autosave = false;
fmt_autosave = 0;
};
}