vscode-react-javascript-snippets icon indicating copy to clipboard operation
vscode-react-javascript-snippets copied to clipboard

Snippets not working in .jsx files (anfn)

Open izznogooood opened this issue 2 years ago • 3 comments

When using "anfn"-> tab inside the brackets "{}" anywhere in the jsx component return statement, nothing happens (filename xyz.jsx).

return (
          ..........
          <IconButton
            color="inherit"
            sx={{ ml: 1 }}
            onClick={ () => {} } // wanted result
          >
     

          <IconButton
            color="inherit"
            sx={{ ml: 1 }}
            onClick={anfn    } // actual result
          >
)

VSCode: 1.74.2 ES7+ React/Redux/React-Native snippets: v4.4.3 (12/25/2022,)

In case of conflicts VScode config: (I tried a hale mary by adding the config array manually and adding html)

{
    "workbench.colorTheme": "Ubuntu Color VSCode Deep Dark",
    "workbench.iconTheme": "material-icon-theme",
    "files.autoSave": "afterDelay",
    "editor.fontSize": 16,
    "editor.fontWeight": "normal",
    "explorer.confirmDelete": false,
    "workbench.startupEditor": "none",
    "emmet.includeLanguages": {
        "vue-html": "html",
        "javascript": "javascriptreact"
    },
    "redhat.telemetry.enabled": false,
    "rainbowTags.allowEverywhere": true,
    "eslint.format.enable": true,
    "auto-rename-tag.activationOnLanguage": [
        "*"
    ],
    "editor.codeActionsOnSave": {
        "source.fixAll.eslint": true
    },
    "files.exclude": {
        "**/.git": false,
    },
    "[javascript]": {
        "editor.defaultFormatter": "dbaeumer.vscode-eslint"
    },
    "git.enableSmartCommit": true,
    "totalTypeScript.hideAllTips": false,
    "totalTypeScript.hideBasicTips": false,
    "reactSnippets.settings.languageScopes": "typescript,typescriptreact,javascript,javascriptreact,html",
}

izznogooood avatar Dec 27 '22 00:12 izznogooood

The reason for this is the vscode built-in extension TypeScript and JavaScript Language Features, I'm looking for a fix

darckex avatar Feb 04 '23 13:02 darckex

I found the same problem with this, hope will fix it soon

usmanlubis avatar Feb 04 '23 15:02 usmanlubis

Meanwhile...

You can search through snippets with ES7 snippet search command which can be run with CMD + Shift + P or just use CMD + Shift + R (CTRL + ALT + R for Windows & Linux) keybinding.

404-html avatar Feb 04 '23 17:02 404-html