Can't open file with NvimTree when LeetCode is open. #166

Open
opened 2025-02-24 23:38:28 -06:00 by bitorangej · 2 comments
bitorangej commented 2025-02-24 23:38:28 -06:00 (Migrated from github.com)

Hello, thank you for your contribution to this project. While using the leetcode plugin, I may have encountered an issue related to opening files. The specific situation is as follows:

First, I entered nvim leetcode.nvim in the terminal to open the LeetCode plugin page.

Image

Then, I used Ctrl+n (which is the shortcut I configured to open the NvimTree plugin) to open the NvimTree panel on the left.

Image

However, when I selected a file and pressed Enter, nothing happened, and the cursor automatically jumped to the LeetCode main page on the right. Could you please help me understand why this is happening?

Image

Hello, thank you for your contribution to this project. While using the `leetcode` plugin, I may have encountered an issue related to opening files. The specific situation is as follows: First, I entered `nvim leetcode.nvim` in the terminal to open the LeetCode plugin page. ![Image](https://github.com/user-attachments/assets/def6c47f-eb55-4d94-a718-365ecf1f12c0) Then, I used `Ctrl+n` (which is the shortcut I configured to open the NvimTree plugin) to open the NvimTree panel on the **left**. ![Image](https://github.com/user-attachments/assets/95a54a97-0a6e-4bcc-9f54-2dd2419dd02b) However, when I selected a file and pressed `Enter`, nothing happened, and the cursor automatically jumped to the LeetCode main page on the **right**. Could you please help me understand why this is happening? ![Image](https://github.com/user-attachments/assets/688cea83-dc61-4073-8c61-0a9ff003a7f7)
dee9c-git commented 2025-03-12 02:08:31 -05:00 (Migrated from github.com)

Not the main guy who made this, but I can make a guess:
I have a plugin called oil.nvim (it's like NvimTree but better XD)
If I do Space+o I get this:

Image

If you fork the repo, you can try git grep winfixbuf:

Image
I believe the creators don't want you to switch buffers, and since Leetcode questions are all individual problems, there isn't a good reason for switching to another file out of the blue.

If you want to continue doing say problem 2, you can go to Menu > Problems > List, then type 2.
Hope this helps!

Not the main guy who made this, but I can make a guess: I have a plugin called oil.nvim (~it's like NvimTree but better XD~) If I do ```Space+o``` I get this: ![Image](https://github.com/user-attachments/assets/e62d3389-799f-43ea-9fa0-f187587cd4d7) If you fork the repo, you can try ```git grep winfixbuf```: ![Image](https://github.com/user-attachments/assets/1946933e-834f-4a01-a2d4-f43786e1c470) I believe **the creators don't want you to switch buffers**, and since Leetcode questions are all individual problems, there isn't a good reason for switching to another file out of the blue. If you want to continue doing say problem 2, you can go to Menu > Problems > List, then type 2. Hope this helps!
bitorangej commented 2025-03-12 02:10:28 -05:00 (Migrated from github.com)

Thanks for your reply. I will have a try!

Thanks for your reply. I will have a try!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
arduinohatesme/leetcode.nvim#166
No description provided.