summaryrefslogtreecommitdiff
path: root/lua/telescope/pickers/layout_strategies.lua
AgeCommit message (Collapse)Author
2023-03-21doc: fix border characters in docs (#2388)Pooyan Khanjankhani
* chore: Fix border characters in comments * [docgen] Update doc/telescope.txt skip-checks: true --------- Co-authored-by: Github Actions <actions@github>
2023-01-22docs: proof-read edits (#2311)James Trew
2022-07-12fix: cursor theme for nvim 0.7 (#2069)Simon Hauser
2022-07-12fix: cursor theme if winbar is set (#2066)Simon Hauser
2022-07-07chore: reformat with stylua 0.14.0Simon Hauser
2022-06-30break: deprecate utils.get_default utils.if_nil (#1545)Simon Hauser
2022-04-18docs: add module prefix (#1847)Simon Hauser
2022-03-13feat: improve UX with vim.notify (#1763)tami5
* 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-02Change center layout strategy to allow vertical anchoring (#1719)Alef Pereira
* 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>
2021-12-10feat: layout `anchor` (#1582)Luke Kershaw
* feat: add `anchor` option to some `layout_strategies` * tests: improve tests for `resolve_height/width`
2021-12-10feat: `center` layout `mirror` option (#1577)Luke Kershaw
2021-12-08fix: `bottom_pane` remove `results` border next to `prompt` (#1563)Luke Kershaw
2021-12-03docs: layout strategy usage (#1493)Luke Kershaw
2021-11-29chore: layout strategy tidying (#1509)Luke Kershaw
2021-11-28feat: add `preview width` option for `bottom_pane` layout (#1505)max397574
* 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-18feat: layout actions (#1383)Luke Kershaw
Co-authored-by: johnybx <johnybx@users.noreply.github.com>
2021-10-04feat: more prompt position strategies (#1280)Luke Kershaw
* 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-09-19fix: adjust layout positioning for new indexing (#1260)Luke Kershaw
2021-09-19feat: `layout_strategies` refactor (#1039)Luke Kershaw
* 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-16docs: rewrite readme and add missing config values + builtin optsSimon Hauser
2021-07-23chore: use stylua for formatting (#1040)Simon Hauser
* chore: stylua job and config * reformat with stylua
2021-07-20fix: check if tabline is present when calculating certain layouts (#1027)Luke Kershaw
* 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-18fix for #847 (#1022)Ben Smith
2021-07-18Mirror option for bottom_pane layout_strategy (#847)Ben Smith
* functional mirror opt for bottom_pane strategy * [docgen] Update doc/telescope.txt skip-checks: true * forgot 'end' to close function * [docgen] Update doc/telescope.txt skip-checks: true Co-authored-by: Github Actions <actions@github>
2021-07-16feat: add cursor layout (#878)Corentin Brunel
* 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>
2021-07-01feat: Consistent and sensible layout_config (#922)TJ DeVries
* feat: Consistent and sensible layout_config * [docgen] Update doc/telescope.txt skip-checks: true * [WIP]: Thu 17 Jun 2021 03:36:44 PM EDT * [WIP]: Thu 17 Jun 2021 03:38:11 PM EDT * layout_default -> layout_defaults * remove options from bug repot * Conni2461 suggestions: part 1 * [docgen] Update doc/telescope.txt skip-checks: true * Conni2461 suggestions: part 2 * [docgen] Update doc/telescope.txt skip-checks: true * Linting * Improve deprecation checks - Move `layout_defaults` handling to `deprecated.lua` - Check for "layout keys" outside of `layout_config` on `setup` * fixup: Just add a few more words Co-authored-by: Luke Kershaw <35707277+l-kershaw@users.noreply.github.com> Co-authored-by: Github Actions <actions@github>
2021-05-15feat: add ivy-style layout strategy (#771)TJ DeVries
* feat: add new layout strategy * [docgen] Update doc/telescope.txt skip-checks: true Co-authored-by: Github Actions <actions@github>
2021-04-08feat: asyncify pickers - except for live_grep (#709)TJ DeVries
* something kind of works already * yayayayayayayayayayayayayayayayayayayayayayayayayayayayayayayayaya * use async for everything besides live jobs * fix: fixup autocmds previewer * fix: lints for prime * temp: Add example of how we can think about async sorters * feat: Allow picker to decide when to cancel * fix: simplify scoring logic and tests * fixup: name * fix: Move back towards more backwards compat methods * fixup: Remove results from opts * fixup: remove trailing quote * fixup: Attempt to clean up some more async items. Next is status * wip: Add todo for when bfredl implements extmarks over the EOL * wip * fixup: got em * fixup: cleaning * fixup: docs
2021-03-05feat: define scroll speed + smart_send to qflist (#610)elianiva
* smart send to qflist * Previewer scrolling for half window height * Start doing cleanup in readme * feat: add ability to define the scrolling speed * move scrolling action to action.set * docs: added more docs for actions * [docgen] Update doc/telescope.txt skip-checks: true Co-authored-by: Simon Hauser <Simon-Hauser@outlook.de> Co-authored-by: Github Actions <actions@github>
2021-03-03docs: start documenting previewers (#574)Simon Hauser
Co-authored-by: Muhammed Zakir <MuhammedZakir@users.noreply.github.com>
2021-02-28feat: layout horizontal and vertical can now be mirrored (#548)Ben Smith
See documentation for more info
2021-02-24feat: Add vim docs & generators (#370)TJ DeVries
* feat: Add vim docs & generators * example of what we could start to do * Docgen CI job * wip * incremental updates. soon good validation * [Actions] Generate Documentation skip-checks: true * pretty cool now * [Actions] Generate Documentation skip-checks: true * make sure telescope is loaded first * Add updates. Maybe this will not delete now? * Add defaults tags as well * :smile: Co-authored-by: Simon Hauser <Simon-Hauser@outlook.de> Co-authored-by: Github Actions <actions@github>
2020-12-09ci: Add luacheck ci job (#317)Simon Hauser
* Add luacheck ci job * Fix most of the linting issues * fixup: lint Co-authored-by: TJ DeVries <devries.timothyj@gmail.com>
2020-10-27feat: Added some docs & validationTJ DeVries
2020-10-08feat: Do a bit better sorting for command historyTJ DeVries
To be honest, I'm not 100% sure this is fantastic, but it's definitely a step in the right direction for command history. Closes: #150
2020-10-08Revert "fix picking height as width (#157)" (#158)Dave Lage
This reverts commit c6716a5f6a496c1eba637e100136f9466b313c9e.
2020-10-08fix picking height as width (#157)Alvaro Muñoz
2020-10-08fix: Respect cmdheight and laststatusTJ DeVries
2020-10-08feat: ALPHA Add layout_defaults and layout_config optionsTJ DeVries
2020-10-08fix: Remove useless prompt_titleTJ DeVries
2020-10-04fix: Use width not results_width (#144)Dave Lage
2020-10-04fix: Results height configurable. Properly collapse on border = falserockerBOO
2020-09-23fix: Tighten up prompt on dropdown themerockerBOO
2020-09-18fix: Fixing positioning of dropdownrockerBOO
2020-09-17fix: Resolve many display issues with the dropdown themerockerBOO
2020-09-15feat: Themes (#79)Dave Lage
Big shoutout to @rockerBOO for the idea and basically all the impl! * feat: Add dropdown layout strategy * Adding more docs. Working better with options * Refactor borders * Fix for spaces * Add preview to layout. Add Themes. * feat: themes Co-authored-by: TJ DeVries <devries.timothyj@gmail.com>
2020-09-15feat: (wip) current_buffer strategyTJ DeVries
2020-09-11feat: Add some more layout optionsTJ DeVries
2020-09-11feat: add top down prompt positionTJ DeVries
2020-09-09feat: add flexTJ DeVries