Skip to content

Commit

Permalink
Rename default_search_engine to search_engine
Browse files Browse the repository at this point in the history
  • Loading branch information
piersolenski committed Aug 27, 2023
1 parent 40a4347 commit 6ce0f42
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ use({
-- Any additional instructions
additional_instructions = "Start the reply with 'OH HAI THERE'",
-- Default search engine, can be overridden by passing an option to WtfSeatch
default_search_engine = "google" | "duck_duck_go" | "stack_overflow" | "github",
search_engine = "google" | "duck_duck_go" | "stack_overflow" | "github",
}
```

Expand Down
4 changes: 2 additions & 2 deletions lua/wtf/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ local default_opts = {
openai_api_key = nil,
openai_model_id = "gpt-3.5-turbo",
language = "english",
default_search_engine = "google",
search_engine = "google",
additional_instructions = nil,
popup_type = "popup",
}
Expand All @@ -19,7 +19,7 @@ function M.setup(opts)
vim.g.wtf_openai_api_key = opts.openai_api_key
vim.g.wtf_openai_model_id = opts.openai_model_id
vim.g.wtf_language = opts.language
vim.g.wtf_default_search_engine = opts.default_search_engine
vim.g.wtf_search_engine = opts.search_engine
vim.g.wtf_default_additional_instructions = opts.additional_instructions
vim.g.wtf_popup_type = opts.popup_type
vim.g["wtf_hooks"] = {
Expand Down
2 changes: 1 addition & 1 deletion lua/wtf/search.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ local get_filetype = require("wtf.get_filetype")
local search_engines = require("wtf.search_engines")

local function get_default_search_engine()
return vim.g.wtf_default_search_engine
return vim.g.wtf_search_engine
end

local function get_open_command()
Expand Down

0 comments on commit 6ce0f42

Please sign in to comment.