mirror of
https://github.com/nix-community/nixvim.git
synced 2025-11-08 11:36:07 +01:00
Compare commits
5 commits
de1760ddfd
...
aa3a1dfb02
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
aa3a1dfb02 | ||
|
|
77511e1915 | ||
|
|
2219f852d0 | ||
|
|
0dd3843bd6 | ||
|
|
044a9d1ab8 |
5 changed files with 5 additions and 654 deletions
|
|
@ -1,79 +1,13 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
helpers,
|
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib;
|
|
||||||
lib.nixvim.plugins.mkNeovimPlugin {
|
lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
name = "cloak";
|
name = "cloak";
|
||||||
package = "cloak-nvim";
|
package = "cloak-nvim";
|
||||||
description = "Cloak allows you to overlay *'s over defined patterns.";
|
description = "Cloak allows you to overlay *'s over defined patterns.";
|
||||||
|
|
||||||
maintainers = [ maintainers.GaetanLepage ];
|
maintainers = [ lib.maintainers.GaetanLepage ];
|
||||||
|
|
||||||
settingsOptions = {
|
|
||||||
enabled = helpers.defaultNullOpts.mkBool true ''
|
|
||||||
Whether to enable the plugin.
|
|
||||||
'';
|
|
||||||
|
|
||||||
cloak_character = helpers.defaultNullOpts.mkStr "*" ''
|
|
||||||
Define the cloak character.
|
|
||||||
'';
|
|
||||||
|
|
||||||
highlight_group = helpers.defaultNullOpts.mkStr "Comment" ''
|
|
||||||
The applied highlight group (colors) on the cloaking, see `:h highlight`.
|
|
||||||
'';
|
|
||||||
|
|
||||||
cloak_length = helpers.mkNullOrOption types.ints.unsigned ''
|
|
||||||
Provide a number if you want to hide the true length of the value.
|
|
||||||
Applies the length of the replacement characters for all matched patterns, defaults to the
|
|
||||||
length of the matched pattern.
|
|
||||||
'';
|
|
||||||
|
|
||||||
try_all_patterns = helpers.defaultNullOpts.mkBool true ''
|
|
||||||
Whether it should try every pattern to find the best fit or stop after the first.
|
|
||||||
'';
|
|
||||||
|
|
||||||
cloak_telescope = helpers.defaultNullOpts.mkBool true ''
|
|
||||||
Set to true to cloak Telescope preview buffers.
|
|
||||||
(Required feature not in 0.1.x)
|
|
||||||
'';
|
|
||||||
|
|
||||||
patterns =
|
|
||||||
helpers.defaultNullOpts.mkListOf
|
|
||||||
(types.submodule {
|
|
||||||
options = {
|
|
||||||
file_pattern = helpers.defaultNullOpts.mkNullable (with types; either str (listOf str)) ".env*" ''
|
|
||||||
One or several patterns to match against.
|
|
||||||
They should be valid autocommand patterns.
|
|
||||||
'';
|
|
||||||
|
|
||||||
cloak_pattern = helpers.defaultNullOpts.mkNullable (with types; either str (listOf str)) "=.+" ''
|
|
||||||
One or several patterns to cloak.
|
|
||||||
|
|
||||||
Example: `[":.+" "-.+"]` for yaml files.
|
|
||||||
'';
|
|
||||||
|
|
||||||
replace = helpers.mkNullOrOption types.anything ''
|
|
||||||
A function, table or string to generate the replacement.
|
|
||||||
The actual replacement will contain the `cloak_character` where it doesn't cover
|
|
||||||
the original text.
|
|
||||||
If left empty the legacy behavior of keeping the first character is retained.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
})
|
|
||||||
[
|
|
||||||
{
|
|
||||||
|
|
||||||
file_pattern = ".env*";
|
|
||||||
cloak_pattern = "=.+";
|
|
||||||
replace = null;
|
|
||||||
}
|
|
||||||
]
|
|
||||||
''
|
|
||||||
List of pattern configurations.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
settingsExample = {
|
settingsExample = {
|
||||||
enabled = true;
|
enabled = true;
|
||||||
|
|
|
||||||
|
|
@ -2,12 +2,6 @@
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
|
||||||
inherit (lib) types;
|
|
||||||
inherit (lib.nixvim) defaultNullOpts;
|
|
||||||
|
|
||||||
dapHelpers = import ../dap/dapHelpers.nix { inherit lib; };
|
|
||||||
in
|
|
||||||
lib.nixvim.plugins.mkNeovimPlugin {
|
lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
name = "dap-go";
|
name = "dap-go";
|
||||||
package = "nvim-dap-go";
|
package = "nvim-dap-go";
|
||||||
|
|
@ -15,30 +9,6 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
|
|
||||||
maintainers = [ lib.maintainers.khaneliman ];
|
maintainers = [ lib.maintainers.khaneliman ];
|
||||||
|
|
||||||
settingsOptions = {
|
|
||||||
dap_configurations = lib.nixvim.mkNullOrOption (types.listOf dapHelpers.configurationType) ''
|
|
||||||
Additional dap configurations.
|
|
||||||
See `:h dap-configuration` for more detail.
|
|
||||||
'';
|
|
||||||
|
|
||||||
delve = {
|
|
||||||
path = defaultNullOpts.mkStr "dlv" "The path to the executable dlv which will be used for debugging.";
|
|
||||||
|
|
||||||
initialize_timeout_sec = defaultNullOpts.mkUnsignedInt 20 "Time to wait for delve to initialize the debug session.";
|
|
||||||
|
|
||||||
port = defaultNullOpts.mkStr "$${port}" ''
|
|
||||||
A string that defines the port to start delve debugger.
|
|
||||||
|
|
||||||
Defaults to string "$${port}" which instructs dap
|
|
||||||
to start the process in a random available port.
|
|
||||||
'';
|
|
||||||
|
|
||||||
args = lib.nixvim.mkNullOrOption (types.listOf types.str) "Additional args to pass to dlv.";
|
|
||||||
|
|
||||||
build_flags = defaultNullOpts.mkStr "" "Build flags to pass to dlv.";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# Manually supplied to nvim-dap config module
|
# Manually supplied to nvim-dap config module
|
||||||
callSetup = false;
|
callSetup = false;
|
||||||
extraConfig = cfg: {
|
extraConfig = cfg: {
|
||||||
|
|
|
||||||
|
|
@ -1,65 +1,9 @@
|
||||||
lib:
|
lib:
|
||||||
let
|
let
|
||||||
inherit (lib) types;
|
inherit (lib.nixvim) defaultNullOpts;
|
||||||
inherit (lib.nixvim)
|
|
||||||
defaultNullOpts
|
|
||||||
mkNullOrOption'
|
|
||||||
mkNullOrOption
|
|
||||||
literalLua
|
|
||||||
;
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
ui = {
|
|
||||||
border = defaultNullOpts.mkBorder' {
|
|
||||||
pluginDefault = "single";
|
|
||||||
example = "rounded";
|
|
||||||
name = "all floating windows";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
decorations = {
|
|
||||||
statusline = {
|
|
||||||
app_version = defaultNullOpts.mkBool false ''
|
|
||||||
Set to true to be able use the `flutter_tools_decorations.app_version` in your statusline.
|
|
||||||
|
|
||||||
This will show the current version of the flutter app from the `pubspec.yaml` file.
|
|
||||||
'';
|
|
||||||
|
|
||||||
device = defaultNullOpts.mkBool false ''
|
|
||||||
Set to true to be able use the `flutter_tools_decorations.device` in your statusline.
|
|
||||||
|
|
||||||
This will show the currently running device if an application was started with a specific
|
|
||||||
device.
|
|
||||||
'';
|
|
||||||
|
|
||||||
project_config = defaultNullOpts.mkBool false ''
|
|
||||||
Set to true to be able use the `flutter_tools_decorations.project_config` in your
|
|
||||||
statusline.
|
|
||||||
|
|
||||||
This will show the currently selected project configuration.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
debugger = {
|
debugger = {
|
||||||
enabled = defaultNullOpts.mkBool false ''
|
|
||||||
Enable `nvim-dap` integration.
|
|
||||||
'';
|
|
||||||
|
|
||||||
exception_breakpoints = defaultNullOpts.mkListOf types.anything null ''
|
|
||||||
If empty, dap will not stop on any exceptions.
|
|
||||||
Otherwise it will stop on those specified.
|
|
||||||
|
|
||||||
See `|:help dap.set_exception_breakpoints()|` for more information.
|
|
||||||
'';
|
|
||||||
|
|
||||||
evaluate_to_string_in_debug_views = defaultNullOpts.mkBool true ''
|
|
||||||
Whether to call `toString()` on objects in debug views like hovers and the variables list.
|
|
||||||
|
|
||||||
Invoking `toString()` has a performance cost and may introduce side-effects, although users
|
|
||||||
may expect this functionality.
|
|
||||||
'';
|
|
||||||
|
|
||||||
register_configurations = defaultNullOpts.mkRaw' {
|
register_configurations = defaultNullOpts.mkRaw' {
|
||||||
pluginDefault = null;
|
pluginDefault = null;
|
||||||
example = ''
|
example = ''
|
||||||
|
|
@ -77,80 +21,7 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
flutter_path = defaultNullOpts.mkStr' {
|
|
||||||
pluginDefault = null;
|
|
||||||
example = "<full/path/if/needed>";
|
|
||||||
description = ''
|
|
||||||
Absolute path to the `flutter` binary.
|
|
||||||
|
|
||||||
This takes priority over the `flutter_lookup_cmd`.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
flutter_lookup_cmd = defaultNullOpts.mkStr' {
|
|
||||||
pluginDefault = literalLua ''
|
|
||||||
function get_default_lookup()
|
|
||||||
local exepath = fn.exepath("flutter")
|
|
||||||
local is_snap_installation = exepath and exepath:match("snap") or false
|
|
||||||
return (path.is_linux and is_snap_installation) and "flutter sdk-path" or nil
|
|
||||||
end
|
|
||||||
'';
|
|
||||||
example = "dirname $(which flutter)";
|
|
||||||
description = ''
|
|
||||||
The command used to find the directory where flutter is installed.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
root_patterns = defaultNullOpts.mkListOf types.str [ ".git" "pubspec.yaml" ] ''
|
|
||||||
Patterns to find the root of your flutter project.
|
|
||||||
'';
|
|
||||||
|
|
||||||
fvm = defaultNullOpts.mkBool false ''
|
|
||||||
Takes priority over path, uses `<workspace>/.fvm/flutter_sdk` if enabled.
|
|
||||||
'';
|
|
||||||
|
|
||||||
widget_guides = {
|
|
||||||
enabled = defaultNullOpts.mkBool false ''
|
|
||||||
Whether to enable widget guides.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
closing_tags = {
|
|
||||||
highlight = defaultNullOpts.mkStr' {
|
|
||||||
example = "ErrorMsg";
|
|
||||||
pluginDefault = "Comment";
|
|
||||||
description = ''
|
|
||||||
Highlight group for the closing tag.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
prefix = defaultNullOpts.mkStr' {
|
|
||||||
pluginDefault = "// ";
|
|
||||||
example = ">";
|
|
||||||
description = ''
|
|
||||||
Character to use for close tag.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
priority = defaultNullOpts.mkUnsignedInt 10 ''
|
|
||||||
Priority of virtual text in current line.
|
|
||||||
|
|
||||||
Consider to configure this when there is a possibility of multiple virtual text items in one
|
|
||||||
line.
|
|
||||||
|
|
||||||
See `priority` option in `|:help nvim_buf_set_extmark|` for more information.
|
|
||||||
'';
|
|
||||||
|
|
||||||
enabled = defaultNullOpts.mkBool true ''
|
|
||||||
Set to `false` to disable closing tags.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
dev_log = {
|
dev_log = {
|
||||||
enabled = defaultNullOpts.mkBool true ''
|
|
||||||
Whether to enable `dev_log`.
|
|
||||||
'';
|
|
||||||
|
|
||||||
filter = defaultNullOpts.mkRaw null ''
|
filter = defaultNullOpts.mkRaw null ''
|
||||||
Optional callback to filter the log.
|
Optional callback to filter the log.
|
||||||
|
|
||||||
|
|
@ -158,120 +29,5 @@ in
|
||||||
|
|
||||||
The `log_line` is only added to the output if the function returns `true`.
|
The `log_line` is only added to the output if the function returns `true`.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
notify_errors = defaultNullOpts.mkBool false ''
|
|
||||||
Whether notify the user when there is an error whilst running.
|
|
||||||
'';
|
|
||||||
|
|
||||||
open_cmd = defaultNullOpts.mkStr' {
|
|
||||||
example = "15split";
|
|
||||||
pluginDefault = literalLua "('botright %dvnew'):format(math.max(vim.o.columns * 0.4, 50))";
|
|
||||||
description = ''
|
|
||||||
Command to use to open the log buffer.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
focus_on_open = defaultNullOpts.mkBool true ''
|
|
||||||
Whether to focus on the newly opened log window.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
dev_tools = {
|
|
||||||
autostart = defaultNullOpts.mkBool false ''
|
|
||||||
Whether to autostart `devtools` server if not detected.
|
|
||||||
'';
|
|
||||||
|
|
||||||
auto_open_browser = defaultNullOpts.mkBool false ''
|
|
||||||
Automatically opens `devtools` in the browser.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
outline = {
|
|
||||||
open_cmd = defaultNullOpts.mkStr' {
|
|
||||||
pluginDefault = literalLua "('botright %dvnew'):format(math.max(vim.o.columns * 0.3, 40))";
|
|
||||||
example = "30vnew";
|
|
||||||
description = ''
|
|
||||||
Command to use to open the outline buffer.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
auto_open = defaultNullOpts.mkBool false ''
|
|
||||||
If `true` this will open the outline automatically when it is first populated.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
lsp = {
|
|
||||||
color = {
|
|
||||||
enabled = defaultNullOpts.mkBool false ''
|
|
||||||
Show the derived colors for dart variables.
|
|
||||||
Set this to `true` to enable color variables highlighting (only supported on
|
|
||||||
flutter >= 2.10).
|
|
||||||
'';
|
|
||||||
|
|
||||||
background = defaultNullOpts.mkBool false ''
|
|
||||||
Whether to highlight the background.
|
|
||||||
'';
|
|
||||||
|
|
||||||
background_color = defaultNullOpts.mkNullable' {
|
|
||||||
type = with types; either str (attrsOf ints.unsigned);
|
|
||||||
pluginDefault = null;
|
|
||||||
example = {
|
|
||||||
r = 19;
|
|
||||||
g = 17;
|
|
||||||
b = 24;
|
|
||||||
};
|
|
||||||
description = ''
|
|
||||||
Background color.
|
|
||||||
Required, when background is transparent.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
foreground = defaultNullOpts.mkBool false ''
|
|
||||||
Whether to highlight the foreground.
|
|
||||||
'';
|
|
||||||
|
|
||||||
virtual_text = defaultNullOpts.mkBool true ''
|
|
||||||
Whether to show the highlight using virtual text.
|
|
||||||
'';
|
|
||||||
|
|
||||||
virtual_text_str = defaultNullOpts.mkStr "■" ''
|
|
||||||
The virtual text character to highlight.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
on_attach = mkNullOrOption types.rawLua ''
|
|
||||||
Provide a custom `on_attach` function.
|
|
||||||
'';
|
|
||||||
|
|
||||||
capabilities = mkNullOrOption' {
|
|
||||||
type = types.rawLua;
|
|
||||||
example = literalLua ''
|
|
||||||
function(config)
|
|
||||||
config.specificThingIDontWant = false
|
|
||||||
return config
|
|
||||||
end
|
|
||||||
'';
|
|
||||||
description = ''
|
|
||||||
Provide a custom value for `capabilities`.
|
|
||||||
Example: `lsp_status` capabilities.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
settings = mkNullOrOption' {
|
|
||||||
type = with types; attrsOf anything;
|
|
||||||
example = {
|
|
||||||
showTodos = true;
|
|
||||||
completeFunctionCalls = true;
|
|
||||||
analysisExcludedFolders = [ "<path-to-flutter-sdk-packages>" ];
|
|
||||||
renameFilesWithClasses = "prompt";
|
|
||||||
enableSnippets = true;
|
|
||||||
updateImportsOnRename = true;
|
|
||||||
};
|
|
||||||
description = ''
|
|
||||||
Settings for the dart language server.
|
|
||||||
See [here](https://github.com/dart-lang/sdk/blob/master/pkg/analysis_server/tool/lsp_spec/README.md#client-workspace-configuration)
|
|
||||||
for details on each option.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,17 +1,14 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
helpers,
|
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib;
|
lib.nixvim.plugins.mkVimPlugin {
|
||||||
with lib.nixvim.plugins;
|
|
||||||
mkVimPlugin {
|
|
||||||
name = "ledger";
|
name = "ledger";
|
||||||
package = "vim-ledger";
|
package = "vim-ledger";
|
||||||
globalPrefix = "ledger_";
|
globalPrefix = "ledger_";
|
||||||
description = "Filetype detection, syntax highlighting, auto-formatting, auto-completion, and other tools for working with ledger files.";
|
description = "Filetype detection, syntax highlighting, auto-formatting, auto-completion, and other tools for working with ledger files.";
|
||||||
|
|
||||||
maintainers = [ maintainers.GaetanLepage ];
|
maintainers = [ lib.maintainers.GaetanLepage ];
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
# TODO: added 2025-04-07, remove after 25.05
|
# TODO: added 2025-04-07, remove after 25.05
|
||||||
|
|
@ -23,163 +20,6 @@ mkVimPlugin {
|
||||||
|
|
||||||
dependencies = [ "ledger" ];
|
dependencies = [ "ledger" ];
|
||||||
|
|
||||||
settingsOptions = {
|
|
||||||
bin = helpers.mkNullOrStr ''
|
|
||||||
Path to the `ledger` executable.
|
|
||||||
'';
|
|
||||||
|
|
||||||
is_hledger = helpers.mkNullOrOption types.bool ''
|
|
||||||
Whether to use ledger or hledger specific features.
|
|
||||||
Setting this value is optional and in most coses will be guessed correctly based on `bin`,
|
|
||||||
but in the event it isn't guessed correctly or you want to use different syntax features
|
|
||||||
even with your default tooling setup for the other engine this flag can be set to override
|
|
||||||
the value.
|
|
||||||
'';
|
|
||||||
|
|
||||||
extra_options = helpers.defaultNullOpts.mkStr "" ''
|
|
||||||
Additional default options for the `ledger` executable.
|
|
||||||
'';
|
|
||||||
|
|
||||||
accounts_cmd = helpers.mkNullOrStr ''
|
|
||||||
To use a custom external system command to generate a list of account names for completion,
|
|
||||||
set the following.
|
|
||||||
If `bin` is set, this will default to running that command with arguments to parse the
|
|
||||||
current file using the accounts subcommand (works with ledger or hledger), otherwise it will
|
|
||||||
parse the postings in the current file itself.
|
|
||||||
'';
|
|
||||||
|
|
||||||
descriptions_cmd = helpers.mkNullOrStr ''
|
|
||||||
To use a custom external system command to generate a list of descriptions for completion,
|
|
||||||
set the following.
|
|
||||||
If `bin` is set, this will default to running that command with arguments to parse the
|
|
||||||
current file using the descriptions subcommand (works with ledger or hledger), otherwise it
|
|
||||||
will parse the transactions in the current file itself.
|
|
||||||
'';
|
|
||||||
|
|
||||||
maxwidth = helpers.defaultNullOpts.mkUnsignedInt 0 ''
|
|
||||||
Number of columns that will be used to display the foldtext.
|
|
||||||
Set this when you think that the amount is too far off to the right.
|
|
||||||
When `maxwidth` is zero, the amount will be displayed at the far right side of the screen.
|
|
||||||
'';
|
|
||||||
|
|
||||||
fillstring = helpers.defaultNullOpts.mkStr " " ''
|
|
||||||
String that will be used to fill the space between account name and amount in the foldtext.
|
|
||||||
Set this to get some kind of lines or visual aid.
|
|
||||||
'';
|
|
||||||
|
|
||||||
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 `1`.
|
|
||||||
'';
|
|
||||||
|
|
||||||
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 `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.
|
|
||||||
|
|
||||||
Note that only lines containing no trailing spaces are considered for folding.
|
|
||||||
You can take advantage of this to disable this feature on a case-by-case basis.
|
|
||||||
'';
|
|
||||||
|
|
||||||
decimal_sep = helpers.defaultNullOpts.mkStr "." ''
|
|
||||||
Decimal separator.
|
|
||||||
'';
|
|
||||||
|
|
||||||
align_last = helpers.defaultNullOpts.mkFlagInt 0 ''
|
|
||||||
Specify alignment on first or last matching separator.
|
|
||||||
'';
|
|
||||||
|
|
||||||
align_at = helpers.defaultNullOpts.mkUnsignedInt 60 ''
|
|
||||||
Specify at which column decimal separators should be aligned.
|
|
||||||
'';
|
|
||||||
|
|
||||||
default_commodity = helpers.defaultNullOpts.mkStr "" ''
|
|
||||||
Default commodity used by `ledger#align_amount_at_cursor()`.
|
|
||||||
'';
|
|
||||||
|
|
||||||
align_commodity = helpers.defaultNullOpts.mkFlagInt 0 ''
|
|
||||||
Align on the commodity location instead of the amount
|
|
||||||
'';
|
|
||||||
|
|
||||||
commodity_before = helpers.defaultNullOpts.mkFlagInt 1 ''
|
|
||||||
Flag that tells whether the commodity should be prepended or appended to the amount.
|
|
||||||
'';
|
|
||||||
|
|
||||||
commodity_sep = helpers.defaultNullOpts.mkStr "" ''
|
|
||||||
String to be put between the commodity and the amount:
|
|
||||||
'';
|
|
||||||
|
|
||||||
commodity_spell = helpers.defaultNullOpts.mkFlagInt 0 ''
|
|
||||||
Flag that enable the spelling of the amount.
|
|
||||||
'';
|
|
||||||
|
|
||||||
date_format = helpers.defaultNullOpts.mkStr "%Y/%m/%d" ''
|
|
||||||
Format of transaction date.
|
|
||||||
'';
|
|
||||||
|
|
||||||
main = helpers.defaultNullOpts.mkStr "%" ''
|
|
||||||
The file to be used to generate reports.
|
|
||||||
The default is to use the current file.
|
|
||||||
'';
|
|
||||||
|
|
||||||
winpos = helpers.defaultNullOpts.mkStr "B" ''
|
|
||||||
Position of a report buffer.
|
|
||||||
|
|
||||||
Use `b` for bottom, `t` for top, `l` for left, `r` for right.
|
|
||||||
Use uppercase letters if you want the window to always occupy the full width or height.
|
|
||||||
'';
|
|
||||||
|
|
||||||
qf_register_format = helpers.mkNullOrStr ''
|
|
||||||
Format of quickfix register reports (see `|:Register|`).
|
|
||||||
The format is specified using the standard Ledger syntax for `--format`.
|
|
||||||
'';
|
|
||||||
|
|
||||||
qf_reconcile_format = helpers.mkNullOrStr ''
|
|
||||||
Format of the reconcile quickfix window (see `|:Reconcile|`).
|
|
||||||
The format is specified using the standard Ledger syntax for `--format`.
|
|
||||||
'';
|
|
||||||
|
|
||||||
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 `1` to use a location list.
|
|
||||||
'';
|
|
||||||
|
|
||||||
qf_vertical = helpers.defaultNullOpts.mkFlagInt 0 ''
|
|
||||||
Position of the quickfix/location list.
|
|
||||||
Set to `1` to open the quickfix window in a vertical split.
|
|
||||||
'';
|
|
||||||
|
|
||||||
qf_size = helpers.defaultNullOpts.mkUnsignedInt 10 ''
|
|
||||||
Size of the quickfix window.
|
|
||||||
|
|
||||||
This is the number of lines of a horizontal quickfix window, or the number of columns of a
|
|
||||||
vertical quickfix window.
|
|
||||||
'';
|
|
||||||
|
|
||||||
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
|
|
||||||
you want filenames to be visible.
|
|
||||||
'';
|
|
||||||
|
|
||||||
cleared_string = helpers.defaultNullOpts.mkStr "Cleared: " ''
|
|
||||||
Text of the output of the `|:Balance|` command.
|
|
||||||
'';
|
|
||||||
|
|
||||||
pending_string = helpers.defaultNullOpts.mkStr "Cleared or pending: " ''
|
|
||||||
Text of the output of the `|:Balance|` command.
|
|
||||||
'';
|
|
||||||
|
|
||||||
target_string = helpers.defaultNullOpts.mkStr "Difference from target: " ''
|
|
||||||
Text of the output of the `|:Balance|` command.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
settingsExample = {
|
settingsExample = {
|
||||||
detailed_first = 1;
|
detailed_first = 1;
|
||||||
fold_blanks = 0;
|
fold_blanks = 0;
|
||||||
|
|
|
||||||
|
|
@ -1,162 +1,13 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
helpers,
|
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib;
|
|
||||||
lib.nixvim.plugins.mkNeovimPlugin {
|
lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
name = "neocord";
|
name = "neocord";
|
||||||
description = "Discord Rich Presence for Neovim (Fork of presence.nvim).";
|
description = "Discord Rich Presence for Neovim (Fork of presence.nvim).";
|
||||||
|
|
||||||
maintainers = [ ];
|
maintainers = [ ];
|
||||||
|
|
||||||
settingsOptions = {
|
|
||||||
# General options.
|
|
||||||
auto_update = helpers.defaultNullOpts.mkBool true ''
|
|
||||||
Update activity based on autocmd events.
|
|
||||||
If `false`, map or manually execute
|
|
||||||
`:lua package.loaded.neocord:update()`
|
|
||||||
'';
|
|
||||||
|
|
||||||
logo = helpers.defaultNullOpts.mkStr "auto" ''
|
|
||||||
Update the Logo to the specified option ("auto" or url).
|
|
||||||
'';
|
|
||||||
|
|
||||||
logo_tooltip = helpers.mkNullOrStr ''
|
|
||||||
Sets the logo tooltip
|
|
||||||
'';
|
|
||||||
|
|
||||||
main_image =
|
|
||||||
helpers.defaultNullOpts.mkEnumFirstDefault
|
|
||||||
[
|
|
||||||
"language"
|
|
||||||
"logo"
|
|
||||||
]
|
|
||||||
''
|
|
||||||
Main image display (either "language" or "logo")
|
|
||||||
'';
|
|
||||||
|
|
||||||
client_id = helpers.defaultNullOpts.mkStr "1157438221865717891" ''
|
|
||||||
Use your own Discord application client id. (not recommended)
|
|
||||||
'';
|
|
||||||
|
|
||||||
log_level =
|
|
||||||
helpers.defaultNullOpts.mkEnum
|
|
||||||
[
|
|
||||||
"debug"
|
|
||||||
"info"
|
|
||||||
"warn"
|
|
||||||
"error"
|
|
||||||
]
|
|
||||||
null
|
|
||||||
''
|
|
||||||
Log messages at or above this level.
|
|
||||||
'';
|
|
||||||
|
|
||||||
debounce_timeout = helpers.defaultNullOpts.mkInt 10 ''
|
|
||||||
Number of seconds to debounce events.
|
|
||||||
(or calls to `:lua package.loaded.neocord:update(<filename>, true)`)
|
|
||||||
'';
|
|
||||||
|
|
||||||
enable_line_number = helpers.defaultNullOpts.mkBool false ''
|
|
||||||
Displays the current line number instead of the current project.
|
|
||||||
'';
|
|
||||||
|
|
||||||
blacklist = helpers.defaultNullOpts.mkListOf types.str [ ] ''
|
|
||||||
A list of strings or Lua patterns that disable Rich Presence if the
|
|
||||||
current file name, path, or workspace matches.
|
|
||||||
'';
|
|
||||||
|
|
||||||
buttons =
|
|
||||||
helpers.defaultNullOpts.mkListOf
|
|
||||||
(
|
|
||||||
with types;
|
|
||||||
submodule {
|
|
||||||
options = {
|
|
||||||
label = helpers.mkNullOrStr "";
|
|
||||||
url = helpers.mkNullOrStr "";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
)
|
|
||||||
[ ]
|
|
||||||
''
|
|
||||||
Button configurations which will always appear in Rich Presence.
|
|
||||||
Can be a list of attribute sets, each with the following attributes:
|
|
||||||
`label`: The label of the button. e.g. `"GitHub Profile"`.
|
|
||||||
`url`: The URL the button leads to. e.g. `"https://github.com/<NAME>"`.
|
|
||||||
Can also be a lua function: `function(buffer: string, repo_url: string|nil): table`
|
|
||||||
'';
|
|
||||||
|
|
||||||
file_assets = helpers.mkNullOrOption (with types; attrsOf (listOf str)) ''
|
|
||||||
Custom file asset definitions keyed by file names and extensions.
|
|
||||||
List elements for each attribute (filetype):
|
|
||||||
`name`: The name of the asset shown as the title of the file in Discord.
|
|
||||||
`source`: The source of the asset, either an art asset key or the URL of an image asset.
|
|
||||||
Example:
|
|
||||||
```nix
|
|
||||||
{
|
|
||||||
# Use art assets uploaded in Discord application for the configured client id
|
|
||||||
js = [ "JavaScript" "javascript" ];
|
|
||||||
ts = [ "TypeScript" "typescript" ];
|
|
||||||
# Use image URLs
|
|
||||||
rs = [ "Rust" "https://www.rust-lang.org/logos/rust-logo-512x512.png" ];
|
|
||||||
go = [ "Go" "https://go.dev/blog/go-brand/Go-Logo/PNG/Go-Logo_Aqua.png" ];
|
|
||||||
};
|
|
||||||
```
|
|
||||||
'';
|
|
||||||
|
|
||||||
show_time = helpers.defaultNullOpts.mkBool true "Show the timer.";
|
|
||||||
|
|
||||||
global_timer = helpers.defaultNullOpts.mkBool false "if set true, timer won't update when any event are triggered.";
|
|
||||||
|
|
||||||
# Rich presence text options.
|
|
||||||
editing_text = helpers.defaultNullOpts.mkStr "Editing %s" ''
|
|
||||||
String rendered when an editable file is loaded in the buffer.
|
|
||||||
Can also be a lua function:
|
|
||||||
`function(filename: string): string`
|
|
||||||
'';
|
|
||||||
|
|
||||||
file_explorer_text = helpers.defaultNullOpts.mkStr "Browsing %s" ''
|
|
||||||
String rendered when browsing a file explorer.
|
|
||||||
Can also be a lua function:
|
|
||||||
`function(file_explorer_name: string): string`
|
|
||||||
'';
|
|
||||||
|
|
||||||
git_commit_text = helpers.defaultNullOpts.mkStr "Committing changes" ''
|
|
||||||
String rendered when committing changes in git.
|
|
||||||
Can also be a lua function:
|
|
||||||
`function(filename: string): string`
|
|
||||||
'';
|
|
||||||
|
|
||||||
plugin_manager_text = helpers.defaultNullOpts.mkStr "Managing plugins" ''
|
|
||||||
String rendered when managing plugins.
|
|
||||||
Can also be a lua function:
|
|
||||||
`function(plugin_manager_name: string): string`
|
|
||||||
'';
|
|
||||||
|
|
||||||
reading_text = helpers.defaultNullOpts.mkStr "Reading %s" ''
|
|
||||||
String rendered when a read-only/unmodifiable file is loaded into the buffer.
|
|
||||||
Can also be a lua function:
|
|
||||||
`function(filename: string): string`
|
|
||||||
'';
|
|
||||||
|
|
||||||
workspace_text = helpers.defaultNullOpts.mkStr "Working on %s" ''
|
|
||||||
String rendered when in a git repository.
|
|
||||||
Can also be a lua function:
|
|
||||||
`function(project_name: string|nil, filename: string): string`
|
|
||||||
'';
|
|
||||||
|
|
||||||
line_number_text = helpers.defaultNullOpts.mkStr "Line %s out of %s" ''
|
|
||||||
String rendered when `enableLineNumber` is set to `true` to display the current line number.
|
|
||||||
Can also be a lua function:
|
|
||||||
`function(line_number: number, line_count: number): string`
|
|
||||||
'';
|
|
||||||
|
|
||||||
terminal_text = helpers.defaultNullOpts.mkStr "Using Terminal" ''
|
|
||||||
Format string rendered when in terminal mode.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
settingsExample = {
|
settingsExample = {
|
||||||
# General options
|
# General options
|
||||||
auto_update = true;
|
auto_update = true;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue