Sorry, not sure exactly how to describe this.
(with my own lang/parser)
When I type
mykeyword<space>
and have this running:
let nodeBefore = syntaxTree(context.state).resolveInner(context.pos, -1)
console.log(nodeBefore.parent?.parent?.name , nodeBefore.parent?.name, nodeBefore.name )
I get: undefined undefined RulesText
(basically, @top
)
If I type one more letter, it figures out I’m in a statement, and the parent is what I expect/want.
RulesText Action ⚠
I’d love to be able to start autocompletion without typing that next letter.
Is that possible? Did I do something weird in my grammar?
I tried all the variations of resolve{Inner} that I could think of.
I’m probably just misunderstanding how this should be done.