summaryrefslogtreecommitdiff
path: root/lua/telescope/init.lua
diff options
context:
space:
mode:
authorTJ DeVries <devries.timothyj@gmail.com>2020-07-15 00:21:01 -0400
committerTJ DeVries <devries.timothyj@gmail.com>2020-07-15 00:21:01 -0400
commit053417dd92066e4e03b642f663bec577c0c6e59a (patch)
tree00ee244780a284822ef9bdcf99c1ba244b56a1dc /lua/telescope/init.lua
parent69d4cd3899845d84767fa0e2ff9c8234e9dcbf84 (diff)
Pipes
Diffstat (limited to 'lua/telescope/init.lua')
-rw-r--r--lua/telescope/init.lua13
1 files changed, 13 insertions, 0 deletions
diff --git a/lua/telescope/init.lua b/lua/telescope/init.lua
index 32c526b..fc2b037 100644
--- a/lua/telescope/init.lua
+++ b/lua/telescope/init.lua
@@ -2,6 +2,8 @@ package.loaded['popup'] = nil
package.loaded['popup.border'] = nil
package.loaded['popup.init'] = nil
+-- TODO: Debounce preview window maybe
+
local a = vim.api
local popup = require('popup')
@@ -17,6 +19,16 @@ Finder.__index = Finder
function Finder:new(fn_command)
-- TODO: Add config for:
-- - cwd
+
+ -- TODO:
+ -- - `types`
+ -- job
+ -- pipe
+ -- vim.loop.new_pipe (stdin / stdout). stdout => filter pipe
+ -- rg huge_search | fzf --filter prompt_is > buffer. buffer could do stuff do w/ preview callback
+ -- string
+ -- list
+ -- ...
return setmetatable({
fn_command = fn_command,
job_id = -1,
@@ -282,6 +294,7 @@ function __TelescopeMapping(prompt_bufnr, results_bufnr, characters)
end
end
+-- TODO: Probably could attach this with nvim_buf_attach, and then I don't have to do the ugly global function stuff
function __TelescopeOnChange(bufnr, prompt, results_bufnr, results_win)
local line = vim.api.nvim_buf_get_lines(bufnr, 0, -1, false)[1]
local prompt_input = string.sub(line, #prompt + 1)