Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Class methods in JavaScript not always highlighted #240926

Closed
seanmhall opened this issue Feb 16, 2025 · 4 comments
Closed

Class methods in JavaScript not always highlighted #240926

seanmhall opened this issue Feb 16, 2025 · 4 comments
Assignees
Labels
info-needed Issue requires more information from poster

Comments

@seanmhall
Copy link

seanmhall commented Feb 16, 2025

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

Copy link

Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.97.2. Please try upgrading to the latest version and checking whether this issue remains.

Happy Coding!

@RedCMD
Copy link
Contributor

RedCMD commented Feb 16, 2025

Image

@mjbvz
Copy link
Collaborator

mjbvz commented Feb 18, 2025

Can you please share the exact text of the code. The current example has a bunch of syntax issues

@mjbvz mjbvz added the info-needed Issue requires more information from poster label Feb 18, 2025
Copy link

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.

Happy Coding!

@vs-code-engineering vs-code-engineering bot closed this as not planned Won't fix, can't repro, duplicate, stale Feb 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

3 participants