Skip to content

Commit

Permalink
fix: missing access function
Browse files Browse the repository at this point in the history
  • Loading branch information
Saghen committed Oct 24, 2024
1 parent 49e5112 commit d11f271
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lua/blink/cmp/fuzzy/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ pub fn destroy_db(_: &Lua, _: ()) -> LuaResult<bool> {
Ok(true)
}

pub fn access(_: &Lua, item: LspItem) -> LuaResult<bool> {
pub fn access(_: &Lua, item: LuaTable) -> LuaResult<bool> {
let item: LspItem = item.into();
let mut frecency_handle = FRECENCY.write().map_err(|_| {
mlua::Error::RuntimeError("Failed to acquire lock for frecency".to_string())
})?;
Expand Down Expand Up @@ -94,6 +95,6 @@ fn blink_cmp_fuzzy(lua: &Lua) -> LuaResult<LuaTable> {
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)
}

0 comments on commit d11f271

Please sign in to comment.