mirror of
https://github.com/jiriks74/presence.nvim
synced 2025-06-22 20:38:57 +02:00
parent
c1c5475882
commit
87c857a56b
2 changed files with 12 additions and 2 deletions
lua/presence
|
@ -68,7 +68,17 @@ local default_file_assets = require("presence.file_assets")
|
|||
local plugin_managers = require("presence.plugin_managers")
|
||||
local Discord = require("presence.discord")
|
||||
|
||||
function Presence:setup(options)
|
||||
function Presence:setup(...)
|
||||
-- Support setup invocation via both dot and colon syntax.
|
||||
-- To maintain backwards compatibility, colon syntax will still
|
||||
-- be supported, but dot syntax should be recommended.
|
||||
local args = {...}
|
||||
local options = args[1]
|
||||
if #args == 0 then
|
||||
options = self
|
||||
self = Presence
|
||||
end
|
||||
|
||||
options = options or {}
|
||||
self.options = options
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue