VS Code Typescript syntaxhighlighting is gone - visual-studio-code

My syntax highlighting for typescript is gone.
All the other languages are fine.
Things like import, from, const are still blue, but if I use Array<any> it only shows up in white.

Make sure that no extensions are messing with this. Launch vscode from the command line with the command code --disable-extensions and see if the coloring works.
Install a new theme or two and see if that fixes the syntax highlighting.
Are you using the normal builds or the insiders builds? Have you updated recently? What could have changed in your installation or environment?
If nothing else works, open an issue with the team on github because there might be a bug: https://github.com/Microsoft/vscode/issues

Related

Prettier not working on VScode tried everything from stackoverflow still nothing happened?

Prettier not working on VSCode
I have been using prettier for java on vs code from very long everything was working smoothly till yesterday and suddenly prettier stopped working for java.
I have tried every available resource on Youtube and Stack Overflow still didn't solve my issue, please help.
I tried from changing default formatter and format on save to settings.json still now working showing error - FormattingExtension 'Prettier - Code formatter' is configured as formatter but it cannot format 'Java'-files
Normally this happens when you have another extension overlapping the prettier settings. Disabling other extensions normally solves the problem. Reinstalling visual studio can be your best option, but you have to remove all remaining settings, or it will just be the same.
You can always install directly in terminal using: https://prettier.io/docs/en/install.html
Confirm on extensions that prettier is enabled. Update Visual Studio and Windows.

VS Code - Prettier is formatting differently for me than others

Prettier is behaving differently for me compared to my team mates.
We all have same version 9.5.0 of prettier installed on our VS Code.
We all have same configuration of prettier.
Still it is formatting my typescript file differently for one particular line than others and because of this the deployment is failing when I push anything from my machine and works for everybody else.
Does anybody face this?
Which part should I check to see the difference?
Update 1
One thing we found that is different is the VS Code version.
I have version 1.67.2 installed my colleague has 1.63.2 installed.
Could this be the reason?
Update 2
This is the exact line where I am getting prettier error on my machine for wrong formatting while this same formatting is considered correct by prettier for other machines
And this is how prettier formats the line on my machine (then devops complaint that it is a wrong formatting)
I think there is a bug with the prettier extension. Although I had my default formatter set to the prettier extension in the settings UI, I had to re do it manually.
Open any file, right click in the editor screen, click Format document with and choose Prettier - Code formatter.
The local prettier config and the one vscode uses should work now
I faced the same isssue.
in my case I run
npx prettier --version
on both computer and each one return different prettier version.
so although the prettier extension in vscode was 9.5.0 for both pcs. the npm module installed for the project in node_modules was different.
I installed the same prettier module for both computer and the restart vscode and problem solved
You might have installed multiple formatters and you aren't using the correct one. Try to specify it manually in command palette. Check out this answer (Solution A)

Visual Studio Code forgetting my extension

I'm developing an extension for Visual Studio Code for the proprietary language that the product I code for uses because I hate the antiquated IDE ships with it. Everything is going fine except for one issue. When I close and open Visual Studio Code, Visual Studio Code seems to "forget" my extension. Syntax highlighting, code completion, commands that I've implemented all stop working. I have to disable and then enable to extension for it to start working again. I am OK with this for personal use. However, I want to push this out to other users both in and outside of the company. If any code would be helpful, let me know, and I will happily provide it.
I resolved this issue. It was because in my settings.json for VS Code I had an entry for the file extension pointing to an extension that I had removed. Removing that line from my settings.json resolved the issue of things not working when I opened VS Code.
Thanks to everybody for their comments.

How to show all (-Wall) warnings in VSCode

I am using Visual Studio Code with the C/C++ extension. IntelliSense shows some errors but definitely not all of them, I tried settings the following setting:
"C_Cpp.default.compilerArgs": ["${default}", "-Wall"]
But is has no effect. The only thing that's some improvement is adding a build task: when I run it the warnings and errors it generates are displayed inline in VSCode. This workaround is still suboptimal: I need to build to get the errors while I would like to get as soon as I finish typing them (like it already is the case for other errors both in VSCode and other editors I know).
How can I fix this issue ?

Cursor overwrite mode in vscode?

I can't seem to find any way to put the cursor into 'overwrite' mode - as in when you press the insert key and newly typed characters overwrite the existing characters inline. I haven't found any reference anywhere online to the omission or inclusion of such a feature in vscode, but it seems to be a fairly commonly used feature. Does this exist?
I too was missing the overtype mode in Visual Studio Code, so I went ahead and wrote an Overtype extension to add the behavior!
You can install it by opening the command palette and entering:
ext install overtype
Update: As of this writing, VS Code still does not have overtype built in, and the original extension seems to no longer be maintained. There is a more up-to-date fork here.
It seems to be working fine for me both ways I can switch it with shift + i on latest VS Code and macOS system.
For me, I think it's because of an extension called Vim (Vim emulation for Visual Studio Code). I was tired of this problem. Just going through all the extensions and settings, Finally I found this solution. By uninstalling this Vim extension I was free of this error.