Written by

Technical Lead at SP.ARM
Question Alexey Maslov · May 7, 2024

Annoying Bulb in VS Code

Hello everyone,
After upgrade to InterSystems ObjectScriptv2.12.3 extension an annoying "bulb" occured in the beggining of code line. If point upon it, there are some actions being offered. In my case, an action "Wrap in try/catch" is always among them, even if the code line is already within try/catch block. Another action which appears sometimes is "Extract to method". If accept, new method is inserted into the class with only one line body inside. IMHO, not too clever "AI solution" as well.
The question is: how to disable this "bulb"?

Comments

John Murray · May 8, 2024

These Code Actions are contributed by the InterSystems Language Server extension. To request improvements please open issues at https://github.com/intersystems/language-server/issues

The presence of the VS Code lightbulb is controllable with the editor.lightbulb.enabled setting, which can be set per-language if you wish.

For example, in Settings Editor use this filter to alter the setting at user-level or workspace-level only for ObjectScript classes.

@lang:objectscript-class editor.lightbulb.enabled

0
Alexey Maslov  May 13, 2024 to John Murray

Thank you, John!
It really helped. Possibility to change such a setting per language seems to be useful.
Just adding my 2c: to disable bulb in MAC/INT routines, the following settings should be applied: 

@lang:objectscript lightbulb.enabled off

0