Looking for a way to display functions in the quick suggestions in vscode. For example:
I cannot get str.replace() to appear in the suggested options.
I've explored the settings.json options but do not see anything there.
Related
When I type I get those annoying suggestions inside VS code and I don't know how to get rid of them. Any help would be appreciated.
This kind of auto complete appears
Tried to change suggestions and autocomplete settings on Intellisense, but no luck.
And I found the answer finally. The steps are the following:
Go to settings > extensions > Typescript and disable:
Javascript inlay hints on all options.
or...unisnatll the extension Typescript. That's it. The ghost writing is gone!
I'm learning Javascript and up until now when I wanted to change anything in the DOM, I was using Google Chrome devtools to do that. Now I'm moving to write my code inside the JavaScript file, that accompanies the webpage, in Atom but the problem is the extremely useful autocomplete features of Chrome devtools is not available in Atom. For example when I type this code:
document.addEventListener('click', function(){
const mainHeading = document.querySelector('h1');
mainHeading.style.backgroundColor = 'red';
})
Chrome devtools is intelligent enough to suggest backgroundColor with a capital C to prevent any typing errors but the same thing doesn't happen in Atom. In fact Atom does not have any suggestions at all. I have tried installing different JavaScript plugins such as atom-ternjs or autocomplete-javascript, to name a few but none is working when you want to write the code to manipulate the DOM. Any suggestions to solve this is greatly appreciated.
Here's a quick solution using Atom Ternjs.
Navigate to the menu bar and click Packages-> Atom Ternjs -> Configure Project.
Here, select the browser option under libs
Then, just scroll down and click on Save and Restart Server.
I hope this helps.
I'm using TabNine extension now and I'm satisfied with the performance. It uses deep learning to learn and predict the variables and lines of code you might want to write based on those variables and the more lines you write in a particular project the better it gets at giving the suggestions.
I installed JavaScript Enhancement through Package Control.
Does it need to be activated first from somewhere before being able to use it?
Nope, no need to activate anything.
Just create a new JavaScript file and you'll notice its features are working.
Make sure your file is treated as JavaScript. You can check by looking at the bottom right corner. "JavaScript" should be selected.
I also could not get auto completion suggestion or any pop up while typing in sublime. I have tried several pluggins: all autocompletion, javascript enhancement. But nothing worked. So after reading some answer, I installed sublimeCodeIntel. I don't know why but only this plugging can give me the autocompletion popup.
So you can give it a try.
I want IntelliSense to work as described here.
Unfortunately, what I get is this:
As you can see, there are several differences.
false icon
false member info
no quick info
thousands of other list entries, I donĀ“t need
This is a simple ASP.NET empty webproject in VS 2015. I have checked the options under Text-Editor -> JavaScript, which seems to be correctly.
This is probably being caused by ReSharper - I've actually had a better experience by disabling the ReShaper intellisense for JavaScript and letting it fall back to using Visual Studio.
To do so, go to:
ReSharper->Options
Expand the Intellisense group under Environment, choose General
Select "Custom IntelliSense"
Select Visual Studio in the drop down on the right for JavaScript
I've personally left all others set to ReSharper.
By toggling this setting between the two choices, I switch between seeing what you're describing in the question and what the blog post you linked to describes.
I've been trying to think of a better way to title this question, but unfortunately I have no idea how to explain it. Also I haven't found this on stack overflow (for the same reason stated above).
In Eclipse, I used to Ctrl+Click in the name of a method call (in java). And my cursor would jump in to the definition of my method function.
Question 1: Does anyone know the name of this behavior? I mean, maybe it's called function jumping or something like that.
Also I was searching for a plugin like this in Atom editor. Because I've tried to use this a lot of times (bad habits) and didn't work.
Question 2: Name of the plugin to do this in Atom?
Don't know if it helps, but I'm coding in JavaScript at the moment in Atom editor.
As the other answer noted, alt-click over a method/function name can jump you directly to where it was originally defined. It works within the same file, but it doesn't seem to work across files.
The closest Atom editor package I've found for javascript which allows you to jump to function/method definitions across files is called TernJS.
Once installed, you can use ctrl-shift-r over the word (function/method, variable etc) to bring up a list of where that method/function is defined (includes line # & filepath). You can then click on the list item & it will jump you to the definition.
Here is a video I made containing an example of using this atom package.
http://www.youtube.com/watch?v=cFAzqvYoHJs&t=11m58s
To answer your first question this 'behavior' is knows as 'go to definition', or 'jump to definition'.
To answer your second question some packages you could perhaps take a look at would be,
'goto-definition'
'code-peek'
I find these help a bit but still don't achieve the standards that I would fully like. I wanted something similar to the Intellij IDEA ctrl + click.
I find myself using the ctrl + shift + f to search the entire project for the related files of the thing I'm searching for. Then I find the particular file i'm looking for and shazam! I've got what I came to get. This particular method works best for me.
I know its not exactly what your looking for but this is the best thing I've found so far to achieve something similar to what we both seem to be looking for. Hope this helps a bit,
happy coding...
Currently this behavior is blocked by multiple cursors feature.
The closest you can get is "ctrl-alt-shift-d" + atom-ternjs
try atom/navigate
Link to Atom Navigate
It helps you to do this excact thing.
The only thing is that it's default key is f2 instead of cltr+click
But this is also editable in the package settings in de .atom file
I don't think I have a package for that.
Simply ctrl-D goes to definition for me.
Tried by luck after reading here other methods.
Cheers.
In Atom (1.57.0 version, os Ubuntu 18.04) command ctrl+shift+f is doing project-find:show. (try cmd+shift+f if on mac and the above does not work)
First select a function name in a file within a project, click ctrl+shift+f, and a list of files from your project folder, that also have this function (either defined, or used) should appear.
Click on any of these files, to come back to the list use ctrl+tab. I can see in key-bindings that this command project-find:show, is bound to ctrl+shift+f, and I have used it, but I am not sure if this is from one of the packages, or not. (sorry new to atom)