0

For some reason errors are not producing any code highlighting (red squiggles) or file highlighting (red filenames) in my VS Code when writing in JavaScript and some other languages.

The answer is not apparent, even after a search here, google, GPT, etc. I uninstalled all extensions. Nothing changed. I reinstalled the app, nothing changed. I deleted all referenced to the app, re-installed, and then it worked. Temporarily. Just happened again though, no error highlighting again.

I am writing TypeScript currently, but also not working on JS or TS. errors are working in JSON and Python...

I am currently not running any extension at all, as I uninstalled all for testing purposes. I was using the ES7+ React/Redux/React-Native snippets and a few others.

Any code that would normally produce an error highlight is not.

const someConst = 1;
const someConst = 2;

the above will produce no error highlight in vscode, but obviously not run or compile.

I am running on a Mac with Apple Silicon.

VS Code about:

Version: 1.79.2 (Universal)
Commit: 695af097c7bd098fbf017ce3ac85e09bbc5dda06
Date: 2023-06-14T08:58:52.392Z (2 wks ago)
Electron: 22.5.7
Chromium: 108.0.5359.215
Node.js: 16.17.1
V8: 10.8.168.25-electron.0
OS: Darwin arm64 22.5.0

When I use the Developer: Show Running Extensions command in the command palette, I do not see the "TypeScript and JavaScript Language Features" extension listed.

OWolf
  • 5,012
  • 15
  • 58
  • 93
  • possibly related, but I don't think so. https://stackoverflow.com/a/74934214/11107541 (check your settings) – starball Jun 28 '23 at 22:54
  • I actually checked that solution. I added "problems.decorations.enabled": true, to the settings. Nothing changed – OWolf Jun 28 '23 at 22:59
  • did you test with a new, _untitled_ JSON file? Or a "special" JSON file like settings.json? The special ones I'd be less surprised if they still have problem highlighting. – starball Jun 28 '23 at 23:59
  • Thanks @starball. Yes I tested both. to be clear any JSON file IS producing error highlighting, so are Python files highlighting. JS TS and HTML are currently not. – OWolf Jun 29 '23 at 00:02

1 Answers1

1

I'll wager you have some builtin extensions disabled that you don't want to be. Open the Extensions View, and type @builtin into the search bar. Look for extensions that are disabled (they will be displayed dimmer than those that are enabled). For example, check for the "TypeScript and JavaScript Language Features" extension, the "HTML Language Features" extension, and the "CSS Language Features" extension.

starball
  • 20,030
  • 7
  • 43
  • 238
  • yes that was it. Thank you starball! TypeScript and JavaScript Language Features was disabled. – OWolf Jun 29 '23 at 02:29
  • @OWolf what I'm really curious about is how it got disabled in the first place. it's pretty hard to do accidentally. you kind of need to know where to look to even find it. Do you remember anything like doing it accidentally? – starball Jun 29 '23 at 02:33
  • 1
    And it happened twice, as mentioned above, to two installs. I may have done something accidentally, but not sure what. I did install some of my usual vs code extensions both times. I could list them out if anyone is really curious. But I will keep my eye out. If it becomes obvious I will come back here to explain. – OWolf Jun 29 '23 at 02:38
  • "The path /Volumes/PortableSSD/Development/Education/node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/tsserver.js doesn't point to a valid tsserver install. Falling back to bundled TypeScript version." this is an alert message I get at startup. likely related to my issue. – OWolf Jun 29 '23 at 20:12
  • I gather that it has to do with storing my typescript project on an external drive. Still not sure why, but the alert above only occurs when I do so. – OWolf Jun 30 '23 at 20:06