VS Code Intelephense Clear Cache and Reload - visual-studio-code

I use Visual Studio Code with Intelephense, and this works wonders on all of my projects except for one, where every class is shown as undefined until I open the file that contains the class. Therefore I have a suspicion that Intelephense is not scanning this project.
Some suggestions around the web mention to perform a "Clear Cache and Reload", however I cannot find this option anywhere. Can anyone show me where I can locate this, please?
I am using Windows 10, VS Code 1.46.1, and Intelephense 1.4.1

It appears to have been removed in version 1.0.0 (2019-02-20), as referenced in their change log in GitHub, in favour for "Index workspace". This can be activated by opening the command pallet (Ctrl + Shift + P) and typing "Intelephense: Index workspace".
However this did not resolve the indexing issue. This was in fact caused by a problematic symlink that somehow was linked to itself. When I have removed it and restarted VS Code, the indexing worked as expected.

Related

VS Code Terminal command extra first letter

In vs code terminal I'm getting first letter of command twice. it's not causing any problem but it's kind of annoys me to watch the wrong command. I'm not writing any letter twice, the first letter of all commands gets repeated automatically.
as you can see there are 2 commands first one ppython first p automatically got repeated even though i wrote python it makes it ppython. and the first p that got repeated won't delete from there even if i spam backspace so many time . the I tried to clear the command till first p and as I'm not able to remove first p from terminal I just wrote ython in front of it. it looks proper now python. but I got a error response as ython is not recognized command. this same happens with other commands too like cd converts to ccd.
Edit : I Re-installed vs code then but that didn't resolved my problem, when I installed it again all my extensions were there already installed then I deleted vs code again then went to the vs code's location there was a folder name .vscode I deleted that then installed vs code again now all the extensions were deleted from vs code but I'm still having the main problem . that doesn't resolved it. and I'm not getting that error while using other terminals like git bash and I'm getting this error only when I open python file's folder not when I open a react app folder or normal js or other language.
I also tried reseting the default setting from setting.json file as one of the answers suggested but that doesn't worked.
It's hard to answer this without knowing your configuration. What plugins have you installed? Try disabling those related to the terminal emulator one by one to see if they're causing any issues.
In doing this, you would naturally restart the terminal emulator as well. If the problem persists, check if you get this erroneous doubling on a terminal emulator outside of VS Code (Terminal or PowerShell).
If nothing works, try reinstalling the interpreter and also VS Code. Especially the latter, if this seems to affect only the terminal emulator within VS Code.
It's really hard to answer your question without knowing your vs code configuration setting.
The easiest way is you can reset your vs code to default
The Steps
Go to View > Command Palette or press Cmd + Shift + P (macOS) or Ctrl + Shift + P (Windows).
Search for open settings json and select Preferences: Open Settings (JSON) which show ups from the result list.
If you’ve been working with VS Code for a while and installed a lot of things and made a lot of changes, you’ll find there’s a lot of stuff in this file:
Delete everything inside the root braces and save the file
Relaunch your VS Code.
(This step is optional) In case you want to not only reset VS Code but also remove all installed extensions:
Delete the ~/.vscode/extensions folder if you’re on a Mac.
Delete the %USERPROFILE%.vscode\extensions folder if you’re using Windows.

Visual Studio Code cannot find mono path in OSX

It seems the current version(s) of VScode can not automatically identify Mono path by default causing failure to execute Omnisharp(Intellisense not working, etc). It seems the issue appeared in version 1.55.1 and after some digging, most people suggested that reverting your updates is the only option to fix this. If you look at the log (command + shift + U), you'll see the following error:
[ERROR] Error: Unable to find Mono. Ensure that Mono's '/bin' folder
is added to your environment's PATH variable.
Is there an alternative to fix the issue without reverting to the previous VScode version?
A simple solution would be to add the following parameters to your VScode setting.json file.
"omnisharp.useGlobalMono": "always",
"omnisharp.monoPath": "/Library/Frameworks/Mono.framework/Versions/Current"
Make sure to see if Mono is actually installed on your system and the path is correct.

bizarre problem in visual studio code with renaming a file (F2) - goes out of edit mode

When I highlight a file and hit F2, the file is normally replaced with an edit box where you can rename it.
After a few seconds, the edit box goes away and you need to quickly type the different file name (every time). I'm not sure what could cause this - any idea?
I'm on Ubuntu 20.04.1 LTS, Visual Studio code 1.52.1
Thanks
This looks like a bug reported in a few issues since v1.52 that all point to this one:
https://github.com/microsoft/vscode/issues/111652
also https://github.com/microsoft/vscode/issues/112555 and https://github.com/microsoft/vscode/issues/112438
It is reported in 111652 as fixed in the Insiders' Build. Can you test it there? I can't reproduce in Stable Build, W10.

VS code, julia linter doesn't work (on mac)

having assured myself that julia is enabled and that the linter is too (in vs code settings: Julia › Lint: Run), i get syntax highlighting on my xxx.jl script but no linting at all.
im on the latest vs code + latest julia 1.07 extension + latest macosx.
i did a clean installation of vs code, wiping all old related folders prior to installation (https://stackoverflow.com/a/53839847/11608725)
so julia is the only extension/package installed, no conflicts should be present.
what am i missing?
thanks!
edit/update:
i also found that i can NOT run an open script (via the leftmost button)
a pop-up says
and clicking on open launch.json gives
from which point on im pretty much stuck. googling around, a couple of very similar issues appeared (eg. https://stackoverflow.com/a/61284896/11608725, https://github.com/microsoft/vscode/issues/94725#issuecomment-612062020), but which should presumably have been fixed with vs code 1.44 and i am on 1.49.
perhaps the no-linting is related to this?
Have you tried Julia Formatter 0.3.0 for vs code? This has always worked for me.
similar message "Please first open a folder in order to .." pretty annoyingly appeared, my end, on a different platform [Win] [Visual Studio Code version: 1.56.2], too
meaning : it's likely the workflow/settings logic specific to VS Code, not an os/platform issue as such
all problems solved, my end, simply by
after launching VS Code
via "File" > "Open Folder..." : just do first -- before doing anything else in VS Code and/or with code-files -- open the current/working project folder [ie. the very folder with a ".code-workspace"-file in it for the given project (source file dir) ]

Pylance does not allow me to navigate to the source code, bringing me to the .pyi stub instead

I am using pylance for vs code and it works really nice, except that since I use it, when I try to check code from an installed library, I can get only to the stub, I think generated by pylance.
For example, the information shown about the function:
Or, crtl + click on the function brings me to the .pyi stub, which at
~/.vscode-server/extensions/ms-python.vscode-pylance-2020.11.0/dist/bundled/stubs/pandas/io/parsers.pyi
I can't find a way to navigate to the actual code (of pandas in this case).
If I deactivate Pylance and use Microsoft as language server by setting "python.languageServer": "Microsoft", in setting.json, the navigation to the library works fine.
Is it possible to navigate to the actual code with pylance active?
OS: Ubuntu 18.04
Visual Studio Code: Version: 1.50.1
Pylance: v2020.11.0
I had the same issue and realized I was using Docker. So I set up virtualenv and installed Django using pip.
Then I switched Python interpreter in the bottom-left corner of VS Code and it started working.
I know this is a specific case but I hope this answer helps someone in the same problem.
Let's remove ~/.vscode-server/extensions/ms-python.vscode-pylance-2020.11.0/dist/bundled/stubs/pandas
Then reload vscode
You can navigate to the references by right-clicking on the symbol and selecting "Go to References".
Also, ensure that you have a Python interpreter configured for the script where pandas is installed.
You can select an interpreter by opening Command Palette from the View menu and typing in "Python: Select Interpreter" and following through the dialog.
When you have that set, you should see two references when you Ctrl + click on a symbol: one for the stub and the other from the library.