Closed gj1118 closed 5 years ago
Its due to styled_components: true
. When I turn it off, the typescript plugin starts providing completions for me agin.
Its because the root scope on the embedded css becomes source.css.embedded.js
. The typescript plugin only provides completions if the root source matches source.js
throughout the entire file.
@Thom1729 is there an easy way to fix this to make the root scope source.js?
This was broken by #55, which was done because Emmet needs the scopes cleared. The best solution is to revert the behavior, but leave an option to clear all scopes for Emmet users. This turns out to be a bit tricky, because the custom_template_tabs extension takes as its options a dict of tags, leaving no "room" for other options. Fixing this in a backward-compatible answer is surprisingly annoying, but I'm on the path to a solution.
Can I reopen this issue? I've tried several ways but still could not have TypeScript language service activated for a JS source file that has styled component or custom tag templates in it.
My JSCustom config:
{
"defaults": {
"flow_types": false,
"jsx": true,
"eslint_directives": true,
"custom_templates": {
"styled_components": true,
"clear_all_scopes": true,
"tags": {
"css": "scope:source.scss",
}
}
}
}
I'm using ST3 Dev build 3210; latest JS Custom cloned from github 2.3.2; TypeScript plugin 3.9.2
Hi , I am using LSP with my ST. I am using React for my project. When I set Babel to be default source , LSP works but it does not work when I set JS- custom - react .
Can you please let me know what might be an issue here ?
Thanks