-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
move action to own module add the ability to specify opts
- Loading branch information
1 parent
bccee73
commit 06fde9f
Showing
2 changed files
with
34 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
local actions = require "telescope.actions" | ||
local action_state = require "telescope.actions.state" | ||
|
||
local function run_nvim_command(prompt_bufnr, _) | ||
actions.select_default:replace(function() | ||
actions.close(prompt_bufnr) | ||
local selection = action_state.get_selected_entry() | ||
vim.cmd(selection[1]) | ||
end) | ||
return true | ||
end | ||
|
||
return { | ||
run_nvim_command = run_nvim_command | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters