diff options
| author | Corentin Brunel <devildead13@gmail.com> | 2021-07-16 14:17:21 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-07-16 19:17:21 +0100 |
| commit | b13306e5cc6da855f77e02b37e807a4b7e32b761 (patch) | |
| tree | 03215a5aecc6e09d39aa376a84075af2b9b5ec17 /doc | |
| parent | 747396227d1e2283d4d59693ffec571a52195627 (diff) | |
feat: add cursor layout (#878)
* Add basic implementation of "cursor" layout strategy
* Update cursor layout strategy to properly follow cursor
* feat(cursor_layout): handle previewer
* Refactor cursor layout code
* Add cursor theme
* Update readme
* Improve cursor theme and layout documentation
* [docgen] Update doc/telescope.txt
skip-checks: true
* Remove trailing whitespace
* Fix issues related with neovim and plugin api changes
* [docgen] Update doc/telescope.txt
skip-checks: true
* Allow preview width to be configured
* [docgen] Update doc/telescope.txt
skip-checks: true
Co-authored-by: Github Actions <actions@github>
Co-authored-by: cbrunel <cbrunel@sogescom.local>
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/telescope.txt | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/doc/telescope.txt b/doc/telescope.txt index d5727cf..7bc2062 100644 --- a/doc/telescope.txt +++ b/doc/telescope.txt @@ -94,6 +94,9 @@ telescope.setup({opts}) *telescope.setup()* center = { preview_cutoff = 40 }, + cursor = { + preview_cutoff = 40 + }, height = 0.9, horizontal = { preview_cutoff = 120, @@ -912,6 +915,17 @@ themes.get_dropdown() *themes.get_dropdown()* +themes.get_cursor() *themes.get_cursor()* + Cursor style theme. + + Usage: + + `local builtin = require('telescope.builtin')` + `local themes = require('telescope.themes')` + `builtin.lsp_code_actions(themes.get_cursor())` + + + themes.get_ivy() *themes.get_ivy()* Ivy style theme. @@ -1034,6 +1048,29 @@ layout_strategies.center() *layout_strategies.center()* - preview_cutoff: When lines are less than this value, the preview will be disabled +layout_strategies.cursor() *layout_strategies.cursor()* + Cursor layout dynamically positioned below the cursor if possible. If there + is no place below the cursor it will be placed above. + + ┌──────────────────────────────────────────────────┐ + │ │ + │ █ │ + │ ┌──────────────┐┌─────────────────────┐ │ + │ │ Prompt ││ Preview │ │ + │ ├──────────────┤│ Preview │ │ + │ │ Result ││ Preview │ │ + │ │ Result ││ Preview │ │ + │ └──────────────┘└─────────────────────┘ │ + │ █ │ + │ │ + │ │ + │ │ + │ │ + │ │ + └──────────────────────────────────────────────────┘ + + + layout_strategies.vertical() *layout_strategies.vertical()* Vertical layout stacks the items on top of each other. Particularly useful with thinner windows. |
