Closed mystilleef closed 2 years ago
I think the solution here would be to setup the autocmd in the way that it's not triggered when being in a buffer with the TelescopePrompt
filetype.
Sorry, I have no belt in vimscript fu, something like this should maybe work?
au! InsertEnter lua if vim.bo.filetype ~= "TelescopePrompt" then vim.cmd[[silent! Goyo]] end
au! InsertLeave lua if vim.bo.filetype ~= "TelescopePrompt" then vim.cmd[[silent! Goyo!]] end
I'm assuming from the reaction that this can be closed and I don't think this is an issue that needs or can be principally solved from within Telescope. Please comment if you feel there's more to discuss and then we can reopen this.
@fdschmidt93 thanks for the response. Yeah, that's how I'm getting around this issue. I think the Telescope buffers shouldn't inherit all settings in vimrc
though. I'm not sure putting Telescope checks allover configuration settings is the way to go. That's a leaky abstraction. Telescope
should know about my vimrc
but my vimrc
should not know about or depend on Telescope
. Maybe the buffer should only inherit common “visual” settings and not behavioral ones.
Agreed, the buffers picker previewer is a well known issue. We at some point switched to showing actual buffers rather than copies of the files to be able to show highlighted terminal buffers.
This incurred a series of of follow up issues; most likely the issue you are facing is one of these. It's probably fixed for the time being with lua require 'telescope.builtin'.buffers { previewer = false }
. We will switch back to showing copies; it's on my todo list for when I have more time than replying to issues :) hope it helps for now
@fdschmidt93 Life without a previewer is not worth living. 😊 The checks will do for now.
Description
Telescope
is inheritingInsertLeave
andInsertEnter
events I have set up inautocmds
fromvimrc
.I've set up these events to toggle
Goyo
.Unfortunately, this breaks
Telescope
when I launch some pickers, especially the built-inbuffers
picker.Is there a way to prevent or disable this behavior? I've attached a video showing the issue.
Video
https://user-images.githubusercontent.com/273399/137406447-e75ca4f9-2cb0-49e2-b000-4f9f39600e5a.mp4
Neovim version
NVIM v0.6.0-dev+461-g88e16a7f3 Build type: Release LuaJIT 2.1.0-beta3 Compiled by lateef@bigdaddy
Operating system and version
Fedora 34 Linux (Workstation Edition) x86_64
checkhealth telescope
Steps to reproduce
nvim -nu minimal.lua
:Explore
or:edit
InsertMode
to make sure thatGoyo
is behaving as intended:Telescope buffers
to try to navigate to open documents.Expected behavior
I expected
Telescope
to show me open buffers that I can navigate to.Actual behavior
Telescope
andNeovim
become unusable. It seemsTelescope
is trying to activateGoyo
inside its own buffers.Minimal config