Sublime-JS-Custom icon indicating copy to clipboard operation
Sublime-JS-Custom copied to clipboard

LSP-Typescript type hints in pug template literal?

Open JGJP opened this issue 1 year ago • 0 comments

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

JGJP avatar Dec 25 '23 15:12 JGJP