Change:
<!-- Do Not Delete This! bugreporttemplate --<!-- Please read our Rules of Conduct: --<!-- Read our guide about submitting issues: --<!-- Search existing issues to avoid creating duplicates. --<!-- Test using the latest Insiders build to see if your issue has already been fixed: --<!-- Instead of creating your report here, use 'Report Issue' from the 'Help' menu in VS Code to pre-fill useful information. --<!-- If you answered No above, use 'Help: Start Extension Bisect' from Command Palette to try to identify the cause. --<!-- Issues caused by an extension need to be reported directly to the extension publisher. The 'Help Report Issue' dialog can assist with this. --Version: 1.71.0 Commit: Date: 2022-09-01T07:25:10.472Z Electron: 19.0.12 Chromium: 102.0.5005.167 16.14.2 V8: 10.2.154.15-electron.0 OS: Linux x64 5.10.7-arch1-1 Sandboxed: No Steps to Reproduce: a file with the contents: a SvelteKit project and open any file. as shown in the video. https://user- Result: Without a space - it doesn't work. With space - it works. Cause: When the cursor is in front of the character, it thinks it is already AFTER , although this is not true. PS The same problem is in the last character, before , in the file.
This also happens in the HTML with where being cursor position. The problem seems to be because the position of the cursor is on the border of the embedded language. Maybe it could be changed to using the previous character, when possible, instead of the next?
Thanks - I can reproduce what you are saying. I don't really know what svelte kit is nor what extension you are using. So, I am focusing on html. Using "F1 Inspect Editor Tokens and Scopes" shows me that the language at position is classified as html, not JavaScript. <img width="728" alt="Screenshot 2022-12-05 at 16 22 35" src="https://user-"Because of that no JS snippets are shown. Passing this on to who maintains the TextMate grammars for this. An easy workaround on your end would be to configure the snippet to also work for the "outer" language
SvelteKit: SvelteJS is the 4th most popular framework (behind ReactJS Vue Angular), and considered to have the best DX of all frameworks. Extension for SvelteJS: But I hope that solving the problem in html/js, will also solve the problem in SvelteJS.
Related to
what do you think of modifying the solution to so that we don't ignore strings? PR

Discussion:
let visit = function (rule, parent) { if (rule.name === 'source.js' || rule.name === 'source.css') { <del> if (parent.parent && parent.parent.property === 'endCaptures') { </del> <ins> if (parent.node[0].name !== 'punctuation.definition.string.end.html' && parent.parent && parent.parent.property === 'endCaptures') { </ins> rule.name = rule.name + '-ignored-vscode'; patchCount++; }

for (let key in repository) { visit(repository[key], { node: repository, property: key, parent: undefined }); } <del> if (patchCount !== 6) { console.warn(`Expected to patch 6 occurrences of source.js & source.css: Was ${patchCount}`); </del> <ins> if (patchCount !== 2) { console.warn(`Expected to patch 2 occurrences of source.js & source.css: Was ${patchCount}`); </ins> }

"name": "punctuation.definition.string.end.html" }, "1": { <del> "name": "source.css-ignored-vscode" </del> <ins> "name": "source.css" </ins> } }, "name": "string.quoted.double.html",

"name": "punctuation.definition.string.end.html" }, "1": { <del> "name": "source.css-ignored-vscode" </del> <ins> "name": "source.css" </ins> } }, "name": "string.quoted.single.html",

"name": "punctuation.definition.string.end.html" }, "1": { <del> "name": "source.js-ignored-vscode" </del> <ins> "name": "source.js" </ins> } }, "name": "string.quoted.double.html",

"name": "punctuation.definition.string.end.html" }, "1": { <del> "name": "source.js-ignored-vscode" </del> <ins> "name": "source.js" </ins> } }, "name": "string.quoted.single.html",