Skip to content

fix(ftplugin): disable folding in telescope results#3656

Merged
clason merged 1 commit into
nvim-telescope:masterfrom
ciara-uob:fix/folding_results
May 2, 2026
Merged

fix(ftplugin): disable folding in telescope results#3656
clason merged 1 commit into
nvim-telescope:masterfrom
ciara-uob:fix/folding_results

Conversation

@ciara-uob
Copy link
Copy Markdown

Description

Set nofoldenable in ftplugin/TelescopeResults.lua.

When using shiftwidth=0, foldmethod=indent, and foldlevelstart=0, the results in the TelescopeResults window get folded as you scroll.

Fixes #3629

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

  • Added problematic settings to minimal_init.vim (see below) and reproduced the error
  • Re-ran after changes with the same minimal_init.vim and verified the results are no longer folded

Configuration: (Modified minimal_init.vim used for testing)

set rtp+=.
set rtp+=../plenary.nvim/

runtime! plugin/plenary.vim
runtime! plugin/telescope.lua

let g:telescope_test_delay = 100

set foldmethod=indent foldlevelstart=0 shiftwidth=0
  • Neovim version (nvim --version):
    • NVIM v0.12.2
    • Build type: RelWithDebInfo
    • LuaJIT 2.1.1774896198
  • Operating system and version: Arch Linux, last system update 01/05/2026

Checklist:

  • My code follows the style guidelines of this project (stylua)
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (lua annotations)

foldmethod=indent and shiftwidth=0 causes results to collapse
@clason clason merged commit 62cc799 into nvim-telescope:master May 2, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Specific fold settings can mangle telescope results

3 participants