formulahendry / vscode-auto-close-tag

Auto Close Tag for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=formulahendry.auto-close-tag
MIT License
179 stars 53 forks source link

Parameter List of generic types is not a tag. #29

Closed paritosh149 closed 7 years ago

paritosh149 commented 7 years ago

Actual: While writing code in Typescript, I entered following "getData(): Promise" and it converted to "getData(): Promise"

Expected: Since it is not HTML or XML tag, it should not be converted.

formulahendry commented 7 years ago

Hi @paritosh149 , you could set the languages that the auto-close-tag will be activated, In VS Code, File->Preferences->Settings, to open the settings.json. Then add config like below:

{
    "auto-close-tag.activationOnLanguage": [
        "html",
        "xml",
        "php"
    ]
}

Refer to this for the full list of Language Identifiers. Let me know if this works for you.

paritosh149 commented 7 years ago

No, it does not help. I am new to Angular2 and hence was working on "tours of heroes" tutorial. It contains Typescipt file that contains both HTML tags in template property and Generic classes such as Promise<>. Deactivating the auto-close-tag feature on typescript will affect the HTML tag completion in tempate property, too.

formulahendry commented 7 years ago

In this case, I suggest you use Sublime Text 3 Mode.

{
    "auto-close-tag.SublimeText3Mode": true
}

Or, disable auto-close-tag.enableAutoCloseTag and use Alt+. to close tag manually.

{
    "auto-close-tag.enableAutoCloseTag": false
}
paritosh149 commented 7 years ago

That works for me. Thanks.