sindrets / diffview.nvim

Single tabpage interface for easily cycling through diffs for all modified files for any git rev.
Other
4.02k stars 111 forks source link

DiffViewOpen throws FileNotFoundError #261

Closed domvo closed 1 year ago

domvo commented 1 year ago

I installed plenary and diffview with VimPlug. When I try to open it with :DiffViewOpen I get the following error message:

Error executing Lua callback: ...cal/share/nvim/plugged/plenary.nvim/lua/plenary/path.lua:503: FileNotFoundError
stack traceback:
        [C]: in function 'error'
        ...cal/share/nvim/plugged/plenary.nvim/lua/plenary/path.lua:503: in function 'mkdir'
        ...ocal/share/nvim/plugged/plenary.nvim/lua/plenary/log.lua:140: in function 'info'
        ...al/share/nvim/plugged/diffview.nvim/lua/diffview/lib.lua:24: in function 'diffview_open'
        ...l/share/nvim/plugged/diffview.nvim/lua/diffview/init.lua:109: in function 'open'
        ...cal/share/nvim/plugged/diffview.nvim/plugin/diffview.lua:23: in function <...cal/share/nvim/plugged/diffview.nvim/plugin/diffview.lua:22>

System Info:

I triple-checked and both plugins were installed correctly.

Output of :PlugInstall:

- cmp-buffer: Already installed
- fzf: Already installed
- cmp-cmdline: Already installed
- cmp-path: Already installed
- fzf.vim: Already installed
- nvim-cmp: Already installed
- nvim-web-devicons: Already installed
- nerdtree: Already installed
- plenary.nvim: Already installed
- diffview.nvim: Already installed
- vim-fugitive: Already installed
- vim-easymotion: Already installed
- nvim-lspconfig: Already installed
- gruvbox: Already installed
- vim-javascript: Already installed
- vim-terraform: Already installed
- vim-prettier: Already installed
- vim-airline-themes: Already installed
- vim-airline: Already installed
- onehalf: Already installed
- cmp-nvim-lsp: Already installed

I couldn't find anything on Google, unfortunately. Any ideas?

sindrets commented 1 year ago

If I recall correctly this happens when Nvim's cache directory does not exist, or is not writable. You can find the path to where nvim expects to find the cache directory by running:

:echom stdpath("cache")

Make sure that directory exists, and is writable.

sindrets commented 1 year ago

Closing due to inactivity from OP.