Commit Graph

132 Commits

Author SHA1 Message Date
Jonathan Birk
6a43634f5f doc: help for select_{default,tab,vertical,horizontal} (#1801) 2022-03-20 20:08:54 +01:00
tami5
ef7b6ada6d feat: improve UX with vim.notify (#1763)
* fix(notify): don't report request on new line

* ref(notify): update message format

* ref(msgs): always quote values + decrease duplication

* fix(ci): undefined variables

* ref(actions): temporary silent actions.__index errors

* cleanup

* revert: panic effort, we continue to use error for those

Co-authored-by: Simon Hauser <Simon-Hauser@outlook.de>
2022-03-13 18:11:27 +01:00
Daniel Imfeld
b501d9ecb7 fix: skip path escaping when adding items to quickfix list (#1712) 2022-03-06 20:34:44 +01:00
Connor Sheehan
88229d5afd fix(actions.qflist): make it work with vim quickfix commands (#1742)
use `r` mode to instead use `" "` mode. This makes Telescope quickfix list action send results
to a new list in the quickfix stack instead of overwriting the entries in the current list. 

Doing so enables `:chistory`, `:colder` and `:cnewer` functions to review results of 
previous Telescope queries.

The location list uses a similar API and is updated in this PR also
(ie this also enables :lhistory, :lolder and :lnewer).
2022-02-13 03:00:52 +03:00
Christian Clason
21cb64aa1a fix(action): insert symbol in insert mode (#1722)
followup to #1618, ensure insert after cursor
2022-01-28 16:12:50 +01:00
Luke Kershaw
2bfc0eb2cf fix: update multi_icon with select/drop/toggle_all actions (#1682)
* fix: `multi_icon` with `select/drop/toggle_all`

* typos

* fix: add check for no caret found

* fix: add check for no line found

* fix: check `max_results` in `Picker:can_select_row`

- also switch order of highlighting in `select/drop/toggle_all` actions

* fix: make `max_results` check a strict inequality

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

* fix: update `prompt_status` on `select/drop/toggle_all` actions

Co-authored-by: Github Actions <actions@github>
2022-01-15 22:27:03 +00:00
Luke Kershaw
1bb5d5567f fix: allow which_key action without preview (#1668) 2022-01-09 18:40:40 +01:00
kylo252
a1f838d436 chore: remove redundant run_builtin action (#1589) 2021-12-27 09:48:34 +01:00
Christian Clason
7ebc27d818 fix(actions): force insertmode after inserting symbol (#1618)
required after upstream changes to prompt buffer behavior
(see
 28134f4e78)

Fixes #1608
2021-12-27 09:40:37 +01:00
Jieru Mei
3f4ee6f267 fix: which_key action foldenable=false by default (#1578) 2021-12-10 09:55:24 +01:00
GenesisTMS
a88d92417d typo: which_key (#1560) 2021-12-06 21:12:42 +01:00
Simon Hauser
4016ebe8e8 fix: actions.delete_buffer shouldnt force delete
fix #1541
2021-12-03 17:28:15 +01:00
Simon Hauser
7695d224c8 fix: telescope close process and cleanup layout actions (#1480) 2021-11-23 21:11:05 +01:00
Luke Kershaw
d686fb2799 fix: cleanup of layout actions
* fix: finish docs and remove mistakes from merge

* fix: change order of `popup` changes based on type of change
  - removes "flash" issue where popups don't update in sync
2021-11-18 19:44:12 +00:00
johnybx
b952c2f852 feat: add hide / unhide preview (#1305)
* feat: add hide / unhide preview or results and prompt

* fix edit actions while only preview window is active

* add option to start telescope without previewer -> "disable_previewer_at_startup"

* remove hide / unhide prompt and resutls, improve hide / unhide preview

* fix tests - check if popup window should be created with borders - popup.create does not support setting borderhighlight and border=false

* allow toggle preview even if preview is set to false

* reuse recalculate_layout in hide / unhide preview

* add docs to toggle preview

* check if preview window is valid window

* remove unnecessary changes

* cleanup, remove unnecessary changes

* close all previewers, refactor toggle preview code

[docgen] Update doc/telescope.txt
skip-checks: true
2021-11-18 19:44:12 +00:00
Luke Kershaw
bf77c5d2fa feat: results scrolling actions (#1436) 2021-11-13 11:15:07 +00:00
hungpt2702
f3ef592072 fix: actions.git_checkout_current_buffer calling deprecated method (#1439) 2021-11-10 14:18:02 +01:00
fdschmidt93
97842abb03 fix: revert buffers previewer (#1400)
* Reverts #1120 many issues arise (mru, highlighting, settings inheritance, ...) when previewing actual buffers
2021-11-04 07:55:32 +01:00
Simon Hauser
587a10d149 chore: remove a lot of deprecated stuff (#1399) 2021-11-01 20:30:10 +01: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
440c598de4 fix: which key float positioning (#1293)
* Adjust which key float positioning for recent plenary and telescope theme changes
2021-09-30 15:53:06 +02:00
Jonas Strittmatter
4e629cdea1 fix: show error message when nothing is selected (#1289)
* fix: always show error message when nothing is selected

This continues the fixes done in 4816a27d76 (ref #1283)

* Use correct variable name (selection) and add one more nil check

* Fix indentation
2021-09-27 20:45:27 +01:00
fdschmidt93
29997233bc fix: make qf commands possible from any picker (#1237)
* Allow any qf cmd by defaulting to {lnum=1, col=1} for qflist if values are unset
2021-09-13 18:30:14 +02:00
thibthib18
b4d6eb9a23 feat: git merge branch action (#1220) 2021-09-10 08:50:58 +02:00
August Masquelier
12a44ededa fix(actions_generate.which_key): overriding opts (#1221)
* Fix error from type mismatch on repeated calls of `action.which_key` when instantiated by `actions.generate`
2021-09-07 17:29:57 +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
fdschmidt93
5d37c3ea08 feat: allow caching and resuming picker (#1051)
* expose `cache_picker` in telescope.setup to configure caching, see `:h telescope.defaults.cache_picker`
* add builtin.resume and builtin.pickers picker
2021-09-01 18:17:18 +02:00
fdschmidt93
79dc995f82 fix: (terminal) buffer previewer (#1120)
Use existing buffers for buffer previewer to allow previewing special buffer types
2021-08-23 15:27:11 +02:00
Simon Hauser
364d795d22 fix: some improvements for telescope.symbols if run in insert mode (#1117)
- keep insert if run in insert mode
- also look in `.local/share/nvim/telescope/symbols/*.json` for symbols
  can be overriden with `symbol_path`
2021-08-21 16:48:19 +02:00
TJ DeVries
a97af306c4 feat(performance): Major performance improvements using async v2 from @oberblastmeister (#987)
* start: Working w/ async jobs

* short circuit to using bad finder if you pass writer.
2021-08-20 11:11:24 -04:00
bi0ha2ard
b7cd8c7699 fix(entry_to_qf): handle nil entry.cwd and absolute filenames (#1058) 2021-08-04 08:56:15 +02:00
Joel Palmer
b742c50bf1 feat: add git reset action for git commits picker (#999) 2021-07-30 00:16:45 +03:00
elianiva
69adcbca87 refactor: remove unused parameter (#1044) 2021-07-25 16:33:05 +07:00
Sebastian Lyng Johansen
c0f1999b02 fix: make path for send to qflist correct (#1037) 2021-07-23 14:17:26 -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
toppair
7cdaaaa39d fix: pasting multiline register content (#971) 2021-07-10 17:46:08 +02:00
Simon Hauser
3699605627 feat: cycle prompt history (#521)
history is enabled on default but cycle_history_next and cycle_history_prev is not mapped yet

Example:
require('telescope').setup {
  defaults = {
    mappings = {
      i = {
        ["<C-Down>"] = require('telescope.actions').cycle_history_next,
        ["<C-Up>"] = require('telescope.actions').cycle_history_prev,
      }
    }
  }
}

For more information :help telescope.defaults.history

big thanks to clason and all other testers :)
2021-07-09 20:45:29 +02:00
Luke Kershaw
a5608b9026 feat: option to include_extensions in builtin picker (#953)
- add option `include_extensions` which defaults to `false`
- if `include_extensions` is `true` then add functions from extensions to results
- update `actions.run_builtin` to check if extension function provided
2021-07-03 23:31:45 +02:00
fdschmidt93
bdd0df73a6 feat: select_all, toggle_all and drop_all actions (#931) 2021-07-03 10:54:06 +02:00
Simon Hauser
6ac5ee0854 feat: cycle previewers with commit and bcommit already using it (#528)
- new git previewers
- jump to line in bcommit previewer
- vimdiff for bcommits
- dynamic preview window titles
- more previewers documentation

Cycle previewers are not mapped yet. So you need to setup yourself:
```lua
require('telescope').setup {
  defaults = {
    mappings = {
      i = {
        ["<C-s>"] = actions.cycle_previewers_next,
        ["<C-a>"] = actions.cycle_previewers_prev,
      },
    },
  }
}
```

Co-authored-by: Thore Strassburg <thore@weilbier.net>
2021-06-14 21:50:46 +02:00
Dhruv Manilawala
495f84fd35 feat: delete entry from the picker without closing telescope (#828)
This action is not mapped but you can do it yourself in your telescope setup call
Example config:
```lua
require("telescope").setup {
  pickers = {
    buffers = {
      mappings = {
        i = {
          ["<c-d>"] = "delete_buffer",
        }
      }
    }
  }
}
```
2021-06-09 19:58:36 +02:00
runiq
e659e3336f feat: send to loclist (#868) 2021-05-31 08:47:05 +02:00
runiq
517f4b204b Add documentation for quickfix actions (#869)
* Add documentation for quickfix actions

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

Co-authored-by: Github Actions <actions@github>
2021-05-30 21:45:57 -04:00
Kyoichiro Yamada
1fefd0098e fix: rename actions.git_switch to git_switch_branch (#835) 2021-05-11 13:06:38 +03:00
Kyoichiro Yamada
d5aa53dcd3 create new action: git switch (#798)
* create new action: git switch

If the branch already exists in local, switch to that.
If the branch is only in remote, create new branch tracking remote and switch to new one.

* fix a point of review

* fix a point of review: map to git-switch action

* Revert "fix a point of review"

This reverts commit 017ce424a3adfe1b3712a421385cfc3f4258a0fb.

* undocument header comment
2021-05-11 01:55:41 -07:00
Amirreza Askarpour
9fd242db26 feat: add git_stash picker (#800) 2021-05-11 10:20:57 +02:00
Ben Smith
6fd1b3bd25 docs: Git actions docs fix (#787)
* Removed function headers for git actions

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

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

* Added TODO & comments instead of removing headers

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

Co-authored-by: Github Actions <actions@github>
2021-04-23 14:16:44 -04:00
Volodymyr Kot
712de3e182 feat: add search history picker (#769)
Co-authored-by: Volodymyr Kot <vkot@palantir.com>
2021-04-23 18:24:09 +03:00
Ben Smith
c5f0d05835 git(action): create and checkout branch (#755)
* added git action for creating and checking out a new branch, added basic docstrings for git actions

* Added confirmation for creation of new branch, changed default mapping
to <c-u>

* Switched back to `<c-a>` default mapping for now
2021-04-14 12:31:05 +03:00
Thiago Medeiros
0944c4a88f Fix git rebase input message (#720) 2021-04-03 22:48:42 -04:00