A very annoying issue with telescope (file selection failing from time to time) - need to restart

Hi there,

I am running nvim v0.7.0 (config details at the end) with the telescope plugin (among others). The plugin works very well but at some point after a nvim session the file selection stops working: I open the search window and then select my file and hit but telescope does not load the file and I get stuck in that state/window. I have to restart nvim for things to work normally.

The telescope :checkhealth shows everything is ok (see below).

All the packages are up2date (Packed synced).

It is a very frustrating issue.

I was wondering if you have any suggestions on how to figure out how to fix it?

Thank you.

98 telescope: require("telescope.health").check()
 99 ========================================================================
100 ## Checking for required plugins
101   - OK: plenary installed.
102   - OK: nvim-treesitter installed.
103
104 ## Checking external dependencies
105   - OK: rg: found ripgrep 13.0.0
106   - OK: fd: found fd 8.4.0
vim --version
NVIM v0.7.0
Build type: Release
LuaJIT 2.1.0-beta3
Compiled by brew@HMBRW-A-001-M1-004.local

Features: +acl +iconv +tui
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/opt/homebrew/Cellar/neovim/0.7.0/share/nvim"

Run :checkhealth for more info

I found the issue. The problem only happens when I enable :set paste.
I have confirmed that.
Do you have any strategy to deal with copy and paste in neovim? Specifically, how to you ensure that you respect the formatting when doing a copy paste? How do you incorporate :set paste in your flow?

-drd

Usually :set paste should not be needed. What do you use for pasting?

Thank you for the reply and thank you for all your contributions to Neovim. I always see your handle in all the commits. If you don’t mind me asking: are most of those commits automated or you are running them by hand? Either way, thank you.

I am in OSX, I use the OS copy and paste (cmd-c – cmd-v). Typically from brave/chrome to my terminal (iterm2) running tmux and neovim.

That is very interesting. If I could get rid of having to do :set paste that would be wonderful. I am wondering what I am doing wrong that forces me to use :set paste.

-drd

he is an super AI :slight_smile: know everything.

Sorry, I’m not familiar with either iTerm2 or tmux, and I don’t currently have access to my laptop and am typing on my phone. There is a script that fetches patches from Vim and performs some file name string substitutions in the patch file, but most changes from Vim patches need to be applied manually.

Thank you, zeertzjq. I’d love not having to use set paste when I copy and paste from my browser.

Can anyone check if they have this same problem?
To reproduce it:

  1. :set paste
  2. open telescope
  3. find a file and selected

Does telescope close the window and opens the file in your current buffer or it gets stuck? If it gets stuck, what happens when you close the window, disable paste mode (:set nopaste) and reopen telescope again. Does it still get stuck when you select a file?

-drd