Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change setting to not show the complexity line in visual studio code editor for JavaScript?

In my Visual Studio Code editor (i use the latest version 1.24.1 now), by default when open any javascript file, there are lot of additional lines showing "Complexity is X, XXX" for example "complexity is 8, it's time to do something" etc..

I didn't install special add-on for such function. It seems this function is brought by default add-ons. Does anyone know where to configure a setting NOT to show these annoying messages in editor?

like image 343
Ben Xu Avatar asked Jun 21 '18 06:06

Ben Xu


People also ask

What is complexity in VS Code?

Code ComplexityComputes complexity in TypeScript / JavaScript / Lua files. It's not a standard metric, but it is a close approximation of Cyclomatic complexity. Just like the previous extension, this puts a handy inline notice at the top of the file.

How do I turn off VS Code telemetry?

Disable telemetry reporting# telemetryLevel user setting to off . From File > Preferences > Settings (macOS: Code > Preferences > Settings), search for telemetry , and set the Telemetry: Telemetry Level setting to off . This will silence all telemetry events from VS Code going forward.

How do I change my VS Code settings?

Settings editor# To open the Settings editor, use the following VS Code menu command: On Windows/Linux - File > Preferences > Settings. On macOS - Code > Preferences > Settings.

How do I turn off autocomplete in VS Code?

By default, VS Code shows snippets and completion proposals in one widget. You can control the behavior with the editor. snippetSuggestions setting. To remove snippets from the suggestions widget, set the value to "none" .


1 Answers

That's caused by CodeMetrics extension.

Put this setting in your user, workspace or folder settings:

"codemetrics.basics.CodeLensEnabled": false,

You can get to settings via menu:

File > Preferences > Settings

or via keyboard shortcut: CTRL + ,

like image 77
Braca Avatar answered Sep 17 '22 16:09

Braca