6/7/2023 0 Comments Auto indent python codeRules in languageConfiguration.ts may conflict with onTypeIndenting.Cut down regexes in language configuration so that it doesn't conflict with onTypeIndenting. Modify onEnterFormatter.ts to support only indenting.Turn on editor.formatOnType to true by default when using python language. So we should be moving away from regexes when we solve work items for this. We can use npm package python-indent-parser similarly to the way does.Īlso another thing to note here is that having both language configuration and key bindings can override each other sometimes. It covers most cases ( #481) we currently have open issues for and is well documented. seems like a wonderful place to take help from. However we need to keep in mind that in this case we're responsible for cursor alignment after the user presses enter, otherwise cursor would stay where it is.Īs there is no progress on vscode upstream issues related to 1., going with 3. This way we don't need to have editor.formatOnType enabled. "when": "editorTextFocus & editorLangId = python"Īnd use that to intervene.
0 Comments
Leave a Reply. |