From d11f271ddd980e05545627093924e8359c5416b3 Mon Sep 17 00:00:00 2001 From: Liam Dyer Date: Wed, 23 Oct 2024 20:55:04 -0400 Subject: [PATCH] fix: missing access function --- lua/blink/cmp/fuzzy/lib.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lua/blink/cmp/fuzzy/lib.rs b/lua/blink/cmp/fuzzy/lib.rs index a3bb5db0..a3e9a15c 100644 --- a/lua/blink/cmp/fuzzy/lib.rs +++ b/lua/blink/cmp/fuzzy/lib.rs @@ -41,7 +41,8 @@ pub fn destroy_db(_: &Lua, _: ()) -> LuaResult { Ok(true) } -pub fn access(_: &Lua, item: LspItem) -> LuaResult { +pub fn access(_: &Lua, item: LuaTable) -> LuaResult { + let item: LspItem = item.into(); let mut frecency_handle = FRECENCY.write().map_err(|_| { mlua::Error::RuntimeError("Failed to acquire lock for frecency".to_string()) })?; @@ -94,6 +95,6 @@ fn blink_cmp_fuzzy(lua: &Lua) -> LuaResult { exports.set("get_words", lua.create_function(get_words)?)?; exports.set("init_db", lua.create_function(init_db)?)?; exports.set("destroy_db", lua.create_function(destroy_db)?)?; - // exports.set("access", lua.create_function(access)?)?; + exports.set("access", lua.create_function(access)?)?; Ok(exports) }