emmylua_ls 0.8.0

A language server for emmylua.
1
2
3
4
5
6
7
8
9
10
11
12
use emmylua_code_analysis::LuaType;

pub fn is_function(typ: &LuaType) -> bool {
    typ.is_function()
        || match &typ {
            LuaType::Union(union) => union
                .get_types()
                .iter()
                .all(|t| matches!(t, LuaType::DocFunction(_) | LuaType::Signature(_))),
            _ => false,
        }
}