Skip to content

Error when using LazyVim #131

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

Closed
mksonkar opened this issue Oct 2, 2024 · 7 comments
Closed

Error when using LazyVim #131

mksonkar opened this issue Oct 2, 2024 · 7 comments

Comments

@mksonkar
Copy link

mksonkar commented Oct 2, 2024

When I run nvim leetcode.nvim, I get this error

Error detected while processing VimEnter Autocommands for "*":
Error executing lua callback: ....local/share/nvim/lazy/plenary.nvim/lua/plenary/path.lua:511: FileNotFoundError
stack traceback:
        [C]: in function 'error'
        ....local/share/nvim/lazy/plenary.nvim/lua/plenary/path.lua:511: in function 'mkdir'
        ...are/nvim/lazy/leetcode.nvim/lua/leetcode/config/init.lua:62: in function 'setup'
        ...so/.local/share/nvim/lazy/leetcode.nvim/lua/leetcode.lua:50: in function 'start'
        ...so/.local/share/nvim/lazy/leetcode.nvim/lua/leetcode.lua:92: in function <...so/.local/share/nvim/lazy/leetcode.nvim/lua/leetcode.lua:91
>

and if I run :Leet after nvim window, I get
leetcode.nvim Failed to initialize: `neovim` contains listed buffers

@redoxahmii
Copy link

Found any solutions anyone ?

@kawre
Copy link
Owner

kawre commented Dec 2, 2024

Found any solutions anyone ?

If you use snacks.nvim dashboard, it should be fixed folke/snacks.nvim#191, otherwise use https://github.com/kawre/leetcode.nvim?tab=readme-ov-file#non-standalone-mode

@kawre kawre closed this as completed Dec 2, 2024
@kawre
Copy link
Owner

kawre commented Dec 2, 2024

And if someone gets FileNotFoundError, make sure :echo stdpath("data") (if you use custom storage then check that) directory exists

@redoxahmii
Copy link

One last thing i wanted to ask is the option of fzf-lua as the picker as well because using telescope just so i can pick the questions is not really a good experience.
This should not take too much time as you can use fzf_exec to implement the already previously done process for telescope and add a single detect beforehand.

@kawre
Copy link
Owner

kawre commented Dec 3, 2024

One last thing i wanted to ask is the option of fzf-lua as the picker as well because using telescope just so i can pick the questions is not really a good experience. This should not take too much time as you can use fzf_exec to implement the already previously done process for telescope and add a single detect beforehand.

Can you try #150 and tell me if it works?

@redoxahmii
Copy link

@kawre works like a charm.
I've tested in the most places where leetcode.nvim requires some fuzzy picking and all is working.

@pick3t
Copy link

pick3t commented Dec 31, 2024

I encountered the same problem and it was due to the missing stdpath("cache") on my system.
The path points to $HOME/.cache/nvim in my case, you will need to check yours by :echo stdpath("cache") in your nvim.
Create one mkdir -p $HOME/.cache/nvim solved my problem.

IMO the missing dir should be created when you first try to run nvim leetcode.nvim in standalone mode. Not sure if it was implemented, didn't read the code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants