I am trying to figure out a weird formatting feature in Virtual Studio Code that drives me nuts.
If i open brackets in Visual Studio Code, the code "darkens" to show me where the bracket start and end. While this usually works perfectly, there is some weird behavior using the code below
driver = webdriver.Chrome(executable_path=r'C:\Program Files\ChromeDriver\chromedriver.exe')
driver.get(url)
driver.implicitly_wait(3)
After closing the brackets in the first row, the entire code afterwards gets dark. After a while this really puts a strain on the eyes.
Is there any way to fix this ? What kind of setting is responsible for this formatting "feature"
Thanks in Advance !
Update (provided Screenshots of installed Extensions and Code Formatting)
List of Extensions Screenshot of Code
I am using the Standard Dark Theme
My settings.json can be found here - settings.json
CodePudding user response:
The darkening of the text indicates unreachable code, but I don't see why,
this is can be a bug with the Pylance (see:bug), you could disable the darkening feature, from settings UI with Editor: Show Unused
or only for python from settings.json:
"[python]": {
"editor.showUnused": false,
},
but it's not recommended, that can be a very helpful indicator. You should update the Pylance extension and vscode if possible.