forked from DamnWidget/anaconda
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Anaconda.sublime-settings
600 lines (477 loc) · 18.6 KB
/
Anaconda.sublime-settings
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
/*
Anaconda default settings
*/
{
/*
Anaconda Tooltip Options
Sublime Text 3 supports tooltips since build 3070, if anaconda
runs in a ST3 instalation equal or newer than build 3070 it can
be configured to show tooltips for documentation and signatures
The options below sets how the tooltip is shown. Set the theme
as dark if you are using a dark theme or light if you are using
a light one.
*/
"anaconda_tooltip_theme": "dark", // possible options "light" or "dark"
/*
If you set the following option as true, anaconda will display the
signatures of the methods in a floating popup
*note*: this action takes effect if "display_signatures" is true
*/
"enable_signatures_tooltip": true,
/*
If you set the following option as true, anaconda will display the
documentation of modules, classes or methods in a floating popup
*/
"enable_docstrings_tooltip": true,
/*
If the option below is set as true, anaconda will merge the
outputs of display_signatures and show documentation
*note*: This has only effect if tooltips are enabled
*/
"merge_signatures_and_doc": true,
/*
Auto project switching
If you set this to true, anaconda will detect project switches and
will reconnect a new JsonServer with the switched project
configuration
*/
"auto_project_switch": true,
/*
Python Builder Options
If enabled, anaconda will add your configured interpreter (if any)
into your per-project `builder_systems` list if any, or create a
new one in case that you don't define one yourself.
This is enabled by default, disable it if you experience slowdowns
when you switch between projects, and fill an issue in GitHub
*/
"auto_python_builder_enabled": true,
/*
Debug Mode:
If you need to debug the jsonserver.py service for any reason, you
can configure the following options to make the plugin to connect
always to the same port in your local machine.
Procedure:
1. Set the debug_mode as true
2. Set the debug_port to your desired port
3. Close Sublime Text 3
4. cd to your Packages/Anaconda directory
5. start the jsonserver manually:
python -B anaconda_server/jsonserver.py -p test 9999 DEBUG
6. Start your Sublime Text 3 and
Then your anaconda plugin will use the configured server and you will
get debug messages in the terminal where you ran it
*/
"jsonserver_debug": false,
"jsonserver_debug_port": 9999,
/*
Default python interpreter.
This can (and should) be overridden by project settings
NOTE: if you want anaconda to lint and complete using a remote
python interpreter that runs the anaconda's minserver.py script
in a remote machine just use it's address:port as interpreter
for example:
"python_interpreter": "tcp://my_remote.machine.com:19360"
*/
"python_interpreter": "python",
/*
Disable anaconda completion
WARNING: set this as true will totally disable anaconda completion
*/
"disable_anaconda_completion": false,
/*
Set those as true if you don't want Sublime Text regular completions
*/
"suppress_word_completions": false,
"suppress_explicit_completions": false,
/*
If complete_parameters is true, anaconda will add function and class
parameters to its completions.
If complete_all_parameters is true, it will add all the possible
parameters, if it's false, it will add only required parameters
*/
"complete_parameters": false,
"complete_all_parameters": false,
/*
If you set the following option as true, anaconda will display the
signatures of the methods you are using while typing
*/
"display_signatures": true,
/*
The following set of options controls the pep8 autoformating behaviour
The full list of errors that can be fixed are:
E101 - Reindent all lines.
E111 - Reindent all lines.
E121 - Fix indentation to be a multiple of four.
E122 - Add absent indentation for hanging indentation.
E123 - Align closing bracket to match opening bracket.
E124 - Align closing bracket to match visual indentation.
E125 - Indent to distinguish line from next logical line.
E126 - Fix over-indented hanging indentation.
E127 - Fix visual indentation.
E128 - Fix visual indentation.
E129 - Indent to distinguish line from next logical line.
E201 - Remove extraneous whitespace.
E202 - Remove extraneous whitespace.
E203 - Remove extraneous whitespace.
E211 - Remove extraneous whitespace.
E221 - Fix extraneous whitespace around keywords.
E222 - Fix extraneous whitespace around keywords.
E223 - Fix extraneous whitespace around keywords.
E224 - Remove extraneous whitespace around operator.
E225 - Fix missing whitespace around operator.
E226 - Fix missing whitespace around operator.
E227 - Fix missing whitespace around operator.
E228 - Fix missing whitespace around operator.
E231 - Add missing whitespace.
E241 - Fix extraneous whitespace around keywords.
E242 - Remove extraneous whitespace around operator.
E251 - Remove whitespace around parameter '=' sign.
E261 - Fix spacing before comment hash.
E262 - Fix spacing after comment hash.
E271 - Fix extraneous whitespace around keywords.
E272 - Fix extraneous whitespace around keywords.
E273 - Fix extraneous whitespace around keywords.
E274 - Fix extraneous whitespace around keywords.
E301 - Add missing blank line.
E302 - Add missing 2 blank lines.
E303 - Remove extra blank lines.
E304 - Remove blank line following function decorator.
E401 - Put imports on separate lines.
E501 - Try to make lines fit within --max-line-length characters.
E502 - Remove extraneous escape of newline.
E701 - Put colon-separated compound statement on separate lines.
E702 - Put semicolon-separated compound statement on separate lines.
E703 - Put semicolon-separated compound statement on separate lines.
E711 - Fix comparison with None.
E712 - Fix comparison with boolean.
W191 - Reindent all lines.
W291 - Remove trailing whitespace.
W293 - Remove trailing whitespace on blank line.
W391 - Remove trailing blank lines.
E26 - Format block comments.
W6 - Fix various deprecated code (via lib2to3).
W602 - Fix deprecated form of raising exception.
*/
/*
Autoformat files on save
This option is disabled by default, AutoPEP8 is really slow and it get
the file buffer read only while its working in the background.
Use this at your risk
*/
"auto_formatting": false,
/*
Timeout for the autoformatting tool before fail
Note: Take into account that depending on the size of the file you
want to autoformat, this can take a while
*/
"auto_formatting_timeout": 1, // seconds
/*
Enable unsafe changes:
https://github.com/hhatto/autopep8#more-advanced-usage
Set it as 0 if you are unsure here
*/
"aggressive": 0,
/*
Do not fix the errors listed here:
Note: By default we ignore E309 as this is not pep8 but it does
conflict with pep257 D211.
*/
"autoformat_ignore":
[
"E309"
],
/*
Fix only the errors listed here:
*/
"autoformat_select":
[
],
/*
Set the threshold limit for McCabe complexity checker
*/
"mccabe_threshold": 7,
/*
Set is a false to disable Anaconda Linting totally
*/
"anaconda_linting": true,
/*
Sets the linting behaviour for anaconda:
"always" - Linting works always even while you are writing (in the background)
"load-save" - Linting works in file load and save only
"save-only" - Linting works in file save only
*/
"anaconda_linting_behaviour": "always",
/*
The minimum delay in seconds (fractional seconds are okay) before
a linter is run when the "anaconda_linting" setting is true. This allows
you to have background linting active, but defer the actual linting
until you are idle. When this value is greater than the built in linting delay,
errors are erased when the file is modified, since the assumption is
you don't want to see errors while you type (unless the option
anaconda_linter_persistent is true).
*/
"anaconda_linter_delay": 0.5,
/*
If true anaconda does not remove lint marks while you type
*/
"anaconda_linter_persistent": false,
// If true, anaconda draws gutter marks on line with errors
"anaconda_gutter_marks": true,
/*
If anaconda_gutter_marks is true, this determines what theme is used.
Theme 'basic' only adds dots and circles to gutter.
Other available themes are 'alpha', 'bright', 'dark', 'hard', "retina"
(for retina displays) and 'simple'. To see icons that will be used for
each theme check gutter_icon_themes folder in Anaconda package.
*/
"anaconda_gutter_theme": "basic",
/*
If 'outline' (default) anaconda will outline error lines
If 'fill' anaconda will fill the lines
If 'none' anaconda will not draw anything on error lines
*/
"anaconda_linter_mark_style": "outline",
/*
If anaconda_linter_mark_style is set to none and this is set to false,
anaconda will not underline errors
If anaconda_linter_mark_style is set to anything else, this option is
ignored
*/
"anaconda_linter_underlines": true,
/*
If anaconda_linter_show_errors_on_save is set to true, anaconda
will show a list of errors when the user save the file
This is disabled by default
*/
"anaconda_linter_show_errors_on_save": false,
/*
Use PyLint instead of PyFlakes and PEP-8
**** WARNING ****
- If you set this value as true, PyFlakes and pep8 will not bet used
- PyLint does *NOT* support lint buffers that are not already saved in
the file system
**** WARNING ****
*/
"use_pylint": false,
// Set this to false to turn pep8 checking off completely
"pep8": true,
/*
If setted, the given file will be used as configuration for pep8
**** WARNING ****
- If this option is set to something different than false,
pep8_ignore and pep8_max_line_length will be silently ignored
**** WARNING ****
*/
"pep8_rcfile": false,
/*
A list of pep8 error numbers to ignore.
The list of error codes is in this file: https://github.com/jcrocholl/pep8/blob/master/pep8.py.
Search for "Ennn:", where nnn is a 3-digit number.
E309 is ignored by default as it conflicts with pep257 E211
*/
"pep8_ignore":
[
"E309"
],
// Maximum line length for pep8
"pep8_max_line_length": 79,
/*
You can override the level of PEP8 errors altering this mapping.
WARNING: Be careful with this option, the only valid error level values
are:
* E for errors (reduced to Warning by default)
* W for warnings (reduced to Violation by default)
* V for convention violations
If you set a value that is not listed here, anaconda will ignore your
setting
*/
"pep8_error_levels": {"E": "W", "W": "V", "V": "V"},
// Set this to true to turn pep257 checking on
"pep257": false,
/*
A list of pep257 error numbers to ignore.
The list can be found here: https://github.com/GreenSteam/pep257/#error-codes
D209 Multi-line docstring should end with 1 blank line is ignored by
default as it has been deprecated.
D203 1 blank line before class docstring is ignored by default as it has been
deprecated.
*/
"pep257_ignore":
[
"D203",
"D209"
],
/*
You can ignore some of the "undefined name xxx"
errors (comes in handy if you work with post-processors, globals/builtins available only at runtime, etc.).
You can control what names will be ignored with the user setting "pyflakes_ignore".
Example:
"pyflakes_ignore":
[
"some_custom_builtin_o_mine",
"A_GLOBAL_CONSTANT"
],
*/
"pyflakes_ignore":
[
],
/*
Now is possible to ignore specific error types adding them on this
list, (just uncomment them)
*/
"pyflakes_explicit_ignore":
[
// "Redefined",
// "UnusedImport",
// "UndefinedName",
// "UndefinedLocal",
// "UnusedVariable,",
// "UndefinedExport",
// "DuplicateArgument",
// "RedefinedWhileUnused"
],
/*
If setted, the given file will be used as configuration for PyLint
**** WARNING ****
- If this option is set to something different than false,
pylint_ignore will be silently ignored
**** WARNING ****
*/
"pylint_rcfile": false,
/*
You can ignore specific PyLint error codes using this configuration.
We strongly suggest that you better configure your pylintrc file to
determine which type of error is important to you
*/
"pylint_ignore":
[
// "0201"
],
/*
Ordinarily pyflakes will issue a warning when 'from foo import *'
is used, but it is ignored since the warning is not that helpful.
If you want to see this warning, set this option to false.
*/
"pyflakes_ignore_import_*": true,
/*
Set the following option to true if you want that anaconda check
the validity of your imports when the linting process is fired.
WARNING: take into account that anaconda compiles and import the
modules in the JsonServer memory segment in order to check this
*/
"validate_imports": false,
/*
MyPy
Set the following options as true to enable MyPy checker
*/
"mypy": false,
/*
MyPy Silent Imports
If true don't follow imports to .py files
*/
"mypy_silent_imports": false,
/*
MyPy Almost Silent
As Silent Imports but report the imports as errors
*/
"mypy_almost_silent": false,
/*
MyPy py2
Use Python 2 mode
*/
"mypy_py2": false,
/*
MyPy Disallow Untyped Calls
Disallow calling functions without type annotations from
functions with type annotations
*/
"mypy_disallow_untyped_calls": false,
/*
MyPy Disallow Untyped Defs
Disallow defining functions without type annotations or
with incomplete type annotations
*/
"mypy_disallow_untyped_defs": false,
/*
MyPy Check Untyped Defs
Type check the interior of functions without type annotations
*/
"mypy_check_untyped_defs": false,
/*
MyPy Custom Typing
Use a custom typing module
Note: Uncoment to enable
*/
// "mypy_custom_typing": "",
/*
Debug and development options
Use those options only for debugging and development purposes, they can
and will slowdown your Sublime Text
anconda_debug can be set as: false or profiler
If this is set as profiler, Anaconda will run a profiler on autocomplete
and print its results in the Sublime Text console.
NOTE: cProfile can't be imported in all the platforms, at least not in
Linux, this is an already reported bug:
http://www.sublimetext.com/forum/viewtopic.php?f=3&t=13698
https://github.com/SublimeText/Issues/issues/127
*/
"anaconda_debug": false,
/*
Anaconda test runner related configuration.
The anaconda's test runner is originally a contribution by NorthIsUp
https://github.com/NorthIsUp
Run Twisted's trial based test suite under a virtualenv project:
// this is your <ProjectName>.sublime-project file
"settings": {
"python_interpreter": "~/.virtualenvs/project_name",
"test_command": "trial",
"test_virtualenv": "~/.virtualenvs/project_name",
"test_project_path": "project_src"
}
Run Django project tests using nose2 with a virtualenv:
// this is your <ProjectName>.sublime-project file
"settings": {
"python_interpreter": "~/.virtualenvs/django_project_name",
"test_command": "./manage.py test --settings=tests.settings --noinput"
}
*/
/*
Theme to use in the output panel.
Uncomment the line below to override the default tests runner
output, by default the theme is PythonConsoleDark.hidden-tmTheme
NOTE: The file specified here **MUST** exists in `Packages/Anaconda`
*/
//"test_runner_theme": "PythonConsoleDark.hidden-tmTheme",
/*
Uncomment the line below to execute any command before try to execute
your test suite. (if you need to run more than one command, just use a
list of commands ["cmd1", "cmd2", ...])
*/
// "test_before_command": "",
/*
Command to execute tests with. nosetests by default
*/
"test_command": "nosetests",
/*
Uncomment the line below to execute any command after execute
your test suite.
*/
//"test_after_command": "",
/* This is the delimiter between the module and the class */
"test_delimeter": ":",
/* This is the delimiter between the class and the method */
"test_method_delimeter": ".",
/*
Uncomment the line below to enable filepath-based test runner
patterns like those required for py.test.
*/
// "test_filepath_patterns": true,
/* Uncomment the line below to use a virtualenv for your tests */
//"test_virtualenv": ""
/*
Uncomment the line below to add a top level path when you ask
anaconda to run all your project tests.
Note: this is need for example to can run tests with `twisted's trial`
*/
// "test_project_path": "./"
}