From 883347db4e428726bd17605bd8443cb54179e907 Mon Sep 17 00:00:00 2001 From: &Cherry <35111165+Lamby777@users.noreply.github.com> Date: Tue, 14 May 2024 09:33:20 -0400 Subject: [PATCH] feat: Blacklist repositories (#41) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Blacklist URLs based on keywords * Check repo URL in blacklisted * readme update (for split blacklist config options) * moved git repo check into its own loop * fixed not loading if blacklist empty + other stuff ;-; * fix(formatting): Format using StyLua to be in sync with upstream * fix(init.lua): Change : to . so argument `self` is not created --------- Co-authored-by: Jiří Štefka --- README.md | 2 ++ lua/presence/init.lua | 61 +++++++++++++++++++++++++++++++++---------- 2 files changed, 49 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 0b6c6e9..e6a4607 100644 --- a/README.md +++ b/README.md @@ -97,6 +97,7 @@ require("presence").setup({ 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 matches + blacklist_repos = {}, -- A blacklist that applies to git remote repo URLs instead of folder/file names buttons = true, -- Configure Rich Presence button(s), either a boolean to enable/disable, a static table (`{{ label = "