Skip to content

Class methods in JavaScript not always highlighted #240926

Closed as not planned
Closed as not planned
@seanmhall

Description

@seanmhall

Type: Bug

I find that if I am using a Class in JavaScript, e.g.:

Class Foo {
Constructor() {
//blah blah
}
method1 = function() { 
//whatever
}
method 2 = function () {
//whatever
}
}

Only the name of method2 is highlighted correctly (i.e. in teal or whatever you call that color) and the name of method1 is not.

VS Code version: Code 1.97.1 (e249dad, 2025-02-10T13:13:58.153Z)
OS version: Windows_NT x64 10.0.19045
Modes:

System Info
Item Value
CPUs AMD A10-8700P Radeon R6, 10 Compute Cores 4C+6G (4 x 1797)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
Load (avg) undefined
Memory (System) 15.45GB (5.22GB free)
Process Argv --crash-reporter-id 5dd4a55c-e292-4dd7-a68b-b535f3ab5815
Screen Reader no
VM 0%
Extensions (11)
Extension Author (truncated) Version
debugpy ms- 2025.0.1
isort ms- 2023.10.1
python ms- 2025.0.0
vscode-pylance ms- 2025.2.1
jupyter ms- 2024.11.0
jupyter-keymap ms- 1.1.2
jupyter-renderers ms- 1.1.0
vscode-jupyter-cell-tags ms- 0.1.9
vscode-jupyter-slideshow ms- 0.1.6
cpptools ms- 1.24.0
remote-vscode raf 1.1.0
A/B Experiments
vsliv368:30146709
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscod805cf:30301675
binariesv615:30325510
py29gd2263:31024239
c4g48928:30535728
azure-dev_surveyone:30548225
962ge761:30959799
h48ei257:31000450
pythontbext0:30879054
cppperfnew:31000557
dwnewjupyter:31046869
nativerepl2:31139839
pythonrstrctxt:31112756
nativeloc1:31192215
iacca1:31171482
5fd0e150:31155592
dwcopilot:31170013
stablechunks:31184530
6074i472:31201624
dwoutputscf:31233691
8did9651:31230678
9064b325:31222308
copilot_t_ci:31222730
jda6j935:31233686

Metadata

Metadata

Assignees

Labels

info-neededIssue requires more information from poster

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions