Reputation: 5264
I'm currently running IntelliJ IDEA 13.1. While running IntelliJ 13 intellisense/autocomplete stopped working. I tried upgrading and it still doesn't work.
I can explicitly invoke code completion using ctrl+space
. I looked in Settings->Editor->Code Completion and nothing looks out of place. Is there somewhere else that turns this feature on/off?
Upvotes: 73
Views: 100911
Reputation: 1
I deleted .idea folder and .iml file, then reopened Intellij IEDA. That's work.
PS: I have checked all my settings and power mode, even uninstall AI plugin. All the efforts above didn't work.
Upvotes: 0
Reputation: 1
Check if Ctrl+Shift+Space works. If yes it probably means your operating system or some other app use Ctrl+Space shortcut. To fix it find who use it and change it. In my case it was PowerToys on Windows.
Upvotes: 0
Reputation: 1
If you still can't solve your problem.
In my case:
Good luck!
Upvotes: 0
Reputation: 1
I reopened the project through File -> New -> Project from existing sources and overwrote the .idea. I guess deleting the .idea folder and restarting might work as well.
That worked for me, all the other solutions (marking the source root etc. or changing the ESM) didn't work
Upvotes: 0
Reputation: 5478
I had the node_modules
directory excluded.
By right-clicking it and selecting "Cancel Exclusion", autocomplete of library code started working again.
Upvotes: 0
Reputation: 558
remove the .idea folder. This did it for me as I had no idea what made it stop working.
Upvotes: 0
Reputation: 253
In my case plagin Lombok
broke autocompletion.
Android Studio Flamingo 2022.2.1 Patch 2
Lombok 0.34.1-2019.1
Upvotes: 0
Reputation: 5265
It depends which product, for Intellij I might have to right click and import the .iml file from the root, or in Rider right click the solution file and open that. I'm only making this mistake 4 or 10 more times, and then it is never happening again.
Upvotes: 0
Reputation: 67
Spent hours to fix this problem too. For me, the answer was to disable a plugin.
Which one to disable? Just find out using trial and error since all kinds of plugins can cause errors...
Upvotes: 0
Reputation: 7165
I'm using Maven project, it works by:
File > Project Structure > Modules > Sources and then marked java files dir as Sources.
Upvotes: 0
Reputation: 909
IMPORTANT
If you had your email logged-in on IntelliJ Idea for a while and its token expire the Intellij will suddenly stop working or crash(My Version 2020.1.1).
Do two things.
1. file > sync settings with JetBrains account (log in here)
enter code here.
2. file > Invalidate cache / restart
Upvotes: 1
Reputation: 13992
I tried all the above option and it did not solve the issue. In my case:
THE ISSUE: node_modules was not loaded in the file structure of the project.
THE SOLUTION: go to explorer(finder/nautilus) find the .idea folder in the project and delete it. Then re-import the project. Once I re imported the project it loaded the node_modules folder as library root
Note: It will take a few seconds for IntelliJ to index all the libraries. You will see a loader on the bottom right next to line number info.
Upvotes: 6
Reputation: 30985
I'm using Mac and when I upgraded to Big Sur my intellisense stopped working.
This is due Big Sur has a shortcut for Input Source. By disabling Mac shortcut, will make Intellisense work again.
You can see the option to disable in mac:
Upvotes: 17
Reputation: 4662
In case none of these work for you, if you are using IdeaVim, make sure your ~/.ideavimrc
does not override Ctrl+Space, you can check this in vim
:
:verbose map <c-space>
In my case, it was set by ~/.vim_runtime
:
Last set from ~/.vim_runtime/vimrcs/basic.vim line 208
Thanks @s1n7ax for the tip!
Upvotes: 0
Reputation: 1
For me the code completion suddenly stopped working because I had nudged the IDEA window slightly off-screen, maybe just a pixel or two, which caused the code completion pop-up to (presumably) appear off-screen. Making sure the application window was fully visible fixed the problem.
Upvotes: 0
Reputation: 2634
If you're too lazy to restart your machine to fix the issue, you can kill the process taskkill /F /PID pid_number_of_idea64.exe
(task manager -- view>select columns>PID) and then open CMD, head over to C:\Program Files\JetBrains\IntelliJ IDEA xxxx.xx.xx\bin
, start idea.bat. Let this CMD window open.
Please note that even after executing taskkill, idea64.exe process doesn't disappear from task manager. Try executing the same command again and you'd know that process doesn't exist anymore.
Upvotes: 0
Reputation: 2060
Had the same problem and none of these helped. What I realized was that on mac, control + space
is used by the OS to change language inputs and it overrides intellij. So if you are on mac having multiple input languages on your keyboard, consider changing the shortcut for it :)
Upvotes: 4
Reputation: 1797
In case this helps anyone; for me it was a windowing glitch of some kind. The suggestions popup showed on the wrong monitor, which I didn't notice the first time it happened.. after a while I saw what was happening. Resizing the window seemed to fix it.
Upvotes: 0
Reputation: 2032
Had the same problem until:
Upvotes: 2
Reputation: 479
In my case, I restarted the Intellij and everything came back to normal.
Upvotes: 2
Reputation: 507
File -> Settings-> Editor-> General -> Code Completion-> Auto pop up code Completion
Upvotes: 10
Reputation: 59
Try disabling all plugins you have. I installed Codota and it turns out to be garbage. I uninstalled it and disabled the plugin in IntelliJ and it worked
Upvotes: 5
Reputation: 43
For me, it was I hadn't yet set up the JDK.
Type something out, Ctrl+Space to try to autocomplete. If it fails, do Alt+Space and if the option comes up to setup JDK, do that.
Upvotes: 1
Reputation: 5276
In IntelliJ 2017-2 to configure Autocompletion:
Settings -> Editor -> General -> Code Completion
Upvotes: 0
Reputation: 2075
If other options mentioned is already true for you,try Setting up Sources/Test folder as Sources Root/Test Sources root as it did the trick for me. I had forgot it.
Right click on folder, choose "Mark Directory as" Test Sources or Sources Root, or whatever applicable. :)
Upvotes: 5
Reputation: 3260
For me it was because I did not have a folder marked as Source Root (it appears in blue).
To fix, right click your root source directory -> Mark As -> Source Root.
Upvotes: 203
Reputation: 902
Check to see if you accidentally turned on Power Save (File/Power Save Mode) I myself just discovered that File/Power Save Mode does turn it off. I was having the same problem and must have accidentally set Power Save Mode to on.
Upvotes: 77