Visual Code intellisense transform clg to ChannelMergerNode [duplicate] - javascript

I have a user snippet configured in Visual Studio Code. Let's take one of the items in this snippet: one with the prefix imp.
Now, prior to the recent VSCode update, as soon as I did something like the following.
it automatically showed the autocompletion box to me (I didn't have to press Ctrl + Space to activate it), as shown below:
But now after the update, something strange has happened. When I type in just im, obviously, it shows me the <img> autocompletion suggestions as shown below:
But when I continue to type the full thing imp, the autocompletion box gets hidden. It's only when I press Ctrl + Space that I get the autocompletion box again.
What is the reason for this problem and how to fix it?

I can reproduce your issue exactly, which led me to look to see if it has been reported on github. It has, see Snippets gone from IntelliSense.
From same issue as above:
I have pushed a fix for next insiders and I have pitched this for the
1.75.1 recovery release
It is in today's Insiders (I just tested it) 02/03/2023.
So you can either try the Insiders Build now or wait for the Recovery Release. And continue to use the manual trigger of Ctrl+Space in the meantime.
As #WayneBloss mentions in a comment below, disabling the snippetsPreventQuickSuggestions setting might fix the issue.

Related

Git detects changes for the whole file once opened but not changes were made. Using windows and vscode

I have created a repo on Github, and pushed exercise files to practice on. When I open one of these files and hit ctrl+save or add a single line of code the editor marks everything as changed. Even when I have made not changes or just a single line change.
For example, on the first image - I did not change anything but ctrl+save changed the formatting which should not be a problem.
In the second image, it is possible to see that almost the entire file changed but in reality is the same
I am using VSCode and Git with the latest updates on Windows.
Much appreciate any guidance!
I think it is because on the save action you have some kind of automatic code formatter tool enabled, like prettier.
If you want to skip this formatting action then this might help: How do I turn off text formatting on save in visual studio code?

My VS Code IntelliSense does not work unless I manually start it with Ctrl + Space

I'm using JavaScript, which VS Code says is included with IntelliSense. For whatever reason, the quick suggestions don't work. If I start typing, nothing shows up. No suggestions, or anything. I am running a brand new installation, too (VS Code v1.75.1), and it should be working. I'm running a Windows machine. I can get it to work when I press ctrl + space, but I don't want to have to do that every time. I really like being able to hit tab to complete something I can't remember that it recognizes and move on to the next piece of the code. Having to hit ctrl + space first is a pain.
I've checked all the settings I can find, and it should be turned on and it should be working. Oddly, though, there's no "IntelliSense" extension. I tried looking in the available extensions, and it doesn't exist there, either. It's almost like my version of VS Code forgot to install it.
I had the same issue when I recently installed VS Code on a Mac device. I managed to somehow get it to work on there, but I'm not really sure what I did. I think I tried randomly installing extensions until it worked.
At this point, I have tried looking through settings and all my "Editor: Suggestion" settings are turned on. I've tried uninstalling and reinstalling the program. I've tried rebooting my computer multiple times around doing all of these things. I've added a few other extensions, but they don't work with JavaScript, so nothing really happens.
Does anyone have any idea what's going on or how I might figure it out?
After some back and forth, the issue was found to be that the workspace settings had set the "other" field of editor.quickSuggestions to "off", masking the user settings where it was "on". To fix the issue, either remove the "off" specification of the "other" field from the workspace settings, or set it to "on".
Quoting the asker's comment:
It looks like this demo workspace comes with settings. This is something I did not know until you mentioned it. The workspace settings had it turned off, but my user settings had it turned on. Now both have it turned on and it is working.

Is there any way to see which lines of JavaScript code were executed?

I have a function in JavaScript that is based on a few numbers and yes/no questions inputted into html forms, and then an answer is returned with subtle differences based on the input.
Is there any way to see or highlight which lines of code were executed to make sure the function use the correct "path"? Sometime like an app in VS code or somewhere else? I do not want to put an extra line of code every few lines to figure it out.
You can use the Code Coverage tool for this.
To show the Coverage tab in Chrome Developer Tools, open the console and type Ctl-Shift-P (Cmd-Shift-P on Mac) to get the command menu, then start typing coverage into the search field that pops up. Then you'll be able to click on Show Coverage command.

My js code doesn't show any definition when hover or press ctrl+k or ctrl+space

My question simply is:
I can't show any definition when hover on my specially my javaScript code
even by hovering or pressing ctrl+k or ctrl+space
I tried my ways but I can't reach this point
Installing the Visual Studio IntelliCode extension will fix that.
But even with that installed, since JavaScript is a loosely typed language, things like variables will just show any when you hover over them.
Installing IntelliSense removed this issue for me.

Eclipse keeps jumping to the start of the document

I have been using Eclipse for some weeks now and I start getting used to it.
However, one thing really annoys me:
When editing JavaScript (I didn't try any other language yet), the editor window keeps jumping to the start of the document I am editing.
This mostly happens when the code currently contains syntax errors and mostly while / after deleting lines.
Especially constructs like { = and sometimes unterminated strings / comments seem to cause this problem.
When it happens, only the view scrolls to the top of the document - the cursor stays where it was before the "jump" occurred.
Anyone having an idea on how to fix this?
I believe the problem described above is related to this bug:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=318095
The work around is to disable the "Link with Editor" option from the Project Explorer. Which is to say make sure the icon with two arrows facing in opposite directions at the top of the file tree is not enabled. Disabling this option resolved the issue for me.
Looks like a problem with the implementation of the JavaScript editor. Most probably the jump occurs when the JavaScript-Parser is not able to parse your document and throws an exception. You might consider to report a bug to the eclipse project (maybe there is already such a report?).
As a workaround you might consider to adapt your way of typing the code a bit. Try to write the code in a way that does not confuse the parser (for example it might help to immediately close a newly created comment and THEN write the content instead of open the comment, write the content and finally close the commend). Same for strings, blocks ...
I am having the same problem. I had this line of code in my file and I could consistently reproduce the issue:
$.preload(preloadImages
, {
base:assetsUrl+'b/images/',
ext:'.png'
});
I changed it to the following and I no longer have the problem.
$.preload(preloadImages, {
base:assetsUrl+'b/images/',
ext:'.png'
});
I get this Phenomenon, when i'm editing in a Java-Class while still residing in a Debug-Process. The Debugger recognises the Change and reevaluates the Code and jumps back in order to be able to reexecute only the changed Code.
Hii i got solution goto
Window->Preferences->search autosave
and disble it and hit apply and close button.
this worked for me !

Categories