More lua hints

This commit is contained in:
ef3d0c3e 2024-10-27 09:40:12 +01:00
parent 141760a677
commit f23f8db994
2 changed files with 16 additions and 7 deletions

View file

@ -212,15 +212,24 @@ impl RegexRule for ScriptRule {
)),
);
}
if let Some(hints) = Hints::from_source(token.source(), &state.shared.lsp) {
hints.add(matches.get(0).unwrap().end(), result);
}
} else if kind == 2
// Eval and Parse
{
if let Some(hints) = Hints::from_source(token.source(), &state.shared.lsp) {
hints.add(matches.get(0).unwrap().end(), result.clone());
}
let parse_source = Rc::new(VirtualSource::new(
Token::new(0..source.content().len(), source.clone()),
format!(":LUA:parse({})", source.name()),
result,
)) as Rc<dyn Source>;
state.with_state(|new_state| {
new_state.parser.parse_into(
new_state,