Commit Graph
107 Commits
Author SHA1 Message Date
James TrewandGitHub 1bfbb1fb5c Revert "doc(layout_strategies): document shared options for bottom_pane" (#2893) 2024-01-25 03:56:32 +00:00
36dce6261a doc(layout_strategies): document shared options for bottom_pane (#2887)
* doc(layout_strategies): document shared options for `bottom_pane`

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

---------

Co-authored-by: Github Actions <actions@github>
2024-01-23 03:13:22 +00:00
Munif TanjimandGitHub 84d53dfdbe feat(pickers): fully customizable layout (#2572) 2023-09-27 08:34:22 +02:00
Yorick PeterseandGitHub 5c91b855b8 Fix resize/preview toggles of the cursor layout (#2718)
The cursor layout uses winline() and wincol() to calculate the cursor
position. Both these functions operate on the currently active window.
The first time the calculations are performed, that happens to be the
window active before showing the Telescope window. However, if the
editor is then resized or the preview window is toggled, the active
window changes. The result is that recalculating the position is then
done using the wrong window, resulting in the Telescope window moving
around in an erratic manner.

To fix this, we have to scope the winline() and wincol() calls to the
original window ID.
2023-09-27 02:41:34 +00:00
Simon HauserandSimon Hauser 9cb9648a39 Revert "fix: entry_display width 1, followup to #2508 (#2530)"
This reverts commit 9609686a8c.
2023-05-25 07:44:39 +02:00
Simon HauserandGitHub 9609686a8c fix: entry_display width 1, followup to #2508 (#2530) 2023-05-24 17:01:02 +02:00
Hoang NguyenandGitHub d5bef7c52d fix(pickers): display preview title at the same position as results title for bottom_pane layout (#2494) 2023-05-14 21:45:36 +02:00
Nguyễn Văn ĐứcandGitHub 697c64b121 fix: flex layout strategy configurations error (#2503) (#2504) 2023-05-14 21:44:37 +02:00
e504cf03c2 doc: fix border characters in docs (#2388)
* chore: Fix border characters in comments

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

---------

Co-authored-by: Github Actions <actions@github>
2023-03-21 13:44:50 -04:00
James TrewandGitHub 053f2303c4 docs: proof-read edits (#2311) 2023-01-22 09:57:53 +01:00
Adam TajtiandGitHub cd67e819e4 fix(tests): uses testharness in scrolling strategy (#2307) 2023-01-06 19:46:10 +01:00
Tsakiris TryfonandGitHub a606bd10c7 docs: fix typos/wording (#2283) 2022-12-28 14:49:57 +01:00
Fabian David SchmidtandGitHub 28dc08f614 Revert "rfc: use extmarks for highlighting and carets (#2099)" (#2138)
This reverts commit 8d13f4ca8a.
2022-08-19 10:08:55 +02:00
8d13f4ca8a rfc: use extmarks for highlighting and carets (#2099)
* Starting to make some progress on extmarks for prefixes

* Finished up extmarks for multi-icons

* Cleaned up update_prefix calls, added display highlights

* remove highlight_one_row

* Remove TODOs

* stylua fixes

* fixes for luacheck

* Fixed whitespace to appease the stylua gods

* fixed a couple nits from pr

* Got tests passing with new highlighting functionality

* Apply suggestions from code review

Co-authored-by: Fabian David Schmidt <39233597+fdschmidt93@users.noreply.github.com>

Co-authored-by: Fabian David Schmidt <39233597+fdschmidt93@users.noreply.github.com>
2022-08-18 09:30:39 +02:00
TJ DeVriesandGitHub 4725867ec6 fix: restore testing framework to actually work (#2070)
after refactor to some new asynchronous items for finders,
the tests stopped actually doing anything.

now they do things again.
2022-08-04 16:00:30 -04:00
Simon HauserandGitHub 5acb9474a0 fix: cursor theme for nvim 0.7 (#2069) 2022-07-12 15:47:39 +02:00
Simon HauserandGitHub 7485b06d58 fix: cursor theme if winbar is set (#2066) 2022-07-12 13:21:19 +02:00
Simon Hauser f838695459 chore: reformat with stylua 0.14.0 2022-07-07 08:27:46 +02:00
julianfandSimon Hauser a0a038170d docs: make_entry and entry_display 2022-07-01 16:59:10 +02:00
Simon HauserandSimon Hauser 83b6cadb2c break: deprecate utils.get_default utils.if_nil (#1545) 2022-06-30 14:01:49 +02:00
fdschmidt93andGitHub 39b12d84e8 feat(entry_display): expose prompt_bufnr opt (#1934)
Required for `vim.ui.input` with file_browser extension
when prompt_bufnr may be left intermittently
2022-05-12 08:39:19 +02:00
Simon HauserandGitHub 831f76a809 docs: add module prefix (#1847) 2022-04-18 08:21:00 +02:00
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
76120285f8 Change center layout strategy to allow vertical anchoring (#1719)
* Change center layout strategy to allow vertical anchoring

Affects `telescope.pickers.layout_strategies.center` that is used by dropdown
(`telescope.themes.get_dropdown()`) theme, allowing more customization for
dropdown theme, i. e. setting it in the top with mirrored preview.

For `anchor` containing `N` or `S` will ignore `mirror` config
and preview will be placed as follows:
- Anchoring for `N` put the preview below the prompt result block.
- Anchoring for `S` put the preview above the prompt result block.

- For horizontal anchoring preview will be placed according to `mirror`.

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

Co-authored-by: Github Actions <actions@github>
2022-03-02 22:05:09 +00:00
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 KershawandGitHub 948f5adff2 fix: allow selection_caret to be entirely whitespace (#1660) 2022-01-06 13:44:39 +00:00
Luke KershawandGitHub f285599440 feat: multiselect icon (#1572)
* feat: add `multi_icon` option to pickers and corresponding highlight

* feat: allow `multi_icon` to be any length

* fix: adjust `selection_caret` highlighting
2022-01-05 22:42:29 +00:00
Luke KershawandGitHub 5f37fbfa83 feat: layout anchor (#1582)
* feat: add `anchor` option to some `layout_strategies`

* tests: improve tests for `resolve_height/width`
2021-12-10 19:08:24 +00:00
Simon HauserandGitHub 61240ac75a break: bump the minimum required neovim version to 0.6 or higher (#1549)
So we can use `vim.json` and `vim.diagnostics`.

If you aren't able to update to 0.6.* yet you should pin the previous commit.
2021-12-10 16:32:28 +01:00
Luke KershawandGitHub 80cdb00b22 feat: center layout mirror option (#1577) 2021-12-10 11:48:14 +01:00
Luke KershawandGitHub 914da77bb7 fix: bottom_pane remove results border next to prompt (#1563) 2021-12-08 18:28:55 +00:00
Luke KershawandGitHub 0c819d6605 docs: layout strategy usage (#1493) 2021-12-03 15:21:26 +01:00
Luke KershawandGitHub 22e59556f9 chore: layout strategy tidying (#1509) 2021-11-29 10:42:23 +00:00
max397574andGitHub 7cfddbfd93 feat: add preview width option for bottom_pane layout (#1505)
* feat(layout_strategies): started adding preview width for bottom pane

* fix(bottom_pane preview_width): fixed some values and added defualt

* fix(config): better default for preview cutoff

* fix(layout): removed unnecessary variable value
2021-11-28 17:32:50 +00:00
Luke KershawandGitHub 414a7a5b44 feat: extend functionality of entry_display.create (#1408)
* feat: extend functionality of `entry_display.create`

- now allows passing functions or fractional values to `width` option

* refactor: cache `width` instead of results window size

* feat: use new `width` functionality for more entry makers
2021-11-27 16:00:24 +00:00
Luke Kershawandjohnybx edcf07cf88 feat: layout actions (#1383)
Co-authored-by: johnybx <johnybx@users.noreply.github.com>
2021-11-18 19:44:12 +00:00
Julian FrickerandGitHub 6652d4d555 feat: Full width select (#1403)
Can be changed back by setting 
telescope.setup {
  defaults = {
    hl_result_eol = false,
  }
}
2021-11-04 07:22:09 +01:00
Simon HauserandGitHub 0caec3d6e4 Revert "break: changed the results window highlight to always be full width (#1312)" (#1398)
This reverts commit 3b9ac8edba.
2021-10-31 17:02:38 +01:00
Julian FrickerandGitHub 3b9ac8edba break: changed the results window highlight to always be full width (#1312)
Can be changed back by setting 
telescope.setup {
  defaults = {
    hl_result_eol = false,
  }
}
2021-10-29 18:57:41 +02:00
VsevolodandGitHub 782d802d44 fix: missing check for negative index in cycle scrolling (#1372) 2021-10-24 16:01:18 +02:00
Simon HauserandGitHub 50e45f86d9 fix: scroll_strategy limit + sorting_strategy descending (#1322) 2021-10-09 15:23:18 +02:00
koopa1338andGitHub 2dc75704b7 fix: scroll_strategy limit (#1320) 2021-10-09 09:06:52 +02:00
be600b5421 feat: more prompt position strategies (#1280)
* feat: allow `prompt_position` for `vertical` layout strategy

* feat: allow `prompt_position` for `bottom_pane` layout strategy

* stylua

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

* refactor: switch to `string.format`

* stylua

* feat: allow `prompt_position` for `center` layout strategy

* feat: handle user defined `prompt_position` within themes

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

* fix: tweak `center` layout

- ensure `prompt` title is visible when `prompt_position="bottom"`

* fix: refactor `center` tweak

- move title to bottom of picker when `prompt_position="bottom"`

* fix: tweak `bottom_pane` layout

* stylua

Co-authored-by: Github Actions <actions@github>
2021-10-04 21:16:58 +02:00
Luke KershawandGitHub 007b6e3061 fix: adjust layout positioning for new indexing (#1260) 2021-09-19 17:23:37 +01:00
37c9ab6688 feat: layout_strategies refactor (#1039)
* wip: 2021-07-22 15:00 BST

* wip: `horizontal` refactored

* wip: `center` refactored

* wip: `cursor` and `vertical` refactored

* wip: `current_buffer` refactor

- also changed `layout_config_defaults` as they gave errors when using `current_buffer`

* wip: `bottom_pane` refactor

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

* fix: put accidentally remove config option back

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

* wip: standardise `height` calculation for `center` and `bottom_pane`

* wip: improve comments

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

* stylua

- also fix a merge mistake

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

* fix: attempt to fix bad merge

* refactor: remove unused entry in `borderchars` table

- also fix some typos

* wip: tweak padding for `bottom_pane`

* wip: add `tabline` checks to `bottom_pane`

- also tweaked position so that `statusline` is not covered when borders are enabled

* stylua

* refactor: factor out size capping function

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

* fix: adjust tests that relied on height being number of results

* fix: forgot variable in calc_size_and_spacing

* fix: maybe this fixes these tests?

* test: try other plenary branch for ci

* test: switch back to main plenary branch for ci

* fix: actually define `max_results` in the test

* fix: final tweaks for edge cases

Co-authored-by: Github Actions <actions@github>
2021-09-19 09:30:25 +01:00
Simon Hauser 5131df7df1 docs: rewrite readme and add missing config values + builtin opts 2021-09-16 11:12:12 +02:00
TJ DeVriesandGitHub 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
Simon HauserandGitHub 79644ab677 chore: use stylua for formatting (#1040)
* chore: stylua job and config

* reformat with stylua
2021-07-23 11:42:37 -04:00
Luke KershawandGitHub d057b10503 fix: check if tabline is present when calculating certain layouts (#1027)
* fix: check if tabline is present when calculating certain layouts

- also tweaks height calculation for `center` strategy

* refactor: remove `center` strategy tweak

- will reimplement something similar in another PR for a few of the strategies

* fix: check if `preview.line` is `nil`

* refactor: factor out `tbln` calculation and `max_lines` adjustment

- also tweaked `vertical` calculations so that no `nil` check is required
2021-07-20 18:15:01 +01:00
Ben SmithandGitHub 87fecbea95 fix for #847 (#1022) 2021-07-18 07:42:23 +00:00