2023-02-27 20:26:47 +01:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
...
|
2023-11-07 01:50:27 +01:00
|
|
|
}: let
|
|
|
|
inherit (lib) mkIf nvim boolToString;
|
2024-01-05 17:24:02 +01:00
|
|
|
inherit (lib.nvim.lua) listToLuaTable;
|
2024-01-18 00:54:27 +01:00
|
|
|
inherit (lib.strings) escapeNixString;
|
2024-01-05 17:24:02 +01:00
|
|
|
inherit (builtins) toString;
|
2023-11-07 01:50:27 +01:00
|
|
|
|
2024-01-05 17:24:02 +01:00
|
|
|
cfg = config.vim.presence.neocord;
|
2023-02-27 20:26:47 +01:00
|
|
|
in {
|
|
|
|
config = mkIf cfg.enable {
|
2024-01-05 17:24:02 +01:00
|
|
|
vim.startPlugins = ["neocord"];
|
2023-02-27 20:26:47 +01:00
|
|
|
|
2024-01-05 17:24:02 +01:00
|
|
|
vim.luaConfigRC.neocord = nvim.dag.entryAnywhere ''
|
|
|
|
-- Description of each option can be found in https://github.com/IogaMaster/neocord#lua
|
|
|
|
require("neocord").setup({
|
2023-02-27 20:26:47 +01:00
|
|
|
-- General options
|
2024-01-05 17:24:02 +01:00
|
|
|
logo = "${cfg.logo}",
|
|
|
|
logo_tooltip = "${cfg.logo_tooltip}",
|
2023-02-27 20:26:47 +01:00
|
|
|
main_image = "${cfg.main_image}",
|
|
|
|
client_id = "${cfg.client_id}",
|
2024-01-18 00:54:27 +01:00
|
|
|
log_level = ${
|
2024-01-05 17:24:02 +01:00
|
|
|
if cfg.log_level == null
|
|
|
|
then "nil"
|
2024-01-18 00:54:27 +01:00
|
|
|
else "${escapeNixString cfg.log_level}"
|
|
|
|
},
|
2024-01-05 17:24:02 +01:00
|
|
|
debounce_timeout = ${toString cfg.debounce_timeout},
|
|
|
|
blacklist = ${listToLuaTable cfg.blacklist},
|
2023-02-27 20:26:47 +01:00
|
|
|
show_time = "${boolToString cfg.show_time}",
|
|
|
|
|
|
|
|
-- Rich Presence text options
|
|
|
|
editing_text = "${cfg.rich_presence.editing_text}",
|
|
|
|
file_explorer_text = "${cfg.rich_presence.file_explorer_text}",
|
|
|
|
git_commit_text = "${cfg.rich_presence.git_commit_text}",
|
|
|
|
plugin_manager_text = "${cfg.rich_presence.plugin_manager_text}",
|
|
|
|
reading_text = "${cfg.rich_presence.reading_text}",
|
|
|
|
workspace_text = "${cfg.rich_presence.workspace_text}",
|
|
|
|
line_number_text = "${cfg.rich_presence.line_number_text}",
|
2024-01-05 17:24:02 +01:00
|
|
|
terminal_text = "${cfg.rich_presence.terminal_text}",
|
2023-02-27 20:26:47 +01:00
|
|
|
})
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
}
|