Skip to content

Commit d11f271

Browse files
committed
fix: missing access function
1 parent 49e5112 commit d11f271

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lua/blink/cmp/fuzzy/lib.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ pub fn destroy_db(_: &Lua, _: ()) -> LuaResult<bool> {
4141
Ok(true)
4242
}
4343

44-
pub fn access(_: &Lua, item: LspItem) -> LuaResult<bool> {
44+
pub fn access(_: &Lua, item: LuaTable) -> LuaResult<bool> {
45+
let item: LspItem = item.into();
4546
let mut frecency_handle = FRECENCY.write().map_err(|_| {
4647
mlua::Error::RuntimeError("Failed to acquire lock for frecency".to_string())
4748
})?;
@@ -94,6 +95,6 @@ fn blink_cmp_fuzzy(lua: &Lua) -> LuaResult<LuaTable> {
9495
exports.set("get_words", lua.create_function(get_words)?)?;
9596
exports.set("init_db", lua.create_function(init_db)?)?;
9697
exports.set("destroy_db", lua.create_function(destroy_db)?)?;
97-
// exports.set("access", lua.create_function(access)?)?;
98+
exports.set("access", lua.create_function(access)?)?;
9899
Ok(exports)
99100
}

0 commit comments

Comments
 (0)