Skip to content

Commit e862e72

Browse files
bingcokeNTBBloodbath
authored andcommitted
fix(telescope): doc and check select is nil
1 parent de3c0fd commit e862e72

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,13 +192,13 @@ request method (e.g. `GET`) and run `rest.nvim`.
192192
Run `export DEBUG_PLENARY="debug"` before starting nvim. Logs will appear most
193193
likely in ~/.cache/nvim/rest.nvim.log
194194

195-
## Telescope
195+
## Telescope Extension
196196

197197
```lua
198198

199199
-- first load extension
200200
require("telescope").load_extension("rest")
201-
-- then use telescope
201+
-- then use it
202202
require("telescope").extensions.rest.select_env()
203203

204204
```

lua/telescope/_extensions/rest.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,17 @@ local function rest_env_select(opt)
3030

3131
pickers
3232
.new({}, {
33-
prompt_title = "Select Evn",
33+
prompt_title = "Select Env File",
3434
finder = finders.new_table({
3535
results = lines,
3636
}),
3737
attach_mappings = function(prompt_bufnr, map)
3838
actions.select_default:replace(function()
3939
local selection = action_state.get_selected_entry()
40+
actions.close(prompt_bufnr)
4041
if selection == nil then
4142
return
4243
end
43-
actions.close(prompt_bufnr)
4444
rest.select_env(selection[1])
4545
end)
4646
map("i", "<c-o>", function()

0 commit comments

Comments
 (0)