Commit Graph

14 Commits

Author SHA1 Message Date
Alexandru Dima
2d5f7fd072
Move onEnterRules to language-configuration.json 2021-01-20 12:20:27 +01:00
Brett Cannon
2f581e8986
Allow a space between # and region for folding in Python
Automatic formatting inserts a space between the comment marker `#` and text in the Python extension, so without the allowance for whitespace then `"editor.formatOnType": true` breaks all region markers.

Closes Microsoft/vscode-python#1073 and Microsoft/vscode-python#33
2018-03-28 15:34:56 -07:00
Martin Aeschlimann
9ee425cebd Auto-closing backticks in Python. Fixes #41615 2018-03-02 09:45:46 +01:00
Martin Aeschlimann
033d21d196 Change python block comment to """. Fixes #42767 2018-02-26 21:23:19 +01:00
Martin Aeschlimann
d4d3d407ea
Merge pull request #35636 from Syeberman/python_auto_closing_string_prefix
Support auto-closing quotes in Python raw string literals, etc
2017-11-30 12:25:16 +01:00
Martin Aeschlimann
cf70385df5 Folding regions broken 2017-10-12 16:55:15 +02:00
Martin Aeschlimann
1fb361861f [folding] add work boundries to folding markers 2017-10-11 17:28:10 +02:00
lizz
335bce9302 fix indentation 2017-10-08 22:00:44 +08:00
lizz
f5c051e611 Region fold in python
using `#region` and `#endregion`
2017-10-08 21:08:48 +08:00
Sye van der Veen
f5143a99e0 Support auto-closing quotes in Python raw string literals, etc
Python uses a ["string prefix"](https://docs.python.org/3/reference/lexical_analysis.html#string-and-bytes-literals) to denote bytes literals (`b''`), raw strings (`r''`), and formatted string literals (`f''`).  This change makes it so that when one types `r'` in VS Code, the string will be auto-closed as `r''` (as an example).

Python also supports multiple string prefixes for a single literal.  I've tested that typing `fr'` will auto-close to `fr''`, and so forth.
2017-10-05 14:43:46 -04:00
Martin Aeschlimann
a678f60100 FoldingRules language configuration simplification 2017-09-22 13:50:03 +02:00
Martin Aeschlimann
de68414a9a [folding] should not fold whitespace after function. Fixes #3353 2017-09-20 11:09:42 +02:00
Matt Bierner
4add169505 Disable (#16350)
**Bug**
In python file, typing `'` in a string or comment results in `''` due to auto closing pairs.

**fix**
Apply same fix that we use for Typescript to disable this behavior in strings and comments https://github.com/Microsoft/vscode/blob/master/extensions/typescript/language-configuration.json

Fixes #8539
2016-12-02 11:22:34 -08:00
Martin Aeschlimann
4a13944af6 Migrate all other languages to language-configuration.json 2016-07-21 20:30:37 +02:00