nvim-telescope / telescope.nvim

Find, Filter, Preview, Pick. All lua, all the time.
MIT License
15.48k stars 824 forks source link

Can't use telescope anymore, always showing no file name #1839

Closed BitInByte closed 2 years ago

BitInByte commented 2 years ago

Description

Every time that I try to run telescope and select files to preview or open a file I receive an error which doesn't allow me to open the file.

Neovim version

VIM v0.6.1
Build type: Release
LuaJIT 2.1.0-beta3

Operating system and version

macOS 12.3.1

checkhealth telescope

telescope: require("telescope.health").check()
========================================================================
## Checking for required plugins
  - OK: plenary installed.
  - OK: nvim-treesitter installed.

## Checking external dependencies
  - OK: rg: found ripgrep 13.0.0
  - OK: fd: found fd 8.3.2

## ===== Installed extensions =====

Steps to reproduce

trying to find a file it should show the error

Expected behavior

No response

Actual behavior

Error

Minimal config

-- local actions = require('telescope.actions')
-- Global remapping
------------------------------
require("telescope").setup {
  defaults = {
    vimgrep_arguments = {
      "rg",
      "--color=never",
      "--no-heading",
      "--with-filename",
      "--line-number",
      "--column",
      "--smart-case"
    },
    prompt_prefix = "> ",
    color_devicons = true,
    file_previewer = require("telescope.previewers").vim_buffer_cat.new,
    grep_previewer = require "telescope.previewers".vim_buffer_vimgrep.new,
    file_ignore_patterns = {"node_modules"},
    buffer_previewer_maker = require "telescope.previewers".buffer_previewer_maker,
    mappings = {
      i = {},
      n = {}
    },
    extensions = {
      fzy_native = {
        override_generic_sorter = false,
        override_file_sorter = true
      }
    }
  }
}

--require('telescope').load_extension('fzy_native')
l-kershaw commented 2 years ago

I can't reproduce this problem on my machine. Are you using the latest version of both plenary and telescope?

BitInByte commented 2 years ago

Found the issue but now I don't know how to solve it.

The problem is derived by this piece of code in my config:

vim.cmd [[
augroup remember_folds
  autocmd!
  autocmd BufWinLeave * mkview
  autocmd BufWinEnter * silent! loadview
augroup END
]]

It basically allow it to save my folds.

Conni2461 commented 2 years ago

We have filetypes for TelescopePrompt, TelescopeResults. So you can only do mkview if its neither of those two file types. I think that should help.

fdschmidt93 commented 2 years ago

I think we can close this as wontfix from telescope side. Should that not be the case, please open a new issue. Thanks

sutyum commented 1 year ago

Facing the same issue, any hints on how to fix this?

M3chanism commented 11 months ago

Same here, is there another way to save folds while using telescope?

jamestrew commented 11 months ago

Just exclude the telescope file types listed above in your autocommands i.e. don't use *.