-
Notifications
You must be signed in to change notification settings - Fork 46
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
Issue when trying to use the api example open_window() command. #101
Comments
That error message is pretty confusing but the issue is that you're not setting the
|
I appreciate the reply. I first saw this error from a fresh clone of the repo, built the example/api, setup nvim as specified, then ran the open_window command and got that error. Everything else after that (the examples in my initial post) were me just trying different things to see if I could figure out what was wrong. I had made a number of changes to things in my local repo, trying different things, just to see what would happen, so I removed that and did a fresh clone again just now, built the api example and tried to run it and it segfaulted when doing the open_window command. That might be my fault, though. I see there has been a lot of commits since I made this post and setup my example plugin, so I will go back and review to see if there is anything new I missed that has to be done on my end. That said, I am not sure if the height field was missing from the example/api at the time I made this post? I had made no changes to it prior to my first attempt and receiving that error, but it's been a decent amount of time, so I do not recall now that I removed the original repo. Thanks, |
Can you try running your code again using v0.3.0? I just ran that example and it works fine for me on Neovim 0.9.0. If you're still experiencing this issue can you post the exact code that you're running? |
The segfault I received was from doing a fresh clone of main moments before my reply. I switched branch to v0.3.0 and tried again with the same process and result. cargo b --example api --features neovim-nightly
cp ./target/debug/examples/libapi.so ~/.local/share/nvim/api/lua/api.so I had this in my config at first, but causes nvim to segfault right off the rip. -- init.lua
-- plugin location ~/.local/share/nvim/api/lua/api.so
vim.cmd(string.format('set runtimepath+=%s', "~/.local/share/nvim/api"))
local status_ok, _ = pcall(require, "api")
if status_ok then
vim.notify("nvim api loaded!")
else
vim.notify("Failed to load nvim api test")
end
NVIM v0.9.0-dev-554+g6f25623e7
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3 Looking over the readme and such again, it doesn't appear that I am doing anything incorrectly, but if I am, I do apologize, I am not catching what that might be. |
Just to be sure I was not losing my marbles with my original post, I found the project I made from a copy of the api example which was build with 0.2, which is what prompted making this issue post. I did indeed have height, width, col, row. I also tried a fresh pull of the repo just now, and tried again to build the api demo and loaded it up in nvim with the same result as prior: I tried checking both the nvim logs as well as syslog, but didn't see any mention of anything in there. Are there any oxi logs that I am not seeing that I should check and post? |
Hey there,
I am having issues with the API examples (api.open_window() command). I came across a testing script in another thread and gave it a try to see if it was just me that was doing something wrong or not.
I ran the script and ended up with the same issue as my original plugin:
E5108: Error executing lua Value of type () couldn't be pushed on the stack: "non-float cannot have \'row\'".
.When I ran the tests that were included in ths repo (using nightly nvim), all the window ones passed, which threw me off a bit.
Doing some searching on the issue, it seems like it may have something to do with setting row/column and then having to set the window relative setting again after that? Unfortunately, I don't know enough about the nvim backend yet to try and do much more diagnostic, myself, outside of doing something silly:
I didn't expect much from this, but figured it might be worth a shot, lol.
Upon running the script, it looks like there might be another issue with the mlua example that I had not noticed, but wanted to still report it.
The text was updated successfully, but these errors were encountered: