Skip to content

Commit

Permalink
Add winhighlight to config (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
razak17 committed Nov 9, 2023
1 parent e42a546 commit 4cf2828
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ use({
request_started = nil,
request_finished = nil,
},
winhighlight = "Normal:Normal,FloatBorder:FloatBorder",
}
```

Expand Down
2 changes: 2 additions & 0 deletions lua/wtf/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,14 @@ function M.setup(opts)
request_started = nil,
request_finished = nil,
},
winhighlight = "Normal:Normal,FloatBorder:FloatBorder",
}

-- Merge default_opts with opts
opts = vim.tbl_deep_extend("force", default_opts, opts or {})

vim.validate({
winhighlight = { opts.winhighlight, "string" },
openai_api_key = { opts.openai_api_key, { "string", "nil" } },
openai_model_id = { opts.openai_model_id, "string" },
language = { opts.language, "string" },
Expand Down
2 changes: 1 addition & 1 deletion lua/wtf/display_popup.lua
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ local function display_popup(responseTable)
win_options = {
wrap = true,
linebreak = true,
winhighlight = "Normal:Normal,FloatBorder:FloatBorder",
winhighlight = config.options.winhighlight
},
}

Expand Down

0 comments on commit 4cf2828

Please sign in to comment.