UniFormal / IntelliJ-MMT

An IntelliJ-Plugin for MMT (under development)
3 stars 1 forks source link

Show autocomplete even when cursor is placed within text #33

Open ComFreek opened 4 years ago

ComFreek commented 4 years ago

Currently, if the cursor is placed after punctutation (e.g. a bracket), autocomplete works:

image

But it doesn't if the cursor is right after a normal alphabet character: image

For instance, this is a bit of a hassle if you write substitutions like f⟬γ⟭.

Jazzpirate commented 4 years ago

autocomplete uses a default IntelliJ-API-component, which is intended for... well, actual autocomplete, via a list that links e.g. "jDD" to the declaration delimiter. Unfortunately, if you have an alphabetic character (like "a") before it, IntelliJ looks for autocompletions for "aj", which are... well, none ¯_(ツ)_/¯

I'm almost sure that can be changed but that requires digging into the API again, and... sigh... `:D