From c6f0142fc651dcbd2431630956d034c046293e7e Mon Sep 17 00:00:00 2001 From: TJ DeVries Date: Wed, 15 Jul 2020 17:53:30 -0400 Subject: Get simple rg example to work --- lua/telescope/state.lua | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 lua/telescope/state.lua (limited to 'lua/telescope/state.lua') diff --git a/lua/telescope/state.lua b/lua/telescope/state.lua new file mode 100644 index 0000000..0ae31dd --- /dev/null +++ b/lua/telescope/state.lua @@ -0,0 +1,18 @@ +local state = {} + +state._statuses = {} + +--- Set the status for a particular prompt bufnr +function state.set_status(prompt_bufnr, status) + state._statuses[prompt_bufnr] = status +end + +function state.get_status(prompt_bufnr) + return state._statuses[prompt_bufnr] or {} +end + +function state.clear_status(prompt_bufnr) + state.set_status(prompt_bufnr, nil) +end + +return state -- cgit v1.2.3