summaryrefslogtreecommitdiff
path: root/lua/telescope/WIP.lua
diff options
context:
space:
mode:
authorTJ DeVries <devries.timothyj@gmail.com>2020-08-31 22:23:12 -0400
committerTJ DeVries <devries.timothyj@gmail.com>2020-08-31 22:23:12 -0400
commit51ed9c3e98541a0e85120ea322acfe9abdfcfa02 (patch)
tree01026b4a051a9a64a3ab676b35740d0b29869411 /lua/telescope/WIP.lua
parent8cf3952f27a3f7895100ff547cf1c8cdfeee72f7 (diff)
Add some WIP stuff
Diffstat (limited to 'lua/telescope/WIP.lua')
-rw-r--r--lua/telescope/WIP.lua21
1 files changed, 10 insertions, 11 deletions
diff --git a/lua/telescope/WIP.lua b/lua/telescope/WIP.lua
index cab745a..1ababec 100644
--- a/lua/telescope/WIP.lua
+++ b/lua/telescope/WIP.lua
@@ -33,26 +33,25 @@ end
-- TODO: Make it so that when you select stuff, it's inserted
-- TODO: Make it so the previewer shows the help text.
-WIP.completion = function()
+WIP.completion = function(opts)
local results = {}
- for k, v in pairs(vim.api) do
- table.insert(results, k)
+ for k, _ in pairs(vim.api) do
+ table.insert(results, k .. "()")
end
local lsp_reference_finder = finders.new {
results = results
}
- -- local reference_previewer = previewers.qflist
- local reference_picker = pickers.new {
- -- previewer = reference_previewer
- }
-
- reference_picker:find {
- prompt = 'LSP References',
+ -- TODO: Open the help text for the line.
+ local reference_picker = pickers.new(opts, {
+ prompt = 'vim.api Help Reference',
finder = lsp_reference_finder,
sorter = sorters.get_norcalli_sorter(),
- }
+ previewer = previewers.help,
+ })
+
+ reference_picker:find {}
end
-- TODO: Use tree sitter to get "everything" in your current scope / file / etc.