Commit Graph

243 Commits

Author SHA1 Message Date
Dmitry Jemerov f32dc9e84e Put lambda parameters on the same line as opening curly brace 2017-06-14 14:18:58 +02:00
Andrius Semionovas 839141e4f6 Stop formatting line breaks between keywords and parentheses 2017-06-14 11:28:57 +02:00
Andrius Semionovas c6acc4c5be KT-16558 Add space before parentheses config 2017-06-14 11:28:57 +02:00
Ilya Zorin 862631b2ec Handle spaces around dot in type references and before type argument list 2017-06-07 19:43:14 +02:00
Andrius Semionovas 4acb95acb5 Fix KT-16725; Remove spaces between array indices 2017-06-07 19:39:55 +02:00
Nikolay Krasko d094854878 Better indentation for expressions without parsed errors (KT-12123)
#KT-12123 Fixed
2017-05-03 18:03:40 +03:00
Nikolay Krasko d65b7a5b4b Better indent in else-if editing (KT-14601)
#KT-14601 Fixed

(cherry picked from commit 25d6d61)
2017-04-07 14:21:45 +03:00
Mikhail Glukhikh b121bf8802 Cleanup: fix some compiler warnings (mostly deprecations, javaClass) 2017-03-15 17:35:31 +03:00
Nikolay Krasko bc90d52873 Minor: remove warnings in KotlinSpacingBuilder.kt 2017-02-22 20:13:24 +03:00
Nikolay Krasko 6a4590839c Don't merge two lines in formatter after line comment (KT-16032)
#KT-16032 Fixed
2017-02-22 20:12:19 +03:00
Nikolay Krasko 20f92c6200 Use own kotlin settings for spacing instead of default set
Mostly affected by settings:
- KEEP_LINE_BREAKS,
- KEEP_BLANK_LINES_IN_DECLARATIONS
- KEEP_BLANK_LINES_IN_CODE

Allow settings KEEP_LINE_BREAKS in UI.
2017-02-22 20:04:34 +03:00
Nikolay Krasko d58707972d Keep empty bodies for declarations with comments (KT-16078)
#KT-16078 Fixed
2017-02-17 15:57:11 +03:00
Ilya Zorin c5677f0428 Format spaces around :: 2017-01-09 12:19:29 +01:00
Ilya Zorin ffe80dd549 Format spaces around by keyword (#1016) 2017-01-09 11:19:44 +01:00
Nikolay Krasko 2bb48fc802 Allow empty single-line bodies in property accessors 2016-12-14 13:40:44 +03:00
Nikolay Krasko 2841931ffa Do not force new line in body for empty functions and function expressions (KT-10828)
#KT-10828 Fixed
2016-12-14 13:35:31 +03:00
Nikolay Krasko 43948a0170 Wrap options for constructor parameters
#KT-12176 In Progress
2016-12-08 15:15:12 +03:00
Nikolay Krasko 300601da54 Indent () in if, when, while and do-while with continuation indent (KT-5897)
#KT-5897 Fixed
2016-12-08 15:15:11 +03:00
Nikolay Krasko 211cae2ad2 Refactoring: use when instead of if 2016-12-08 15:15:09 +03:00
Dmitry Neverov 3cc3ad2b9e Fix spaces in labeled expression (KT-14131)
https://github.com/JetBrains/kotlin/pull/978

(cherry picked from commit fdd5ba7)
2016-10-20 19:22:00 +03:00
Dmitry Neverov c3c5805a5f Fix indent in constructor delegate call (KT-7718)
(cherry picked from commit 5699b14)

 #KT-7718 Fixed
2016-10-18 14:01:51 +03:00
Nikolay Krasko 6a72cebe88 Add indent before colon of super types list on new line (KT-13981, KT-5117)
#KT-13981 Fixed
 #KT-5117 Fixed

(cherry picked from commit dfea3af)
2016-10-17 15:16:48 +03:00
Kirill Rakhman 926deebff5 Format spaces around !is and !in (KT-13314)
#KT-13314 Fixed
2016-08-15 16:21:01 +03:00
Kirill Rakhman 0320bd8184 Formatter: Remove spaces before question mark in nullable types (KT-12830)
#KT-12830 Fixed
2016-06-29 16:15:59 +03:00
Pavel V. Talanov 8921ced9dd Indenter: fix indentation on top level in scripts 2016-06-25 22:24:52 +03:00
Nikolay Krasko 49aaeb5a38 Refactoring: wrap Spacing.createSpacing to Kotlin function with default parameters 2016-06-21 21:54:50 +03:00
Nikolay Krasko f8196d8331 Add space after a semicolon only if there's another child at the same line 2016-06-21 21:54:50 +03:00
Kirill Rakhman b560aab06d Format spaces before enum arguments
Fixes #KT-12714
2016-06-21 21:54:50 +03:00
Kirill Rakhman a520be5509 Format spaces around semicolon
Fixes #KT-12689
2016-06-21 21:54:50 +03:00
Kirill Rakhman db387bd573 Format spaces after annotation in annotated expression
Fixes #KT-12781
2016-06-21 21:54:50 +03:00
Kirill Rakhman ae83330679 Format spaces inside curly braces in string template
Fixes #KT-12791
2016-06-21 21:54:50 +03:00
Kirill Rakhman 655fc45a87 Format spaces around in keyword
Fixes: KT-10680
2016-06-21 21:54:50 +03:00
Kirill Rakhman 5c68681f96 Formatter: handle spaces before value arguments list (KT-12634)
#KT-12634 Fixed
2016-06-07 19:11:28 +03:00
Kirill Rakhman c24960f8d9 Formatter: handle spaces between class name and type parameters (#875)
Fixes #KT-12446
2016-06-01 21:20:56 +03:00
Kirill Rakhman 93ebb3da65 Formatter: handle spaces around 'is' keyword (#874)
Fixes #KT-12548
2016-05-30 20:35:33 +03:00
Nikolay Krasko b107bc401c Formatter: Don't enforce empty line between secondary constructors without body (KT-12175)
#KT-12175 Fixed
2016-05-12 17:26:54 +03:00
Valentin Kipyatkov b551886889 Code cleanup: removed redundant semicolons 2016-04-29 11:26:25 +03:00
Kirill 6e08f06bfd Format spaces in infix call (KT-12018)
#KT-12018 Fixed
2016-04-26 15:21:33 +03:00
Kirill 01b754b318 Format spaces in cast expression (KT-12035)
#KT-12035 Fixed
2016-04-26 15:21:33 +03:00
Nikolay Krasko f2a17bc4c2 Formatter doesn't handle space before angle bracket in method definition (KT-11961)
#KT-11961 Fixed
2016-04-19 21:28:00 +03:00
Mikhail Zarechenskiy 37e0b71584 Split KotlinBlock on two clases to share independent logic about
formatting  between Idea and Eclipse

 Also make 'formatter' module depend on fewer dependencies
2016-04-15 18:15:13 +03:00
Mikhail Zarechenskiy 4c006300ef Move files related to formatting to module 'formatter' as is 2016-04-15 18:15:13 +03:00
Mikhail Zarechenskiy a7c397fe84 Create 'formatter' module
Purpose of this module is to extract common code  about formatting and reuse it in Eclipse
2016-04-15 18:15:13 +03:00