Added vscode settings

This commit is contained in:
Kristofers Solo
2022-04-28 20:54:44 +03:00
parent 245c3ca779
commit 837a479d82
25004 changed files with 2499800 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>scope</key>
<string>source.python</string>
<key>settings</key>
<dict>
<key>cancelCompletion</key>
<string>^(.*\b(and|or)$)|(\s*(pass|return|and|or|(class|def|import)\s*[a-zA-Z_0-9]+)$)</string>
</dict>
</dict>
</plist>

View File

@@ -0,0 +1,46 @@
[
// Auto-pair quotes
{ "keys": ["\""], "command": "insert_snippet", "args": {"contents": "\"$0\""}, "context":
[
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^(?:\t| |\\)|]|\\}|>|$)", "match_all": true },
{ "key": "preceding_text", "operator": "regex_contains", "operand": "(?:[bfruBFRU]|[^\"[:alnum:]_])$", "match_all": true },
{ "key": "eol_selector", "operator": "not_equal", "operand": "string.quoted.double - punctuation.definition.string.end", "match_all": true },
{ "key": "eol_selector", "operator": "equal", "operand": "source.python", "match_all": true }
]
},
// Auto-pair single quotes
{ "keys": ["'"], "command": "insert_snippet", "args": {"contents": "'$0'"}, "context":
[
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^(?:\t| |\\)|]|\\}|>|$)", "match_all": true },
{ "key": "preceding_text", "operator": "regex_contains", "operand": "(?:[bfruBFRU]|[^'[:alnum:]_])$", "match_all": true },
{ "key": "eol_selector", "operator": "not_equal", "operand": "string.quoted.single - punctuation.definition.string.end", "match_all": true },
{ "key": "eol_selector", "operator": "equal", "operand": "source.python", "match_all": true }
]
},
// Auto-pair curly brackets
{ "keys": ["{"], "command": "insert_snippet", "args": {"contents": "{$0}"}, "context":
[
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "following_text", "operator": "not_regex_contains", "operand": "^\\{", "match_all": true },
{ "key": "selector", "operator": "equal", "operand": "meta.fstring.python", "match_all": true },
{ "key": "selector", "operator": "equal", "operand": "string.quoted", "match_all": true }
]
},
// Replace a '{|}' with '{{|' when typing within f-string
{ "keys": ["{"], "command": "fstringbrace",
"context":
[
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "preceding_text", "operator": "regex_contains", "operand": "\\{$", "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^\\}", "match_all": true },
{ "key": "selector", "operator": "equal", "operand": "meta.fstring.python", "match_all": true },
{ "key": "selector", "operator": "equal", "operand": "constant.character.format.placeholder.other", "match_all": true }
]
}
]

View File

@@ -0,0 +1,11 @@
Some files in this directory were copied from
https://github.com/sublimehq/Packages repository and
are covered by their original license:
Permission to copy, use, modify, sell and distribute this
software is granted. This software is provided "as is" without
express or implied warranty, and with no claim as to its
suitability for any purpose.
See https://github.com/sublimehq/Packages/blob/master/LICENSE for more
details.

View File

@@ -0,0 +1,5 @@
{
"detect_indentation": true,
"translate_tabs_to_spaces": true,
"tab_size": 4
}

View File

@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>name</key>
<string>Miscellaneous</string>
<key>scope</key>
<string>source.python</string>
<key>settings</key>
<dict>
<key>decreaseIndentPattern</key>
<string>^\s*(elif|else|except|finally)\b.*:</string>
<key>increaseIndentPattern</key>
<string>^\s*(class|((async\s+)?(def|with|for))|elif|else|except|finally|if|try|while)\b.*:\s*$</string>
<key>disableIndentNextLinePattern</key>
<string></string>
<key>shellVariables</key>
<array>
<dict>
<key>name</key>
<string>TM_COMMENT_START</string>
<key>value</key>
<string># </string>
</dict>
<dict>
<key>name</key>
<string>TM_LINE_TERMINATOR</string>
<key>value</key>
<string>:</string>
</dict>
</array>
</dict>
<key>uuid</key>
<string>1eca4598-6e20-11e5-a41f-7c6d62900c7c</string>
</dict>
</plist>

View File

@@ -0,0 +1,12 @@
{
"shell_cmd": "python -u \"$file\"",
"file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
"selector": "source.python",
"variants":
[
{
"name": "Syntax Check",
"shell_cmd": "python -m py_compile \"${file}\"",
}
]
}

View File

@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>name</key>
<string>Symbol List: Hide Decorator</string>
<key>scope</key>
<string>source.python meta.function.decorator.python entity.name.function.decorator.python</string>
<key>settings</key>
<dict>
<key>showInSymbolList</key>
<integer>0</integer>
<key>showInIndexedSymbolList</key>
<integer>0</integer>
</dict>
<key>uuid</key>
<string>f14b932e-6e1f-11e5-90fc-7c6d62900c7c</string>
</dict>
</plist>

View File

@@ -0,0 +1,39 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>name</key>
<string>Symbol List</string>
<key>scope</key>
<string>source.python meta.function.python, source.python meta.class.python</string>
<key>settings</key>
<dict>
<key>showInSymbolList</key>
<integer>1</integer>
<key>symbolTransformation</key>
<string>
# transform into 'class Classname' form
s/(class)\s+([[:alpha:]_]\w*)\s*.*/$1 $2/g;
# transform into '[async] funciton_name(args,...)' long form
s/(?x)
def \s+
([[:alpha:]_]\w*) \s* \(
(.*?) \)(\s*: | \s*->.*) $
/$1\(($2\)/g;
# remove extra whitespace in arg list (except leading)
s/(\S)\s{2,}/$1 /g;
# transform into short form
s/(?x)
(class\s|async\s)? (\w+\()
(.{80})(.+)
(\))$
/$1$2$3\.\.\.$5/g;
</string>
</dict>
<key>uuid</key>
<string>092a7050-6e20-11e5-bf4c-7c6d62900c7c</string>
</dict>
</plist>