2023-02-27 19:26:47 +00:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
...
|
2023-11-07 00:50:27 +00:00
|
|
|
}: let
|
|
|
|
inherit (lib) mkIf nvim boolToString;
|
2024-01-05 16:24:02 +00:00
|
|
|
inherit (lib.nvim.lua) listToLuaTable;
|
2024-01-17 23:54:27 +00:00
|
|
|
inherit (lib.strings) escapeNixString;
|
2024-01-05 16:24:02 +00:00
|
|
|
inherit (builtins) toString;
|
2023-11-07 00:50:27 +00:00
|
|
|
|
2024-01-05 16:24:02 +00:00
|
|
|
cfg = config.vim.presence.neocord;
|
2023-02-27 19:26:47 +00:00
|
|
|
in {
|
|
|
|
config = mkIf cfg.enable {
|
2024-01-05 16:24:02 +00:00
|
|
|
vim.startPlugins = ["neocord"];
|
2023-02-27 19:26:47 +00:00
|
|
|
|
2024-01-05 16:24:02 +00: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 19:26:47 +00:00
|
|
|
-- General options
|
2024-01-05 16:24:02 +00:00
|
|
|
logo = "${cfg.logo}",
|
|
|
|
logo_tooltip = "${cfg.logo_tooltip}",
|
2023-02-27 19:26:47 +00:00
|
|
|
main_image = "${cfg.main_image}",
|
|
|
|
client_id = "${cfg.client_id}",
|
2024-01-17 23:54:27 +00:00
|
|
|
log_level = ${
|
2024-01-05 16:24:02 +00:00
|
|
|
if cfg.log_level == null
|
|
|
|
then "nil"
|
2024-01-17 23:54:27 +00:00
|
|
|
else "${escapeNixString cfg.log_level}"
|
|
|
|
},
|
2024-01-05 16:24:02 +00:00
|
|
|
debounce_timeout = ${toString cfg.debounce_timeout},
|
|
|
|
blacklist = ${listToLuaTable cfg.blacklist},
|
2023-02-27 19:26:47 +00: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 16:24:02 +00:00
|
|
|
terminal_text = "${cfg.rich_presence.terminal_text}",
|
2023-02-27 19:26:47 +00:00
|
|
|
})
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
}
|