Commit Graph

59 Commits

Author SHA1 Message Date
Xavier Young
2df52609a1 feat(picker): allow appending original window <cWORD>, <cfile> and cursor line to prompt (#3134) 2024-05-27 23:02:25 +02:00
Hannu Hartikainen
4626aaa2bc fix(scrolling): enhance and simplify scrolling (#3028)
The previous scrolling implementation (#2687) moved the result selection
by one item at a time, which isn't technically scrolling (ie. moving the
view) and feels quite slow.

Let the neovim builtin scrolling do its thing, so using the scroll wheel
feels like scrolling and is functionally scrolling, too. Scrolling does
not move the selection so after scrolling it typically makes sense to
click. Moving the selection with keyboard takes you back to where you
were. This is in line with typical desktop user interfaces.
2024-04-02 13:36:54 +00:00
Sofronie Cristian
1bb28df3cf feat(actions): support scrolling and selecting with the mouse (#2687)
* feat(scrolling and mouse support): support scrolling and selecting with the mouse

* fix ascending sorting_strategy mouse clicks

---------

Co-authored-by: James Trew <j.trew10@gmail.com>
2024-03-30 04:05:03 +00:00
James Trew
2f3857c25b feat(mappings): allowing passing desc to mappings (#2892) 2024-01-27 14:00:48 +01:00
James Trew
24778fd72f feat(picker): allow appending original window cword to prompt (#2878)
* feat(picker): allow appending original window cword to prompt

* add default mapping and document

* [docgen] Update doc/telescope.txt
skip-checks: true

* add mapping to README

also format README

* oops

* [docgen] Update doc/telescope.txt
skip-checks: true

---------

Co-authored-by: Github Actions <actions@github>
2024-01-20 02:38:27 +00:00
Ahmni Pang-Johnson
f336f8cfab feat(mappings): add horizontal scrolling to normal mode defaults
Co-authored-by: Ahmni Pang-Johnson <ahmnii@amazon.com>
2023-12-19 23:58:36 +00:00
Lucía Andrea Illanes Albornoz
5fff2a138b Implements horizontal scrolling in previewer & results. (#2437)
* Implements horizontal scrolling in previewer & results.

* docs: update wrt. horizontal scrolling in previewer &  results
2023-06-24 19:17:55 +00:00
Simon Hauser
42267407ae fix(actions): which_key after mappings rework (#2556) 2023-06-08 23:10:26 +02:00
Simon Hauser
991d5db624 refactor(mappings): use vim.keymap and remove __TelescopeKeymapStore (#2551) 2023-06-08 20:28:10 +02:00
Simon Hauser
9e3922f628 fix(mappings): expr for insert mode (#2458) 2023-06-07 11:29:57 +02:00
Josa Gesell
e572c63c7d fix: execute autocmds correctly (#2375) 2023-02-19 10:27:15 +01:00
James Trew
053f2303c4 docs: proof-read edits (#2311) 2023-01-22 09:57:53 +01:00
ADoyle
d541e0d6e0 feat: the parameter "map" of attach_mappings can be list of modes to create mapping on multiple modes (#2220) 2022-11-06 17:42:29 +01:00
Simon Hauser
49b043e2a3 fix: nop i_<c-j> because we dont want allow new line (#2147) 2022-09-03 11:22:26 +02:00
Nikita Kulakov
36d4571b05 docs: fix arguments in mappings table to refelct implementation (#2111) (#2125) 2022-08-13 11:05:02 +02:00
Simon Hauser
ac38730da1 docs: mappings documentation overhaul (#2065)
Co-authored-by: TJ DeVries <devries.timothyj@gmail.com>
2022-07-12 11:52:57 +02:00
Gregory Anders
7df6662394 fix: also map <C-/> for which-key (#2051)
Some terminals send Ctrl + / as <C-/>, not <C-_>. Map both to the
which_key action to cover these cases.
2022-07-07 22:19:35 +02:00
Simon Hauser
f838695459 chore: reformat with stylua 0.14.0 2022-07-07 08:27:46 +02:00
Dave Lage
697ee7aa70 feat: lua autocmd (#1707) 2022-04-22 16:20:59 +02:00
Waldson Patrício
1a72a92b64 feat: enable individual options for mappings (#890)
Co-authored-by: Simon Hauser <Simon-Hauser@outlook.de>
2022-03-20 21:34:07 +01:00
Simon Hauser
9f0dd2e402 fix: action mt again (#1487)
actions should be concatinable again
2022-03-13 19:22:16 +01:00
Dave G
749ce3b8ca feat: Add <C-w> to default mappings (#1650)
As described in https://github.com/nvim-telescope/telescope.nvim/issues/1579, this adds <C-w> to the default mappings.
2022-01-05 23:36:41 +01:00
Simon Hauser
1c57cc6140 Revert "fix: action mt so we can again concat actions from two different tables (#1143)" (#1486)
This reverts commit 6daf35c88c.
2021-11-23 23:51:25 +01:00
Simon Hauser
6daf35c88c fix: action mt so we can again concat actions from two different tables (#1143)
* fix: action mt so we can again concat actions from two different tables

- without actually changing the public interface
- without having a local table that keeps track of all actions

* this should clear actions now

we never actually called this function which is kinda a problem because
we never cleaned up previous mapping stores.
We can also make a better mappings store which has access to the keys
sequences which would help the showing actions part

* bugfix

* that should now clear everything

only tests left i think

* more tests

* cleanup

* hack: make sure all actions get cleared
2021-11-22 20:48:37 +01:00
Luke Kershaw
bf77c5d2fa feat: results scrolling actions (#1436) 2021-11-13 11:15:07 +00:00
Zachary Churchill
3f45d64e9c feat: add gg and G to default mappings (#1325)
* feat: add `gg` and `G` to default mappings

* refactor: use action_state.get_current_picker

* docs: mention new default gg/G keymaps
2021-10-11 18:14:23 +02:00
fdschmidt93
fbe004142f feat: show keymaps for builtin actions (#1084)
* Add default mappings `<C-/>`and `?` for insert and normal mode, respectively, to show registered keymappings (`actions.which_key`) attached to prompt buffer
2021-09-01 20:11:53 +02:00
Joshua Cao
b47bb8df1e mapping: Remove center action after select_default action in default mappings. (#974) 2021-08-20 12:02:22 -04:00
Simon Hauser
79644ab677 chore: use stylua for formatting (#1040)
* chore: stylua job and config

* reformat with stylua
2021-07-23 11:42:37 -04:00
Simon Hauser
618e0e6075 feat: set defaults for each picker in telescope setup (#883)
This allows easier picker configuration for example:

```lua
require("telescope").setup {
  pickers = {
    buffers = {
      show_all_buffers = true,
      sort_lastused = true,
      theme = "dropdown",
      previewer = false,
      mappings = {
        i = {
          ["<c-q>"] = "smart_send_to_qflist",
        }
      }
    }
  }
}
```

This configuration will be applied when running `:Telescope buffers`
2021-06-09 19:51:03 +02:00
fdschmidt93
559bf36e73 feat: add completion to pre-filtering (#626)
Works by pressing `<C-l>` in insert mode. Supported are all builtins that have prefiltering. Means:
- lsp_workspace_symbols
- lsp_workspace_diagnostics
- lsp_document_symbols
- lsp_document_diagnostics
2021-03-09 21:04:21 +01:00
TJ DeVries
390e5fa9f5 fix: Keep remaps safe between reloads 2021-03-03 13:26:57 -05:00
Volodymyr Kot
ee341b02ea feat: add ability to multiselect in reverse direction (#573)
Use Shift+Tab
2021-02-28 10:18:11 +01:00
TJ DeVries
11674ac021 feat: multi selection. Only integrates with send_selected_to_qflist (#551)
This will not yet work with select actions. More work is needed in that case.

Co-authored-by: Simon Hauser <Simon-Hauser@outlook.de>
2021-02-27 21:06:04 +01:00
Hubert Pelczarski
67b0661537 feat: adds M mapping in normal mode (#544) 2021-02-24 03:35:52 +01:00
Simon Hauser
10627e889e feat: advanced normal mode (#463)
Add <count>j and k to normal mode and H and L to jump at top and bottom of displayed results
2021-02-24 02:41:00 +01:00
TJ DeVries
d7c02e3b52 feat: Action improvements (#472)
* feat: replace_map

* feat: Add action_set and action_state

* fix: Move all actions.get_ to action_state.get_

* fix: replace all internal references of _goto_file_selection_edit

* feat: add some docs

* fix: lint

* feat: actions.select

* remove mentions and usage of goto_file_selection APIs

* feat: special case attach_mappings to be overridable and defaultable

* Having goto_file_selection mappings will cause a error

as well as replacing deprecated goto_file_selection methodes

For config and replacing use this instead:
- actions.select_default
- actions.select_horizonal
- actions.select_vertical
- actions.select_tab

Only replacing:
- actions.set.edit -- for replacing all select functions

* adds actions.state.select_key_to_edit_key

Co-authored-by: Simon Hauser <Simon-Hauser@outlook.de>
2021-02-22 11:30:57 -05:00
anott03
5995a8be8f Undo #465 (#469)
We have broke all extension that do some sort of goto_file_selection:replace

Problem described here: https://github.com/nvim-telescope/telescope.nvim/pull/465#issuecomment-767831897
Possible solution: https://github.com/nvim-telescope/telescope.nvim/pull/465#issuecomment-767808213
2021-01-27 17:22:11 +01:00
anott03
ccbb7f5638 fix: move to actions.select as default action (#465) 2021-01-25 19:20:01 +01:00
Julian Berman
0f9fd84a97 fix: Use noremap when mapping. (#286)
Previously, if e.g. : was remapped, Telescope would be unclosable with
its mappings (<Esc>).

(Do the same for ensuring we :silent)
2020-11-24 15:29:46 -05:00
Simon Hauser
aba433c522 feat: Actions can now be summed up and center action (#204)
Closes: #182 

* Actions can now be summed up and center action

* fix: Make some complicated changes for metatable

* Update documentation

Co-authored-by: TJ DeVries <devries.timothyj@gmail.com>
2020-11-02 17:00:23 -05:00
TJ DeVries
282e328d46 fix: Allow people to still override ALL the mappings 2020-10-08 21:42:50 -04:00
TJ DeVries
c2c4626c3d feat: Add more easily customizable mappings.
Closes: #131
2020-10-08 21:39:43 -04:00
runiq
675e240383 Normalize mappings (#28)
Modes now use lowercase keys, mappings use the internal representation
via `nvim_replace_termcodes()`.
2020-09-06 22:51:36 -04:00
runiq
f5f1275411 Fix mapping prefix (#26)
`<cmd>` doesn't trigger `InsertLeave`.
2020-09-04 14:27:39 -04:00
TJ DeVries
a6c883ce36 breaking: change attach_mappings to take bufnr as first argument 2020-09-04 11:01:10 -04:00
TJ DeVries
061307233c feat: add some new items and make mappings easier 2020-09-02 00:06:07 -04:00
TJ DeVries
6b066cf9e8 feat: Add better mapping support 2020-08-31 00:06:53 -04:00
TJ DeVries
a6fe9721ac wip: start on mappings 2020-08-31 00:06:53 -04:00
TJ DeVries
7c921b288f feat: Add escape spamming 2020-08-29 23:18:01 -04:00