Comments (6)
There's currently no public method to get the inner BufHandle
. What's your use case?
from nvim-oxi.
I need it to call another vim function that uses the buffer id
let buffer = create_buf(true, false)?;
let buf_nbr: Object = buffer.clone().into();
let buf_nbr = unsafe { buf_nbr.as_integer_unchecked() as i32 };
let vim: LuaTable = lua.globals().get("vim")?;
let api: LuaTable = vim.get("api")?;
let set_buf_keymap: LuaFunction = api.get("nvim_buf_set_keymap")?;
let result = set_buf_keymap.call::<_, ()>((buf_nbr, mode, key, rhs, options));
from nvim-oxi.
That's not necessary, we have bindings to all the vim.api
functions in the api
module. Try Buffer::set_keymap()
instead.
from nvim-oxi.
Oh! Thank you! And thank you for nvim oxi, you rock! ❤️
from nvim-oxi.
Hello, I just got upon something I cannot handle really easily because I don't have access to the buffer id. I'm making a plugin that needs to store the opened buffer it created. There may be a workaround but I cannot find it.
from nvim-oxi.
Related Issues (20)
- [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
- `println!` writes to nvim process HOT 4
- Not sure you answered my question HOT 2
- Use LuaFunction as `rhs` for `buffer_keymap_set` that should capture local variable HOT 2
- [Question] Use serializable structs as input to call method? HOT 4
- [Question] Handling custom errors HOT 4
- f32 conversion issue? HOT 2
- Failed to resolve: could not find `plugin` in `nvim_oxi` HOT 1
- "Validation complete used without nargs" error on stable
- Version `0.4.2` gives me compilation errors HOT 3
- Api nvim_cmd not working HOT 2
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.