Comments (4)
What version of Neovim does this happen on?
from nvim-oxi.
I feel pretty foolish for this oversight-- it is happening on neovim 0.8.0. Looking back at my linux box, I was still running 0.7.2 on there, and after upgrading I also see a segfault. So, my assumption about this being macos-specific seems to be incorrect.
I will try and downgrade my macOS neovim instance to 0.7.2 and see if my test case starts working again. Is there any other information you need that might be helpful?
from nvim-oxi.
Plugins created with nvim-oxi
are compiled against a specific version of Neovim. Before Neovim 0.8.0 was released the default was to build against 0.7.2, and we had a nightly
feature flag to enable for targeting Neovim nightly. I'm assuming you didn't enable that feature so your plugin is being compiled for 0.7.2 but loaded by 0.8.0, causing the segfault.
With that said, this system has been recently rewritten to be more explicit, and it'll be added in the 0.2.0
release of nvim-oxi
in the coming days.
In the meantime I'd suggest using the latest master of nvim-oxi
in your Cargo.toml
. Then you'll have to enable one of the neovim-0-7
, neovim-0-8
or neovim-nightly
features depending on the Neovim version you're targeting.
There were also some breaking changes since 0.1.3
so the code above won't compile. This should however:
use nvim_oxi as oxi;
use nvim_oxi::api::{
self,
opts::CreateCommandOpts,
types::{CommandArgs, CommandNArgs, CommandRange},
};
#[oxi::module]
fn vim_plugin_test() -> oxi::Result<u32> {
let opts = CreateCommandOpts::builder().build();
let greetings = move |args: CommandArgs| {
api::out_write("Test");
Ok(())
};
api::create_user_command("Greetings", greetings, &opts)?;
Ok(42)
}
(btw, you can use CreateCommandOpts::default()
instead of builder().build()
).
from nvim-oxi.
@noib3 thank you so much for your quick, detailed, and very helpful responses. You were right on the money; I needed to compile against neovim 0.8.0. After doing so, I was able to get my plugin up and running.
I'm going to go ahead and close this issue. I appreciate the help!
from nvim-oxi.
Related Issues (20)
- Issue when trying to use the api example open_window() command. HOT 5
- Trying to use oxi::api::call_function() but I'm not sure how to map into a dictionary HOT 1
- This crate is causing neovim to crash on the latest commit HOT 4
- Test complete API
- The libuv example doesn't work HOT 2
- Can't locate `lua_pushlstring`
- Simple code error, help! HOT 1
- How to perform the api of nvim in other processes HOT 1
- [Windows][Powershell7] cannot find type `PathBuf` in this scope HOT 3
- [Windows][Powershell7] linking with `link.exe` failed: exit code: 1120 HOT 5
- [Ubuntu] Error while calling lua chunk... undefined symbol: luaopen_... HOT 1
- support derive
- [help] How to call other lua plugin exposed methods HOT 4
- Crash when loading the example plugin on Windows HOT 29
- Test macro doesn't seem to pick up on failures HOT 6
- nvim_oxi::api::types::Mode doesn't allow for Remap ("m") mode HOT 2
- Add Installation Instructions HOT 1
- Variance issue for `Function`
- Doesn't detect panics properly
- Buffer.set_text() does not play nicely inside of a MutexGuard HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nvim-oxi.