You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Autocomplete for "console.log()" in JavaScript and TypeScript is wrong. #9072
Vladimir Amiorkov (@VladimirAmiorkov) do you have an extension installed that adds snippets. Looks like you selected a snippet. I can't reproduce this using 1.3.0
I can confirm that without any extensions I can reproduce this issue in a TypeScript file (.ts) in JavaScript it seams to be ok after removing 3 extensions (TypeScript extension, Angular 2 and NativeScript). But the fact that it was ok for both TypeScript and JavaScript with those 3 extension before upgrading to the latest version is troubling.
Johannes Rieken (@jrieken) assigning to you since this is not caused by TS/JS. Looks like that an extensions adds a snippet and the snippet now wins over the TS proposal.
As I understand the issue the user has an extension which snippets win over TS/JS proposal. Did something change in regards of sorting/priority. It seemed to work for 1.2.x
For JS his problem disappeared after uninstalling the extensions. Interestingly we don't ship with a log snippet for JS. This is why I ask you whether something has changed in the code to pick the first match.
For TS this is a very strange behavior and I don't know whether its is you or João Moreno (@joaomoreno). See the screen cast. When you first type the 'l' the log method is selected when you go back the snippet is selected. This is with VSCode 1.2.1
The problem is IMO not that the snippet proposal appears: Its name prefix-matches the current word, that's why it appears. The problem is that it get's ranked before any of the language proposals in particular the log proposal.
Either we improve the sort order or we remove snippet proposals from the the code completion list and put them on a separate key.
Activity
dbaeumer commentedon Jul 12, 2016
Vladimir Amiorkov (@VladimirAmiorkov) do you have an extension installed that adds snippets. Looks like you selected a snippet. I can't reproduce this using 1.3.0
dbaeumer commentedon Jul 12, 2016
Please ping if you see this on a vanilla VSCode install. A test project showing the error would be helpful
VladimirAmiorkov commentedon Jul 12, 2016
Hi Dirk Bäumer (@dbaeumer) ,
I can confirm that without any extensions I can reproduce this issue in a TypeScript file (.ts) in JavaScript it seams to be ok after removing 3 extensions (TypeScript extension, Angular 2 and NativeScript). But the fact that it was ok for both TypeScript and JavaScript with those 3 extension before upgrading to the latest version is troubling.
dbaeumer commentedon Jul 13, 2016
Johannes Rieken (@jrieken) assigning to you since this is not caused by TS/JS. Looks like that an extensions adds a snippet and the snippet now wins over the TS proposal.
jrieken commentedon Jul 13, 2016
I do not own snippets
dbaeumer commentedon Jul 13, 2016
As I understand the issue the user has an extension which snippets win over TS/JS proposal. Did something change in regards of sorting/priority. It seemed to work for 1.2.x
jrieken commentedon Jul 13, 2016
Dirk Bäumer (@dbaeumer) No - this is because TypeScript ships with a
console.logsnippetdbaeumer commentedon Jul 13, 2016
Johannes Rieken (@jrieken) yes I know, but we always did. Vladimir Amiorkov (@VladimirAmiorkov) pointed out this happened after upgrading to 1.3.0 (see #9072 (comment))
For JS his problem disappeared after uninstalling the extensions. Interestingly we don't ship with a log snippet for JS. This is why I ask you whether something has changed in the code to pick the first match.
For TS this is a very strange behavior and I don't know whether its is you or João Moreno (@joaomoreno). See the screen cast. When you first type the 'l' the log method is selected when you go back the snippet is selected. This is with VSCode 1.2.1
And this is with 1.3.x
jrieken commentedon Jul 13, 2016
Martin Aeschlimann (@aeschli) owns the
SnippetRegistrywhich is responsible for inserting snippet completionsaeschli commentedon Jul 13, 2016
The problem is IMO not that the snippet proposal appears: Its name prefix-matches the current word, that's why it appears. The problem is that it get's ranked before any of the language proposals in particular the
logproposal.Either we improve the sort order or we remove snippet proposals from the the code completion list and put them on a separate key.
jrieken commentedon Jul 14, 2016
closing as duplicate of #9286
masaeedu commentedon Jul 30, 2016
Johannes Rieken (@jrieken) #9286 is a feature request, this is a bug. Is this bug fixed, or is there a workaround enabled by #9286?