Skip to content

Commit

Permalink
Get sources from module table
Browse files Browse the repository at this point in the history
  • Loading branch information
piersolenski committed Aug 24, 2023
1 parent a20716c commit f458708
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions lua/wtf/search_engines.lua
Original file line number Diff line number Diff line change
@@ -1,20 +1,15 @@
local M = {}

M.sources = {
google = "https://www.google.com/search?q=",
duck_duck_go = "https://duckduckgo.com/?q=",
stack_overflow = "https://stackoverflow.com/search?q=",
github = "https://github.com/search?type=issues&q=",
google = "https://www.google.com/search?q=",
stack_overflow = "https://stackoverflow.com/search?q=",
}

function M.get_completions()
local list = {}
for key, _ in pairs({
google = "https://www.google.com/search?q=",
duck_duck_go = "https://duckduckgo.com/?q=",
stack_overflow = "https://stackoverflow.com/search?q=",
github = "https://github.com/search?type=issues&q=",
}) do
for key, _ in pairs(M.sources) do
table.insert(list, key)
end
return list
Expand Down

0 comments on commit f458708

Please sign in to comment.