How do I get TypeScript highlighting working in editor

Syntax and semantic highlighting don’t seem to be working for TypeScript files. Is this normal? Are there vscode extensions that might be causing this?

having the same issue

What operating system are you on? Is this true if you uninstall and then do a fresh install of Cursor with no VSCode extensions?

I’ll try that when I get a chance.

I just bought a mac, and did a fresh install. I did add some extensions, but I added them manually. Still ended up with the same bug.

The “Extension Host” output has the following errors if they help.

2023-09-06 08:59:49.133 [info] ExtensionService#_doActivateExtension formulahendry.auto-close-tag, startup: false, activationEvent: '*'
2023-09-06 09:00:30.077 [info] ExtensionService#_doActivateExtension PKief.material-icon-theme, startup: false, activationEvent: 'onStartupFinished'
2023-09-06 09:01:15.852 [info] ExtensionService#_doActivateExtension vscode.json-language-features, startup: false, activationEvent: 'onLanguage:jsonc'
2023-09-06 09:01:15.878 [info] ExtensionService#_doActivateExtension vscode.typescript-language-features, startup: false, activationEvent: 'onLanguage:jsonc'
2023-09-06 09:03:00.077 [info] ExtensionService#_doActivateExtension yoavbls.pretty-ts-errors, startup: false, activationEvent: 'onLanguage:typescriptreact'
2023-09-06 09:32:33.317 [info] Extension host terminating: renderer closed the MessagePort
2023-09-06 09:32:33.330 [error] Canceled: Canceled
    at new c (/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:99:105827)
    at a.O (/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:111:11756)
    at Proxy.$.<computed>.j.charCodeAt.$.<computed> (/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:111:9031)
    at e.ExtHostCommands.g (/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:99:130124)
    at e.ExtHostCommands.executeCommand (/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:99:129500)
    at I.registerCommand.description (/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:99:128793)
    at e.ExtHostCommands.h (/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:99:130710)
    at e.ExtHostCommands.g (/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:99:129600)
    at e.ExtHostCommands.executeCommand (/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:99:129500)
    at Object.executeCommand (/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:117:25248)
    at D (/Applications/Cursor.app/Contents/Resources/app/extensions/git/dist/main.js:2:1261542)
    at b.invoke (/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:63:145)
    at deliver (/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:63:2121)
    at n.fire (/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:63:1729)
    at Object.m [as dispose] (/Applications/Cursor.app/Contents/Resources/app/extensions/git/dist/main.js:2:1276197)
    at /Applications/Cursor.app/Contents/Resources/app/extensions/git/dist/main.js:2:1280699
    at Array.forEach (<anonymous>)
    at g.dispose (/Applications/Cursor.app/Contents/Resources/app/extensions/git/dist/main.js:2:1280685)
    at r.<anonymous> (/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:97:12640)
    at r.dispose (/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:97:12775)
    at r.<anonymous> (/Applications/Cursor.app/Contents/Resources/app/extensions/git/dist/main.js:2:1263672)
    at r.dispose (/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:97:12775)
    at D (/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:10:12085)
    at n.Z (/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:113:11285)
    at /Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:113:9187
    at Array.map (<anonymous>)
    at n.S (/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:113:9175)
    at n.terminate (/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:113:9445)
    at h.terminate (/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:117:1544)
    at p (/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:127:34497)
    at MessagePortMain.<anonymous> (/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:127:30636)
    at MessagePortMain.emit (node:events:513:28)
    at Object.MessagePortMain._internalPort.emit (node:electron/js2c/utility_init:2:367) setContext undefined
2023-09-06 09:32:33.332 [error] Canceled: Canceled
    at new c (/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:99:105827)
    at a.O (/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:111:11756)
    at Proxy.$.<computed>.j.charCodeAt.$.<computed> (/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:111:9031)
    at e.ExtHostCommands.g (/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:99:130124)
    at e.ExtHostCommands.executeCommand (/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:99:129500)
    at I.registerCommand.description (/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:99:128793)
    at e.ExtHostCommands.h (/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:99:130710)
    at e.ExtHostCommands.g (/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:99:129600)
    at e.ExtHostCommands.executeCommand (/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:99:129500)
    at Object.executeCommand (/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:117:25248)
    at p.VscodeDevShareProvider.set b [as b] (/Applications/Cursor.app/Contents/Resources/app/extensions/github/dist/extension.js:2:152871)
    at /Applications/Cursor.app/Contents/Resources/app/extensions/github/dist/extension.js:2:153581
    at /Applications/Cursor.app/Contents/Resources/app/extensions/git/dist/main.js:2:1349690
    at b.invoke (/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:63:145)
    at deliver (/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:63:2121)
    at n.fire (/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:63:1729)
    at Object.m [as dispose] (/Applications/Cursor.app/Contents/Resources/app/extensions/git/dist/main.js:2:1276197)
    at /Applications/Cursor.app/Contents/Resources/app/extensions/git/dist/main.js:2:1280699
    at Array.forEach (<anonymous>)
    at g.dispose (/Applications/Cursor.app/Contents/Resources/app/extensions/git/dist/main.js:2:1280685)
    at r.<anonymous> (/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:97:12640)
    at r.dispose (/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:97:12775)
    at r.<anonymous> (/Applications/Cursor.app/Contents/Resources/app/extensions/git/dist/main.js:2:1263672)
    at r.dispose (/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:97:12775)
    at D (/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:10:12085)
    at n.Z (/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:113:11285)
    at /Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:113:9187
    at Array.map (<anonymous>)
    at n.S (/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:113:9175)
    at n.terminate (/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:113:9445)
    at h.terminate (/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:117:1544)
    at p (/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:127:34497)
    at MessagePortMain.<anonymous> (/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:127:30636)
    at MessagePortMain.emit (node:events:513:28)
    at Object.MessagePortMain._internalPort.emit (node:electron/js2c/utility_init:2:367) setContext undefined

Also have this error for the “Window” output.

2023-09-06 08:54:49.393 [error] Cannot read properties of undefined (reading 'timestamp'): TypeError: Cannot read properties of undefined (reading 'timestamp')
    at e.BackgroundEditService.shouldFire (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:21242:612)
    at vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:21242:1079
2023-09-06 08:54:52.393 [info] [perf] Render performance baseline is 23ms
2023-09-06 08:58:22.339 [info] [perf] Render performance baseline is 31ms
2023-09-06 09:02:30.075 [warning] SettingsEditor2: Settings not included in settingsLayout.ts: aichat.repoName, aicontext.personalContext, testRunner.config
2023-09-06 09:32:36.855 [info] [perf] Render performance baseline is 24ms

Will investigate, this should definitely not be happening! What theme are you on?

Dark (Visual Studio)

Ah, and when I swap to “Dark Modern” it works.

Got the same problem here, also ‘fixed’ when swapping themes but annoying nonetheless as I reckon me and many other devs are kinda hesitant to adopting another IDE.