2024-01-05 16:24:02 +00:00
|
|
|
{lib, ...}: let
|
2024-03-24 00:14:39 +00:00
|
|
|
inherit (lib.modules) mkRemovedOptionModule;
|
|
|
|
inherit (lib.options) mkEnableOption mkOption literalExpression;
|
|
|
|
inherit (lib.types) bool int str enum nullOr listOf;
|
2023-11-07 00:50:27 +00:00
|
|
|
in {
|
2024-01-05 16:24:02 +00:00
|
|
|
imports = [
|
|
|
|
(mkRemovedOptionModule ["vim" "presence" "presence-nvim"] ''
|
|
|
|
The option vim.presence.presence-nvim has been deprecated in favor of the new neocord module.
|
|
|
|
Options provided by the plugin remain mostly the same, but manual migration is required.
|
2023-02-18 12:32:43 +00:00
|
|
|
|
2024-01-05 16:24:02 +00:00
|
|
|
Please see neocord documentation and the neovim-flake options for more info
|
|
|
|
'')
|
|
|
|
];
|
|
|
|
|
|
|
|
options.vim.presence.neocord = {
|
|
|
|
enable = mkEnableOption "neocord plugin for discord rich presence";
|
|
|
|
|
|
|
|
logo = mkOption {
|
2024-03-24 00:14:39 +00:00
|
|
|
type = str; # TODO: can the default be documented better, maybe with an enum?
|
2024-01-05 16:24:02 +00:00
|
|
|
default = "auto";
|
|
|
|
description = ''
|
|
|
|
Logo to be displayed on the RPC item
|
|
|
|
|
|
|
|
This must be either "auto" or an URL to your image of choice
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
logo_tooltip = mkOption {
|
2024-03-24 00:14:39 +00:00
|
|
|
type = str;
|
2023-02-18 12:32:43 +00:00
|
|
|
default = "The One True Text Editor";
|
|
|
|
description = "Text displayed when hovering over the Neovim image";
|
|
|
|
};
|
|
|
|
|
|
|
|
main_image = mkOption {
|
2024-03-24 00:14:39 +00:00
|
|
|
type = enum ["language" "logo"];
|
2024-01-05 16:24:02 +00:00
|
|
|
default = "language";
|
2023-02-18 12:32:43 +00:00
|
|
|
description = "Main image to be displayed";
|
|
|
|
};
|
|
|
|
|
|
|
|
client_id = mkOption {
|
2024-03-24 00:14:39 +00:00
|
|
|
type = str;
|
2024-01-05 16:24:02 +00:00
|
|
|
default = "1157438221865717891";
|
2023-02-18 12:32:43 +00:00
|
|
|
description = "Client ID of the application";
|
|
|
|
};
|
2023-07-15 16:24:09 +00:00
|
|
|
|
2024-01-05 16:24:02 +00:00
|
|
|
log_level = mkOption {
|
2024-03-24 00:14:39 +00:00
|
|
|
type = nullOr (enum ["debug" "info" "warn" "error"]);
|
2024-01-05 16:24:02 +00:00
|
|
|
default = null;
|
|
|
|
description = "Log level to be used by the plugin";
|
|
|
|
};
|
|
|
|
|
|
|
|
debounce_timeout = mkOption {
|
2024-03-24 00:14:39 +00:00
|
|
|
type = int;
|
2024-01-05 16:24:02 +00:00
|
|
|
default = 10;
|
|
|
|
description = "Number of seconds to debounce events";
|
|
|
|
};
|
|
|
|
|
2023-02-18 12:32:43 +00:00
|
|
|
auto_update = mkOption {
|
2024-03-24 00:14:39 +00:00
|
|
|
type = bool;
|
2023-02-18 12:32:43 +00:00
|
|
|
default = true;
|
|
|
|
description = "Automatically update the presence";
|
|
|
|
};
|
|
|
|
|
|
|
|
enable_line_number = mkOption {
|
2024-03-24 00:14:39 +00:00
|
|
|
type = bool;
|
2023-02-18 12:32:43 +00:00
|
|
|
default = false;
|
|
|
|
description = "Show line number on the RPC item";
|
|
|
|
};
|
|
|
|
|
|
|
|
show_time = mkOption {
|
2024-03-24 00:14:39 +00:00
|
|
|
type = bool;
|
2023-02-18 12:32:43 +00:00
|
|
|
default = true;
|
|
|
|
description = "Show time on the RPC item";
|
|
|
|
};
|
|
|
|
|
2024-01-05 16:24:02 +00:00
|
|
|
blacklist = mkOption {
|
2024-03-24 00:14:39 +00:00
|
|
|
type = listOf str;
|
2024-01-05 16:24:02 +00:00
|
|
|
default = [];
|
|
|
|
example = literalExpression ''["Alpha"]'';
|
|
|
|
description = "List of filetypes to ignore";
|
|
|
|
};
|
|
|
|
|
2023-02-18 12:32:43 +00:00
|
|
|
rich_presence = {
|
|
|
|
editing_text = mkOption {
|
2024-03-24 00:14:39 +00:00
|
|
|
type = str;
|
2023-02-18 12:32:43 +00:00
|
|
|
default = "Editing %s";
|
|
|
|
description = "Text displayed when editing a file";
|
|
|
|
};
|
|
|
|
|
|
|
|
file_explorer_text = mkOption {
|
2024-03-24 00:14:39 +00:00
|
|
|
type = str;
|
2023-02-18 12:32:43 +00:00
|
|
|
default = "Browsing %s";
|
|
|
|
description = "Text displayed when browsing files";
|
|
|
|
};
|
|
|
|
|
|
|
|
git_commit_text = mkOption {
|
2024-03-24 00:14:39 +00:00
|
|
|
type = str;
|
2023-02-18 12:32:43 +00:00
|
|
|
default = "Committing changes";
|
|
|
|
description = "Text displayed when committing changes";
|
|
|
|
};
|
|
|
|
|
|
|
|
plugin_manager_text = mkOption {
|
2024-03-24 00:14:39 +00:00
|
|
|
type = str;
|
2023-02-18 12:32:43 +00:00
|
|
|
default = "Managing plugins";
|
|
|
|
description = "Text displayed when managing plugins";
|
|
|
|
};
|
|
|
|
|
|
|
|
reading_text = mkOption {
|
2024-03-24 00:14:39 +00:00
|
|
|
type = str;
|
2023-02-18 12:32:43 +00:00
|
|
|
default = "Reading %s";
|
|
|
|
description = "Text displayed when reading a file";
|
|
|
|
};
|
|
|
|
|
|
|
|
workspace_text = mkOption {
|
2024-03-24 00:14:39 +00:00
|
|
|
type = str;
|
2023-02-18 12:32:43 +00:00
|
|
|
default = "Working on %s";
|
|
|
|
description = "Text displayed when working on a project";
|
|
|
|
};
|
|
|
|
|
|
|
|
line_number_text = mkOption {
|
2024-03-24 00:14:39 +00:00
|
|
|
type = str;
|
2023-02-18 12:32:43 +00:00
|
|
|
default = "Line %s out of %s";
|
|
|
|
description = "Text displayed when showing line number";
|
|
|
|
};
|
2024-01-05 16:24:02 +00:00
|
|
|
|
|
|
|
terminal_text = mkOption {
|
2024-03-24 00:14:39 +00:00
|
|
|
type = str;
|
2024-01-05 16:24:02 +00:00
|
|
|
default = "Working on the terminal";
|
|
|
|
description = "Text displayed when working on the terminal";
|
|
|
|
};
|
2023-02-18 12:32:43 +00:00
|
|
|
};
|
2023-02-05 20:56:40 +00:00
|
|
|
};
|
|
|
|
}
|