stinb / UnderstandForVSCode

VS Code extension for Understand
https://www.scitools.com
MIT License
1 stars 0 forks source link

Allow configuration for hover information #3

Open RobbyCBennett opened 4 months ago

RobbyCBennett commented 4 months ago

Right now, the hover information shows the type, name, and value in the format of the language. However, a user may prefer the separated data like in Understand, or something else entirely.

RobbyCBennett commented 4 months ago

The extension right now: image

Understand: image

RobbyCBennett commented 4 months ago

Idea of what the setting may look like:

{
    "understand.hover": {
        "Function": "{freetext(UnderlyingType)} {longname}({parameters})",
        "Javascript Function": "function {longname}({parameters})",
        "Python Function": "def {longname}({parameters})",

        "Object, Parameter": "{freetext(UnderlyingType)} {longname}",
        "Javascript Object, Javascript Parameter, Python Object, Python Parameter": "{longname}: {freetext(UnderlyingType)}",
    },
}
RobbyCBennett commented 3 months ago

The default hover info should have the preceding comment of the entity. Make sure to try different ref kinds in the refkindstring parameter in case the declaration has a comment and the definition doesn't.

RobbyCBennett commented 2 months ago

Also, make sure to improve the default Python hover message for variable types and return types.