I don't recall when this happened, but whenever I attempt to use suggested fixes, imports will frequently show without the actual class it's suggestion to import, as shown below. This is not the case for all imports, some show up. But it seems fairly consistent with which ones are not showing up. It makes updating things annoying because I have to guess to see if I'm getting the correct import.
http://imgur.com/5t6fO1h
Related
(Currently using VS Code on macOS Monterey, mostly for React and JavaScript.)
When I used to import a component at the top of my file, Vs Code would suggest the path of the file. I would simply press enter or click on the suggestion and VS Code would fill in the rest. Seems to me like a standard feature of VS Code, and I've grown pretty accustomed to it.
Now, it doesn't suggest anything. I'll type out a file that exists in the project, and nothing appears. I've tried it with several projects, and none of them suggest anything anymore — when just last week it was working fine.
trying to import
One thing... I have a lingering suspicion that it's from doing this:
npm i #types/react -g
A friend recommended I add it. With it, you can declare a component in your project and VS Code will auto import it. Really, it's the only thing I can remember changing since this strange behavior with VS Code started, but I'm not positive. Just a suspicion. I've tried to remove it, but it didn't fix anything.
I've done a bunch of stuff found on stackoverflow already with no improvements:
adding to setting.json, like this, or this
even deleted VS Code w/ extensions
There are problems in my problems tab that I just need deleted. I don't care for them they're adding highlights to my code. I don't need them don't want them but can't delete them.
Why can't I just right-click delete the problems in this tab? It's poor design. I've tried restarting the client, the window, even re-opening this code. The problems are "latched" on with no option to remove.
I'm not trying to remove the highlights. I'm trying to remove the problems itself.
There doesn't appear to be any built in functionality to only remove the problems without removing the highlighting also.
It probably depends on the language server being used, but you can customize which problems you see. For example, take this Python code:
import MyModule
print(myVariable)
MyModule produces a reportMissingImports problem, and myVariable produces a reportUndefinedVariable problem. If you are using Pylance as your Python language server, there is a setting called python.analysis.diagnosticSeverityOverrides that you can use to turn off specific problems (or change their severity). The problem is, you will also lose the highlighting as I mentioned.
Example of the JSON setting for this:
"python.analysis.diagnosticSeverityOverrides": {
"reportUndefinedVariable": "none",
"reportMissingImports": "none"
}
So depending on what programming language you are using, you can probably configure the problems as such. If you are perhaps seeing a lot of the same "pointless" problems that you don't care about, it may be worth turning that problem off (i.e. set its severity to none).
I have the weirdest bug. If I edit anything in the 'Script Execution Order' list in Project Settings, and click 'Apply', it just reverts back to how it was before immediately. This includes any type of change: removal of entries, adding entries, or changing the number of the entry. Everything just plops right back to the previous state on clicking Apply - no error messages whatsoever.
Visually, it's exactly the same result as clicking the 'Revert' button instead of 'Apply' - except that the editor actually starts doing its refresh thing afterwards (I thought for a moment maybe the Apply button was broken, but this kinda rules that out).
After hours of trying stuff I figured out that it works if I remove the 'Unity UI' package, so I guess the problem may have to do something with that. However, another project that includes this package does not have the same problem.. so it's still project-related, somehow. I tried uninstalling and reinstalling all packages 10 times, no luck..
I had submitted this as a bug to Unity support, who have just responded.
After some investigation, I've concluded that this is currently by
design. You're trying to make changes to scripts from Packages,
currently, you can't do that. If you would add your own script and try
to change the execution order, you'd notice that everything works
correctly. (Matas, Customer QA Team)
He is correct, and indeed, changing/adding entries from your own code DOES work. In hindsight, this makes sense, even if it's a bit rigid. Problem 'solved', as in, I can live with packages' entries being readonly.
So, I am developing with eclipse 4.2 and groovy 2.3 / jdk 1.6.0_35.
I just worked on one of my classes when suddenly eclipse showed me a dozen compile errors in different classes out of nowhere. It says e.g. it can't find a class in an import statement, although the class is there. Running the code works fine even though the errors are shown. If I add a comment to one of the classes and save it, some errors go away but may come back as soon as I change another (totally different) class.
It also shows me some errors like these:
error description:
As you see, the error is totally unrelated (Optional is totally independent of any other class, also of course independend of the mentioned classes in the error message). If I add a comment somewhere and save Optional, the error goes away but comes back as soon as I save any other class.
I cleaned the project, deleted the bin-directory and restarted eclipse/computer but it didnt' help. Does anyone already experienced this behaviour? How to fix it?
I got similar problem and error was in file above one with compilation error. So try to comment file before and check if this solve problem.
I cannot get any useful error reporting in IDEA 14. Errors are nicely underlined but it would be nice if I could somewhere see a collection of all the errors I have in my code.
Problems monitor is not showing anything, scala facet wont load, I', lost.
I would be satisfied with a window that would just collect all the errors I have underlined in my code, or a functionality similar to F2 shortcut (go to next problem) if it would work across whole solution, not only within a file.