Skip to content

Commit

Permalink
refactor(config): change default values
Browse files Browse the repository at this point in the history
  • Loading branch information
vyfor committed Dec 6, 2024
1 parent 5f3fcfe commit 3822787
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 24 deletions.
2 changes: 2 additions & 0 deletions lua/cord/activity/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,11 @@ local function build_idle_activity(cfg, opts)
large_image = cfg.editor.icon
large_text = config.get(cfg.editor.tooltip, opts)
small_image = config.get(cfg.idle.icon, opts)
or utils.get_asset('editor', 'idle')
small_text = config.get(cfg.idle.tooltip, opts)
else
large_image = config.get(cfg.idle.icon, opts)
or utils.get_asset('editor', 'idle')
large_text = config.get(cfg.idle.tooltip, opts)
small_image = cfg.editor.icon
small_text = config.get(cfg.editor.tooltip, opts)
Expand Down
25 changes: 2 additions & 23 deletions lua/cord/util/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ M.values = {
ignore_focus = true,
details = 'Idling',
state = nil,
tooltip = 'Zzz',
tooltip = '💤',
icon = nil,
},
text = {
Expand All @@ -54,28 +54,7 @@ M.values = {
workspace = function(opts) return 'In ' .. opts.workspace_name end,
dashboard = 'Home',
},
buttons = {
{
label = 'View Repository',
url = 'git',
},
{
label = function(opts)
if opts.is_custom_client then
return 'This is a custom client'
else
return 'This is not a custom client'
end
end,
url = function(opts)
if opts.is_custom_client then
return 'https://github.com/Neovim/Neovim'
else
return 'https://github.com/Neovim/Neovim'
end
end,
},
},
buttons = nil,
assets = nil,
hooks = {
on_ready = nil,
Expand Down
2 changes: 1 addition & 1 deletion lua/cord/util/logger.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
local levels = vim.log.levels
local log_level
local log_level = levels.ERROR

local function set_level(level) log_level = level end

Expand Down

0 comments on commit 3822787

Please sign in to comment.