Skip to content

Commit

Permalink
feat: update config types
Browse files Browse the repository at this point in the history
  • Loading branch information
2KAbhishek committed Nov 21, 2024
1 parent fa91ced commit 223c927
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions lua/exercism/config.lua
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
-- Define config structure here, setup function will override defaults with user config
---@class ExercismModule
---@class exercism
local M = {}

---@class ExercismConfig
---@class exercism.config
---@field name string
---@field exercism_workspace string
---@field add_default_keybindings boolean
local config = {
name = 'World!',
exercism_workspace = vim.fn.expand('~/exercism'),
add_default_keybindings = true,
exercism_workspace = '~/exercism',
}

---@type ExercismConfig
---@type exercism.config
M.config = config

---@param args ExercismConfig?
---@param args exercism.config
M.setup = function(args)
M.config = vim.tbl_deep_extend('force', M.config, args or {})
end
Expand Down

0 comments on commit 223c927

Please sign in to comment.