1
0
Fork 0
mirror of https://github.com/jiriks74/presence.nvim synced 2025-07-23 01:08:49 +02:00

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
This commit is contained in:
Andrew Kwon 2021-08-09 23:17:37 -07:00
parent 3b4d4e624d
commit 7a908a44ee
2 changed files with 67 additions and 16 deletions

View file

@ -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(<filename>, 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 = "<label>", url = "<url>" }, ...}`, or a function(buffer: string, repo_url: string|nil): table)
-- Rich Presence text options
editing_text = "Editing %s", -- Format string rendered when an editable file is loaded in the buffer
@ -64,6 +65,7 @@ let g:presence_client_id = "793271441293967371"
let g:presence_log_level
let g:presence_debounce_timeout = 10
let g:presence_enable_line_number = 0
let g:presence_buttons = 1
let g:presence_blacklist = []
" Rich Presence text options