Intellisense in IntelliJ no longer working
Asked Answered
S

24

68

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?

Septuor answered 19/3, 2014 at 21:31 Comment(2)
Possible duplicate of IntelliJ does not show 'Class' when we right click and select 'New'Jade
this works for me #63521681Micron
M
77

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.

Melyndamem answered 25/3, 2014 at 14:57 Comment(2)
Thanks!! File/Power Save Mode was turned on somehow. I unchecked this and all the wonderful features of working in an IDE returned.Septuor
Welp, that fixed the problem I forgot I had created while working in a very large project.Alex
P
196

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.

Philan answered 2/2, 2017 at 12:45 Comment(9)
This helped in my case! For some reason IntelliJ didn't even offer completion for the standard library classes before I did that.Postgraduate
In my case, It was blue(!) and still showed lots or red lines in my perfect code. To fix, I had to unmark and then mark- fixed it ;)Optometrist
I had it blue though but i marked it as Sources Root and it worked. Thanks!Marou
This also helped me fix my tests!Intrinsic
you are a savior!Diesis
pycharm autocompletion instructions for numpy library -> youtube.com/…Hyperion
This appears to work for the source code that is in that directory, but any imported libraries (via gradle in my case) are still not getting recognizedAurum
I had a folder as source root , but it wasn't supposed to be the root. I changed the root to correct folder and now it works.Sargassum
Thanks, this helped. The "Run" button too got activated against one of the main() methods in a sub-dir that I marked as a source.Fireproofing
M
77

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.

Melyndamem answered 25/3, 2014 at 14:57 Comment(2)
Thanks!! File/Power Save Mode was turned on somehow. I unchecked this and all the wonderful features of working in an IDE returned.Septuor
Welp, that fixed the problem I forgot I had created while working in a very large project.Alex
G
15

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: enter image description here

Gadroon answered 7/3, 2021 at 22:53 Comment(1)
Thank you men works perfect (mac 12.6)Trudeau
D
10

File -> Settings-> Editor-> General -> Code Completion-> Auto pop up code Completion

Dunseath answered 25/12, 2014 at 10:34 Comment(0)
S
6

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.

Smitten answered 18/1, 2018 at 3:2 Comment(0)
H
5

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. :)

Hermineherminia answered 19/4, 2017 at 7:10 Comment(0)
C
5

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

Cirone answered 14/2, 2018 at 7:32 Comment(3)
I added _ideavimrc took from github. It's key binds has overridden in my case.Holzman
@Holzman it was exactly this in my case. I added another answer for that! Thanks!Banded
Thanks, in my case it was: plugins.jetbrains.com/plugin/15071-flutter-snippetsBishop
E
4

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 :)

Eartha answered 2/10, 2018 at 6:24 Comment(0)
K
2

In my case, I restarted the Intellij and everything came back to normal.

Kerbela answered 28/6, 2018 at 11:6 Comment(0)
C
2

Had the same problem until:

  1. Third party JDK installed
  2. Configured in module settings: right click on project name, then "Open module settings" -> SDKs -> "+". Pick the jdk root folder and Idea will take care of the rest.
  3. Re-indexed a bunch of things. It happens automatically, just be patient
Chillon answered 30/8, 2018 at 3:28 Comment(1)
I was using the JDK that came with intellij. Once I switched to another JDK, like openJdk, autocompletion started working again.Marciamarciano
T
1

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.

Thames answered 1/2, 2018 at 2:23 Comment(0)
C
1

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
Cancer answered 9/5, 2020 at 16:59 Comment(0)
O
0

In IntelliJ 2017-2 to configure Autocompletion:

Settings -> Editor -> General -> Code Completion

Orit answered 19/11, 2017 at 11:1 Comment(0)
C
0

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.

Chuipek answered 1/10, 2018 at 14:27 Comment(0)
R
0

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.

Reagent answered 11/3, 2019 at 9:26 Comment(0)
S
0

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.

Secure answered 7/11, 2019 at 7:46 Comment(0)
B
0

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!

Banded answered 9/6, 2020 at 11:21 Comment(0)
M
0

I'm using Maven project, it works by:

File > Project Structure > Modules > Sources and then marked java files dir as Sources.

reference link.

Micron answered 10/9, 2022 at 2:10 Comment(0)
B
0

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...

Bael answered 9/12, 2022 at 18:52 Comment(1)
This does not provide an answer to the question. Once you have sufficient reputation you will be able to comment on any post; instead, provide answers that don't require clarification from the asker. - From ReviewPercussive
S
0

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.

Serialize answered 3/2, 2023 at 8:57 Comment(0)
T
0

In my case plagin Lombok broke autocompletion.

Android Studio Flamingo 2022.2.1 Patch 2
Lombok 0.34.1-2019.1

Topdrawer answered 25/5, 2023 at 11:21 Comment(0)
B
0

For me Right click on pom.xml and Add as Maven project

Maven pom.xml

Beanery answered 30/8, 2023 at 2:10 Comment(1)
This worked surprisingly.Muntin
B
0

remove the .idea folder. This did it for me as I had no idea what made it stop working.

Boart answered 24/11, 2023 at 14:52 Comment(0)
I
0

I had the node_modules directory excluded.

By right-clicking it and selecting "Cancel Exclusion", autocomplete of library code started working again.

Indicia answered 1/5 at 12:50 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.