diff options
| author | Fabian David Schmidt <fabian.david.schmidt@gmail.com> | 2021-08-13 17:32:01 +0200 |
|---|---|---|
| committer | Simon Hauser <Simon-Hauser@outlook.de> | 2022-07-01 18:13:25 +0200 |
| commit | ef9137d85c935b83ec513db23214c7d9a0bd2b45 (patch) | |
| tree | c9e7ed6905ef0663299ff834977b25e5a172212d /lua/telescope/builtin/files.lua | |
| parent | a0a038170dbb5e4b69a50f648a8cf5cae6a910a3 (diff) | |
feat: refine with new_table
Diffstat (limited to 'lua/telescope/builtin/files.lua')
| -rw-r--r-- | lua/telescope/builtin/files.lua | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lua/telescope/builtin/files.lua b/lua/telescope/builtin/files.lua index 599dc55..94639f6 100644 --- a/lua/telescope/builtin/files.lua +++ b/lua/telescope/builtin/files.lua @@ -111,6 +111,16 @@ files.live_grep = function(opts) -- TODO: It would be cool to use `--json` output for this -- and then we could get the highlight positions directly. sorter = sorters.highlighter_only(opts), + attach_mappings = function(_, map) + map("i", "<c-space>", function(prompt_bufnr) + local line = action_state.get_current_line() + require("telescope.actions.generate").refine(prompt_bufnr, { + prompt_title = "Find Word (" .. line .. ")", + sorter = conf.generic_sorter(opts), + }) + end) + return true + end, }):find() end |
