From 7a908a44ee345ddf797febf6a13cd8868e8d16fc Mon Sep 17 00:00:00 2001 From: Andrew Kwon Date: Mon, 9 Aug 2021 23:17:37 -0700 Subject: [PATCH] Add configurable Rich Presence buttons * Show View Repository button by default if applicable * Allow user to disable or configure buttons statically or dynamically * Update README Resolves #27 --- README.md | 4 ++- lua/presence/init.lua | 79 +++++++++++++++++++++++++++++++++++-------- 2 files changed, 67 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 2e42c47..075af3a 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,8 @@ require("presence"):setup({ log_level = nil, -- Log messages at or above this level (one of the following: "debug", "info", "warn", "error") debounce_timeout = 10, -- Number of seconds to debounce events (or calls to `:lua package.loaded.presence:update(, true)`) enable_line_number = false, -- Displays the current line number instead of the current project - blacklist = {} -- A list of strings or Lua patterns that disable Rich Presence if the current file name, path, or workspace match + blacklist = {}, -- A list of strings or Lua patterns that disable Rich Presence if the current file name, path, or workspace match + buttons = true, -- Configure Rich Presence button(s), either a boolean to enable/disable, a static table (`{{ label = "