'VS Code quick fix always give "no code actions available"

VS Code with Go, the quick fix always give "no code actions available". No matter what's the error or warning, no fix is given.

enter image description here

Is this my config/environment problem or is it a vscode bug/expected? Any help will be highly appreciated!



Solution 1:[1]

I have the same problem when using the mouse to select a quick fix.
Instead of using the mouse use hot key, it works on win10:

  1. Place the cursor on the error.
  2. Press Ctrl + .
  3. Use the keyboard to select your fix.

Solution 2:[2]

I had the same problem but with C# project and the Omnisharp extension (C# v1.24.0).

VsCode didn't resolve the namespaces, but instead showed the "No code actions available". After some time I stumbled across this GitHub issue https://github.com/OmniSharp/omnisharp-vscode/issues/5029.

After changing the Omnisharp settings via extension settings menu and setting the value

"omnisharp.path": "latest",

I restarted my Omnisharp extension and it finally started giving me proper quick fixes.

Solution 3:[3]

I have restarted the VS Code and the problem has gone.

Solution 4:[4]

in my case this was due to duplicate line number in my js file. removing the duplicate line numbers worked for me.

Solution 5:[5]

In my Python project I solved it by switching to the right python interpreter (I'm using a different virtual environment for every project.

I clicked on the python button (bottom of VS Code UI) and set the proper path within my /path/to/my/project/venv/bin/python:

enter image description here

Now when I'm using the shortcuts I'm able to Add import <some_import>, for example:

enter image description here

My VS Code version: 1.52.1

Solution 6:[6]

Please run visual studio code as Administrator. For more information check your Output Console. It happen because one of running programs block your omnisharp and it didn't work!

Solution 7:[7]

I have this issue and by clicking on the extension panel I see the text shown in front of Omnisharp C# that says reload and this issue has been fixed by clicking on this text, maybe you have more than an extension for the language you code with , if it's doesn't work uninstall one of them and you see this work

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Vic Yu
Solution 2 Hellaren
Solution 3 Denis
Solution 4 Fiaz Ahmed Ranjha
Solution 5 ItayB
Solution 6 Matias Vallejos
Solution 7 Rebwar