MATLAB: Is it possible to annotate types so the tab completion works properly

codeideintellisenseMATLABsyntaxtab completiontype hints

I'm working on a project in Matlab which is pretty large and has many objects and functions. Matlab isn't exactly the best language for object oriented programming but its what I have to work with so it is what it is.
When writing functions that work on objects obviously the IDE has absolutely no idea what is the class of the variables being passed in since Matlab is dynamically typed. This means that the tab completion has no way to poll properties and is fairly useless.
In Python which can have similar issues this is remidied by optional type "hints" you can write in code.
# Regular Python code
def square(x):
y = x**2
return y
# Hinted Python code
def hinted_square(x: int) -> int:
y = x**2
y: int
return y
This is used both by static analyzers, and many IDEs because it can now do tab completion as it knows what the types are.
I don't really care too much about static analysis, but it would be really nice if I could get tab completion to work so I'm wondering if there is anything equivalent for MATLAB.

Best Answer

Matlab a way to customise tab completion with the functionsignatures.json file.It's not particularly well documented and when I last tried it, it behaved inconsistently with class methods. I don't think I found a way to make it work with properties but I've never had enough time to investigate properly.