Skip to content

Commit

Permalink
fix: support calling setup() w/o args (#71)
Browse files Browse the repository at this point in the history
Co-authored-by: Tristan Knight <[email protected]>
  • Loading branch information
tmfink and tris203 authored Jun 16, 2024
1 parent 6aab38a commit 02dcc8f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lua/precognition/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,8 @@ end

---@param opts Precognition.PartialConfig
function M.setup(opts)
config = vim.tbl_deep_extend("force", default, opts or {})
opts = opts or {}
config = vim.tbl_deep_extend("force", default, opts)
if opts.highlightColor then
config.highlightColor = opts.highlightColor
end
Expand Down

0 comments on commit 02dcc8f

Please sign in to comment.