nvim-telescope / telescope.nvim

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

In windows, the current buffer turns blank if the current path is in this format: path\to\(some)\thing #2992

Closed gozonjoedaimar closed 6 months ago

gozonjoedaimar commented 6 months ago

Description

Hi guys! Great work on This project. btw, I'm just getting started using nvim and I found this issue. I'm using windows and I can open the file using nvim path\to\(some)\thing but the buffer turns blank if I use telescope. can someone help me?

Neovim version

NVIM v0.9.5
Build type: RelWithDebInfo
LuaJIT 2.1.1703942320

Operating system and version

windows 11

Telescope version / branch / rev

telescope

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 14.1.0 (rev e50df40a19)
- OK fd: found fd 9.0.0

===== Installed extensions ===== ~

Telescope Extension: `ui-select` ~
- No healthcheck provided

Steps to reproduce

Im using lazynvim

Expected behavior

No response

Actual behavior

when running fuzzy find on current buffer

Minimal config

vim.cmd [[set runtimepath=$VIMRUNTIME]]
vim.cmd [[set packpath=/tmp/nvim/site]]
local package_root = '/tmp/nvim/site/pack'
local install_path = package_root .. '/packer/start/packer.nvim'
local function load_plugins()
  require('packer').startup {
    {
      'wbthomason/packer.nvim',
      {
        'nvim-telescope/telescope.nvim',
        requires = {
          'nvim-lua/plenary.nvim',
          { 'nvim-telescope/telescope-fzf-native.nvim', run = 'make' },
        },
      },
      -- ADD PLUGINS THAT ARE _NECESSARY_ FOR REPRODUCING THE ISSUE
    },
    config = {
      package_root = package_root,
      compile_path = install_path .. '/plugin/packer_compiled.lua',
      display = { non_interactive = true },
    },
  }
end
_G.load_config = function()
  require('telescope').setup()
  require('telescope').load_extension('fzf')
  -- ADD INIT.LUA SETTINGS THAT ARE _NECESSARY_ FOR REPRODUCING THE ISSUE
end
if vim.fn.isdirectory(install_path) == 0 then
  print("Installing Telescope and dependencies.")
  vim.fn.system { 'git', 'clone', '--depth=1', 'https://github.com/wbthomason/packer.nvim', install_path }
end
load_plugins()
require('packer').sync()
vim.cmd [[autocmd User PackerComplete ++once echo "Ready!" | lua load_config()]]
jamestrew commented 6 months ago

Hey thanks for reporting. I think we're tracking this issue here: https://github.com/nvim-telescope/telescope.nvim/issues/2446

See if this workaround can help you: https://github.com/nvim-telescope/telescope.nvim/issues/2446#issuecomment-1875123859

It's a pretty tricky one to fix unfortunately. I'm working on improvements to how we generally handle paths so hopefully these changes will eventually help to resolve this.

But I'm going to close this as it's a duplicate.

gozonjoedaimar commented 6 months ago

Thanks! this solved the issue with find_files and live_grep but not on current_buffer_fuzzy_find should I create a new ticket? @jamestrew Thanks btw

jamestrew commented 6 months ago

Ahh it's ok. It's the same underlying issue that impacting a many other pickers. I'll make a note in #2446 so we make sure to test this.