Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Telescope cannot create the history file #2651

Open
xarthurx opened this issue Aug 15, 2023 · 7 comments
Open

Telescope cannot create the history file #2651

xarthurx opened this issue Aug 15, 2023 · 7 comments
Labels
bug Something isn't working

Comments

@xarthurx
Copy link

Description

Also reported here: https://www.reddit.com/r/neovim/comments/v6towp/telescope_tries_to_create_cc_folder/

When doing a clean install, and enable the history functionality, telescope is unable to create the new folder/file.

image

The direct behavior is after entering the TS UI, I cannot get out. (by either pressing or to select some files).

Neovim version

NVIM v0.9.1
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3

Operating system and version

Windows

Telescope version / branch / rev

2d92125

checkhealth telescope

==============================================================================
telescope: 

- ERROR No healthcheck found for "telescope" plugin.

Steps to reproduce

  1. clean install nvim
  2. install telescope
  3. run telescope find-file, find-history, etc.

Expected behavior

No response

Actual behavior

no errors, the history file/folder should be created correctly.

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()]]
@xarthurx xarthurx added the bug Something isn't working label Aug 15, 2023
@xarthurx
Copy link
Author

manually creating telescope-history will also not work.
As somehow telescope tries to concatenate the current dir with the telescope-history dir.
Is this a plenary problem?

@xarthurx
Copy link
Author

OK, I found the problem:

I use set shellslash on Windows, to avoid the issue that I cannot open file paths with ().
This has no problem if TS has been run, but will create the above PATH issue for clean system.

What I did finally is:

  1. unset shellslash
  2. run TS once
  3. set shellslash back.

Now everything works.

@xarthurx
Copy link
Author

relative issue about the shellslash topic:
neovim/neovim#24542

@DrKJeff16
Copy link

DrKJeff16 commented Aug 20, 2023

relative issue about the shellslash topic: neovim/neovim#24542

In a config file? Or every time you open Nvim? Could you give an example? I'm trying to do the same but It doesn't result for me.

@xarthurx
Copy link
Author

You can set it in your config file, or :set shellslash.
You need to delete the whole nvim-data folder if you're on WIndows.

@Conni2461
Copy link
Member

yeah this is a plenary.path problem: nvim-lua/plenary.nvim#254

it was built without shellslash in mind. You can maybe try nvim-lua/plenary.nvim#371 (note you probably want to rebase the PR its kinda old), so we can maybe find a working solution for this problem.

I just dont have a windows machine at hand to do the required testing

@xarthurx
Copy link
Author

yeah this is a plenary.path problem: nvim-lua/plenary.nvim#254

it was built without shellslash in mind. You can maybe try nvim-lua/plenary.nvim#371 (note you probably want to rebase the PR its kinda old), so we can maybe find a working solution for this problem.

I just dont have a windows machine at hand to do the required testing

I wrote on that PR to get some attentions.

For Windows machine, perhaps a Virtual Machine?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants