mikavilpas / yazi.nvim

A Neovim Plugin for the yazi terminal file manager
MIT License
216 stars 7 forks source link

yazi Can't open the file. #71

Closed Wu-Felix closed 1 month ago

Wu-Felix commented 1 month ago

yazi Select file by enter or no response

win11

mikavilpas commented 1 month ago

Can you try following these instructions and posting the results? https://github.com/mikavilpas/yazi.nvim/issues/67#issuecomment-2101170724

Someone else reported issues on windows too, but I don't have access to it.

Wu-Felix commented 1 month ago
  1. No WSL,Windown environment。
  2. Even if all other plug are blocked.
  3. 3.I tried neovide/wezterm/powershell It's all useless .tfm.nvim this will work properly.
Wu-Felix commented 1 month ago

My configuration { "mikavilpas/yazi.nvim", dependencies = { "nvim-lua/plenary.nvim", }, event = "VeryLazy", keys = { { -- 👇 choose your own keymapping "ya", function() require("yazi").yazi() end, { desc = "Open the file manager" }, }, { -- Open in the current working directory "cw", function() require("yazi").yazi(nil, vim.fn.getcwd()) end, desc = "Open the file manager in nvim's working directory", }, }, ---@type YaziConfig opts = { -- the path to a temporary file that will be created by yazi to store the -- chosen file path. This is used internally but you might want to change -- it if there are issues accessing the default path. chosen_file_path = "C:/Users/Administrator/AppData/Roaming/yazi/state/yazi_filechosen/yazi_filechosen",

  -- the path to a temporary file that will be created by yazi to store
  -- events
  events_file_path = "C:/Users/Administrator/AppData/Roaming/yazi/state/yazi.nvim.events.txt",
  -- the floating window scaling factor. 1 means 100%, 0.9 means 90%, etc.
  floating_window_scaling_factor = 0.8,

  -- enable this if you want to open yazi instead of netrw.
  -- Note that if you enable this, you need to call yazi.setup() to
  -- initialize the plugin. lazy.nvim does this for you in certain cases.
  open_for_directories = true,
},

}

mikavilpas commented 1 month ago

Could you try these instructions out? https://github.com/mikavilpas/yazi.nvim/issues/67#issuecomment-2106285800

Wu-Felix commented 1 month ago

Run your configuration, it will work properly yazi. log: [2024-05-13 12:35:54] DEBUG Opening yazi with the command: (yazi "D:\workspace" --local-events "rename,delete,trash,move" --chooser-file "C:\Users\Administrator\AppData\Local\Temp\nvim.0\Pu3C3j\0" > C:\Users\Administrator\AppData\Local\Temp\nvim.0\Pu3C3j\1) [2024-05-13 12:36:15] DEBUG Opening yazi with the command: (yazi "D:\workspace\test.ps1" --local-events "rename,delete,trash,move" --chooser-file "C:\Users\Administrator\AppData\Local\Temp\nvim.0\Pu3C3j\2" > C:\Users\Administrator\AppData\Local\Temp\nvim.0\Pu3C3j\3) [2024-05-13 12:50:12] DEBUG Opening yazi with the command: (yazi "D:\workspace\test.ps1" --local-events "rename,delete,trash,move" --chooser-file "C:\Users\Administrator\AppData\Local\Temp\nvim.0\Pu3C3j\4" > C:\Users\Administrator\AppData\Local\Temp\nvim.0\Pu3C3j\5)

Wu-Felix commented 1 month ago

The log under my configuration [2024-05-13 12:56:53] DEBUG Opening yazi with the command: (yazi "C:\Users\Administrator\AppData\Local\nvim\lua\plugins\yazi.lua" --local-events "rename,delete,trash,move" --chooser-file "C:/Users/Administrator/AppData/Roaming/yazi/state/yazi_filechosen/yazi_filechosen" > C:/Users/Administrator/AppData/Roaming/yazi/state/yazi.nvim.events.txt) [2024-05-13 12:57:00] DEBUG Opening yazi with the command: (yazi "C:\Users\Administrator\AppData\Local\nvim\lua\plugins\yazi.lua" --local-events "rename,delete,trash,move" --chooser-file "C:/Users/Administrator/AppData/Roaming/yazi/state/yazi_filechosen/yazi_filechosen" > C:/Users/Administrator/AppData/Roaming/yazi/state/yazi.nvim.events.txt) [2024-05-13 12:59:02] DEBUG Opening yazi with the command: (yazi "C:\Users\Administrator\AppData\Local\nvim\lua\plugins\yazi.lua" --local-events "rename,delete,trash,move" --chooser-file "C:/Users/Administrator/AppData/Roaming/yazi/state/yazi_filechosen/yazi_filechosen" > C:/Users/Administrator/AppData/Roaming/yazi/state/yazi.nvim.events.txt)

mikavilpas commented 1 month ago

Thanks, I appreciate the effort!

Based on what you said above, I think this is what is going on:

# this worked for you 👍
yazi "D:\workspace" --local-events "rename,delete,trash,move" --chooser-file "C:\Users\Administrator\AppData\Local\Temp\nvim.0\Pu3C3j\0" > C:\Users\Administrator\AppData\Local\Temp\nvim.0\Pu3C3j\1

# this did not work for you 👎
yazi "C:\Users\Administrator\AppData\Local\nvim\lua\plugins\yazi.lua" --local-events "rename,delete,trash,move" --chooser-file "C:/Users/Administrator/AppData/Roaming/yazi/state/yazi_filechosen/yazi_filechosen" > C:/Users/Administrator/AppData/Roaming/yazi/state/yazi.nvim.events.txt

I have a suggestion you can try:

Apply these changes to your yazi.nvim configuration: