Thom1729 / Sublime-JS-Custom

Customizable JavaScript syntax highlighting for Sublime Text.
MIT License
137 stars 9 forks source link

LSP-Typescript type hints in pug template literal? #145

Open JGJP opened 8 months ago

JGJP commented 8 months ago

First of all thanks for this great package, it's really working well for me so far.

I've managed to set up highlighting for pug template literals with the following configuration:

{
    "configurations": {
        "TypeScript": {
            "file_extensions": [ "ts" ],
            "scope": "source.ts",
            "typescript": true,
        },
        "TypeScript (JSX)": {
            "name": "J's Pro TSX",
            "file_extensions": [ "tsx" ],
            "jsx": true,
            "scope": "source.tsx",
            "typescript": true,
            "eslint_directives": true,
            "custom_templates": {
                "tags": {
                    "pug": "scope:text.pug",
                    "css": "scope:source.js.css",
                    "createGlobalStyle": "scope:source.css", // v4 and above
                    "injectGlobal": "scope:source.css", // before v4
                },
                "styled_components": true
            }
        }
    },
}

My problem is that I can't seem to get type hints to work as they do in JSX. Here is what I see with scope hunter (I tried to modify the pug syntax to use source.ts in the attribute values, it allows me to use real typescript syntax but no type hints):

image

This is what I expect to see when hovering over typescript code in pug:

image