mirror of
https://mzte.de/git/LordMZTE/dotfiles.git
synced 2024-09-27 12:38:58 +02:00
change neogit command to :Neog
This commit is contained in:
parent
9a1510a643
commit
a02d1ccdff
2 changed files with 3 additions and 2 deletions
|
@ -2,4 +2,4 @@
|
||||||
|
|
||||||
(ngit.setup {})
|
(ngit.setup {})
|
||||||
|
|
||||||
(vim.api.nvim_create_user_command :Neogit ngit.open {:nargs 0})
|
(vim.api.nvim_create_user_command :Neog ngit.open {:nargs 0})
|
||||||
|
|
|
@ -7,7 +7,8 @@ pub const c = @cImport({
|
||||||
});
|
});
|
||||||
|
|
||||||
/// Generates a wrapper function with error handling for a lua CFunction
|
/// Generates a wrapper function with error handling for a lua CFunction
|
||||||
pub fn luaFunc(comptime func: fn (*c.lua_State) anyerror!c_int) c.lua_CFunction {
|
/// func should be `fn(*c.lua_State) !c_int` ()
|
||||||
|
pub fn luaFunc(comptime func: anytype) c.lua_CFunction {
|
||||||
return &struct {
|
return &struct {
|
||||||
fn f(l: ?*c.lua_State) callconv(.C) c_int {
|
fn f(l: ?*c.lua_State) callconv(.C) c_int {
|
||||||
return func(l.?) catch |e| {
|
return func(l.?) catch |e| {
|
||||||
|
|
Loading…
Reference in a new issue