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

Unexpected argument '--local-events' found #29

Closed
I-Own-You opened this issue Apr 16, 2024 · 19 comments
Closed

Unexpected argument '--local-events' found #29

I-Own-You opened this issue Apr 16, 2024 · 19 comments

Comments

@I-Own-You
Copy link

Hi, just found your plugin here
Installed with lazy.nvim, tried to use it, but encountered an error.


Here is the error:
image

@sxyazi
Copy link

sxyazi commented Apr 16, 2024

Hi, this plugin requires the latest Yazi code at the moment.

@I-Own-You
Copy link
Author

I-Own-You commented Apr 16, 2024

I already have the latest version, as for 2024-03-10 09:23 UTC from the extra package of arch system.
the git version is 5 days younger 2024-03-05 13:46 (UTC)


Am i missing something ?

@mikavilpas
Copy link
Owner

mikavilpas commented Apr 16, 2024

Hi, I think you maybe have the latest release of yazi, but it looks like this plugin currently works with the latest unreleased version..

I see a couple of options:

  • I can make the event handling optional so that we can avoid this error for older versions of yazi. In the future I want to support newer versions only, but I think right now it needs to be handled in this plugin
  • in the mean time you can build yazi from source

@I-Own-You
Copy link
Author

i did build and install it from source now, but the keybindings doesnt seem to work, like opening files, or opening in split, .etc

@mikavilpas
Copy link
Owner

@sxyazi do you have plans to release a new version of yazi in the near future? I see sxyazi/yazi#836 which seems to be about a new "bigger" version release.

@mikavilpas
Copy link
Owner

@I-Own-You can you show what yazi --version outputs for you?

Mine is Yazi 0.2.4 (3881341 2024-04-10)

Can you also show what your neovim config is for yazi?

@I-Own-You
Copy link
Author

My version is: Yazi 0.2.4 (9e75ed5 2024-04-16)

the config is the default one.

@mikavilpas
Copy link
Owner

Thanks, I'll try to do some investigation later today. Also, what is your neovim version?

I am running

NVIM v0.10.0-dev-2915+g57adf8c6e
Build type: Release
LuaJIT 2.1.1710088188
Run "nvim -V1 -v" for more info

@I-Own-You
Copy link
Author

Mine is:

NVIM v0.9.5
Build type: Release
LuaJIT 2.1.1702233742

@I-Own-You
Copy link
Author

I have problems with nvim latest git version like 0.10.x, it randomly crashes, but i will try to install it, maybe it will work with yazi

@I-Own-You
Copy link
Author

I-Own-You commented Apr 16, 2024

I have installed the latest neovim git version, didnt work anyway

@mikavilpas
Copy link
Owner

mikavilpas commented Apr 16, 2024

Ok, I see some problems that might be easily fixable. If you are still using what seems to be your config, it seems like you're actually overriding the default keymappings with an empty function here.

Can you try using a very minimal set of options, for example the same ones that I set in my config here?

update: I added the instructions to the readme now


I think this confusion is a failure of communication on my part. I will try to make the readme much clearer about this 👍🏻

mikavilpas added a commit that referenced this issue Apr 16, 2024
@I-Own-You
Copy link
Author

Ok, I see some problems that might be easily fixable. If you are still using what seems to be your config, it seems like you're actually overriding the default keymappings with an empty function here.

Can you try using a very minimal set of options, for example the same ones that I set in my config here?

update: I added the instructions to the readme now

I think this confusion is a failure of communication on my part. I will try to make the readme much clearer about this 👍🏻

indeed, these 2 lines are the problem:

for opening functionality like "o": open_file_function = function(chosen_file, config) end
for keymaps: set_keymappings_function = function(yazi_buffer_id, config) end

so i commented them, now it works fine

@I-Own-You
Copy link
Author

i will probably remove all options beside UI related, so it will be more relevant

@mikavilpas
Copy link
Owner

Nice 👍🏻

Does it work for you now? Can this issue be closed?

@I-Own-You
Copy link
Author

Nice 👍🏻

Does it work for you now? Can this issue be closed?

actually, one more question if you dont mind, there is o that will open the file, but there is O for interactive opening from choosing programms, it doesnt work in yazi from neovim, its supposed to work like that ?

@mikavilpas
Copy link
Owner

I hadn't realized that's a feature 😆

No, it's not supposed to work that way. I'll investigate, thanks for the report.

@I-Own-You
Copy link
Author

I hadn't realized that's a feature 😆

No, it's not supposed to work that way. I'll investigate, thanks for the report.

then yes, this issue can be closed

@mikavilpas
Copy link
Owner

Ok, I'll track that in the linked issue. You can subscribe to that for updates.

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

3 participants