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

Cannot paste text to enter cookie #95

Open
28jb11 opened this issue Apr 22, 2024 · 12 comments
Open

Cannot paste text to enter cookie #95

28jb11 opened this issue Apr 22, 2024 · 12 comments

Comments

@28jb11
Copy link

28jb11 commented Apr 22, 2024

I select Sign in (By Cookie) which takes me to the Enter cookie prompt. I then go to my browser and find the cookie from the graphql requests. I copy it to my clipboard. Then, when I move back to neovim to paste in the text, it simply enters nothing. I have tried ctrl-shift-v (this is what i usually use with neovim, and works fine everywhere else), shift-insert and the neovim command "*. None of these are working for pasting text into the prompt. I am on neovim 0.9.5 and have the latest version of leetcode.nvim installed.

@kawre
Copy link
Owner

kawre commented Apr 22, 2024

Have you tried pasting and pressing enter? Sometimes the prompt behaves weirdly and doesn't show that the text is pasted yet it's there

@28jb11
Copy link
Author

28jb11 commented Apr 22, 2024

Have you tried pasting and pressing enter? Sometimes the prompt behaves weirdly and doesn't show that the text is pasted yet it's there

Yes.

@kawre
Copy link
Owner

kawre commented Apr 22, 2024

Then you can try creating the cookie file manually. Create a file named cookie (cookie_cn for chinese version) inside vim.fn.stdpath("cache") + "leetcode" and paste it there

@Deshdeepak1
Copy link

Deshdeepak1 commented May 4, 2024

Same problem with me.

 Expected Lua number
stack traceback:
^I[C]: in function 'nvim_win_is_valid'
^I...k/.local/share/nvim/lazy/nui.nvim/lua/nui/input/init.lua:134: in function 'unmount'
^I...k/.local/share/nvim/lazy/nui.nvim/lua/nui/input/init.lua:111: in function <...k/.local/share/nvim/lazy/nui.nvim/lua/nui/input/init.lua:109>

I tried creating the cookie file at that file, now show notification "http error 499"

@kawre
Copy link
Owner

kawre commented May 5, 2024

@Deshdeepak1 what is your nvim version?

@kawre
Copy link
Owner

kawre commented May 5, 2024

Until MunifTanjim/nui.nvim#362 is not merged, creating the cookie file manually should work now without any errors now.

@Deshdeepak1
Copy link

@Deshdeepak1 what is your nvim version?

0.9.5

@Deshdeepak1
Copy link

creating the cookie file manually should work

it gives "http error 499"

@kawre
Copy link
Owner

kawre commented May 5, 2024

creating the cookie file manually should work

it gives "http error 499"

After updating? Make sure you are using graphql requests

@Deshdeepak1
Copy link

Okay, I updated leetcode.nvim , and it works now. Thanks.

@yqwu905
Copy link

yqwu905 commented May 6, 2024

Then you can try creating the cookie file manually. Create a file named cookie inside vim.fn.stdpath("cache") + "leetcode" and paste it there

Just a little addition, if you use leetcode.cn, then the file should be cookie_cn.

@phanen
Copy link

phanen commented May 6, 2024

You also need to manually trim out \n from tokens since nui input popup seems not working well with multiple lines.

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

5 participants