styled-components / vscode-styled-components

Syntax highlighting for styled-components
MIT License
917 stars 117 forks source link

Plugin ignores custom snippets from javacsript.json file #424

Open mqklin opened 1 year ago

mqklin commented 1 year ago

Describe the bug (including copyable syntax) I have a snippet inside javascript.json file, and want to use it inside styled components:

  "medq": {
    "prefix": "medq",
    "body": [
      "@media (max-width: 767px) {",
      "  $0",
      "}",
    ],
  },

When I type medq inside styled backticks, I don't see any suggestions: image

But if I type medq in raw backticks, I see what I want: image

Expected behavior
I expect medq to show the same suggestion inside styled component.

Build environment

Extensions
I've disabled all extensions except this one.

Additional context
My settings.json file:

{
  "files.autoSave": "onFocusChange",
  "explorer.confirmDelete": false,
  "editor.formatOnSave": true,
  // "editor.defaultFormatter": "esbenp.prettier-vscode",
  "[rescript]": {
    "editor.defaultFormatter": "chenglou92.rescript-vscode"
  },
  "[typescript]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "editor.codeActionsOnSave": {
    "source.fixAll.eslint": true
  },
  "eslint.validate": ["javascript"],
  "explorer.sortOrder": "filesFirst",
  "explorer.confirmDragAndDrop": false,
  "workbench.sideBar.location": "right",
  "editor.detectIndentation": false,
  "editor.tabSize": 2,
  "editor.quickSuggestions": {
    "other": true,
    "comments": true,
    "strings": true
  },
  "editor.suggest.snippetsPreventQuickSuggestions": false,
  "editor.snippetSuggestions": "top",
  "typescript.suggest.autoImports": false,
  "javascript.suggest.autoImports": false,
  "editor.quickSuggestionsDelay": 0,
  "javascript.updateImportsOnFileMove.enabled": "never",
  "security.workspace.trust.untrustedFiles": "open",
  "tabnine.experimentalAutoImports": true
}