Commit Graph

243 Commits

Author SHA1 Message Date
Dmitry Gridin cf655a829c KotlinLikeLangLineIndentProvider: support options for parentheses
Part of #KT-22211
Part of #KT-39353
2020-06-15 16:25:55 +07:00
Dmitry Gridin e72fb755a0 LineIndentProvider: support control flow constructions
Part of #KT-22211
2020-06-15 16:25:54 +07:00
Nikita Bobko a94d2211e4 Cleanup getLineCount 2020-06-04 14:56:23 +03:00
Roman Golyshev 8726d3dc4e KT-37950 Add io.ktor packages to 'Packages to use * import' list
- Ktor code style [here](https://ktor.io/quickstart/code-style.html)
suggests to use star imports for Ktor packages
- Absence of it in the default code style for Kotlin results in some
inconveniences during auto-import and autocompletion (see the issue)
- Automatic * import should mitigate the issue, since the first
autocompleted item from the proper package should import the whole
package, and then no further auto-import would be required for the
next completions
- KT-37950 Fixed
2020-06-01 14:41:51 +03:00
Dmitry Gridin 3643b7b0ca trailingComma: cleanup code 2020-05-27 11:24:12 +00:00
Dmitry Gridin eab12a32ac util: add missing constraints 2020-05-27 11:24:07 +00:00
Dmitry Gridin 262c9e6858 TrailingCommaPostFormatProcessor: should work with call-site in limited mode
* remove useless comma
* format call if comma exists

#KT-39079 Fixed
2020-05-27 11:24:06 +00:00
Dmitry Gridin 86827dfc92 TrailingCommaVisitor: adapt to TrailingCommaContext
#KT-39123 Fixed
2020-05-27 11:24:05 +00:00
Dmitry Gridin 6d7c03b6fd Get rid of TrailingCommaHelper.needComma 2020-05-27 11:24:05 +00:00
Dmitry Gridin 0076f1ddd5 Introduce TrailingCommaContext 2020-05-27 11:24:04 +00:00
Dmitry Gridin bb329c0415 Move TrailingComma* to separate module 2020-05-27 11:24:03 +00:00
Dmitry Gridin 64bcd32661 Introduce TrailingCommaState 2020-05-27 11:24:03 +00:00
Dmitry Gridin fbddc6921f KotlinCodeStyleSettings: add hidden settings for trailing comma on call site
#KT-39079
2020-05-27 11:24:02 +00:00
Roman Golyshev eb838b0fa0 KT-39179 Replace ApplicationBundle with KotlinBundle
- Used bundle messages are moved to JavaBundle in platform >= 201
- ^KT-39179 Fixed
2020-05-26 13:00:12 +00:00
gcx11 50fc9d3692 KT-10974 - code review changes 2020-05-25 10:40:24 +03:00
gcx11 2382629209 KT-10974 - code review changes 2020-05-25 10:40:24 +03:00
gcx11 a2dc2fe5bb KT-10974 - small fixes 2020-05-25 10:40:24 +03:00
gcx11 8849a66c00 KT-10974 - add import layout configuration table 2020-05-25 10:40:24 +03:00
Dmitry Gridin 9beb36ca2b Code style: add option for blank lines before declarations
#KT-39024 Fixed
#KT-37420 Fixed
#KT-37891 Fixed
2020-05-20 02:22:53 +00:00
Sinan Kozak 3f8ffb5ea7 KT-24750 Blank line after class header formatter should use user setting 2020-04-23 18:48:38 +07:00
Dmitry Gridin 585177bcf7 Formatter: fix indent for multiline expression in string template
#KT-35359 Fixed
2020-04-14 13:54:12 +00:00
Dmitry Gridin 7a3f6f5312 Formatter: fix continuation indent in call chain
#KT-37545 Fixed
2020-03-18 12:37:28 +00:00
Dmitry Gridin 2518b8053b i18n: add @NonNls to NodeIndentStrategy 2020-03-16 18:40:50 +07:00
Dmitry Gridin dd6abec660 i18n: rewrite bundles with AbstractKotlinBundle 2020-03-16 18:40:40 +07:00
Dmitry Gridin 7e3c07865c i18n: add bundle for formatter 2020-03-16 18:40:40 +07:00
Dmitry Gridin ca598b6465 Formatter: fix indent after trailing comma in calls
#KT-36917 Fixed
2020-02-26 10:55:58 +07:00
Dmitry Gridin feaa53c4f2 Formatter: shouldn't format property chains
#KT-36387 Fixed
#KT-36466 Fixed
2020-02-25 16:48:33 +07:00
Dmitry Gridin cb66625688 TrailingComma: fix case of when without expression or property
#KT-34744
#KT-36393 Fixed
2020-02-06 23:55:59 +07:00
Dmitry Gridin 195d9020a6 TrailingCommaInspection: shouldn't be associated with formatter settings
#KT-34744
2020-02-04 21:34:53 +07:00
Dmitry Gridin b5d0956a5e Move call-site trailing comma to registry
#KT-34744
2020-02-04 21:34:53 +07:00
Dmitry Gridin 3fb34596ae Code style: disable trailing comma by default
#KT-34744
2020-02-04 21:34:52 +07:00
Dmitry Gridin 5aa413014b FormatterUtil: cleanup code 2020-01-23 17:36:38 +07:00
Dmitry Gridin 80194dd536 Trailing comma: cleanup code after review
#KT-34744
2020-01-23 17:36:38 +07:00
Dmitry Gridin b045513642 KotlinCommonBlock: cleanup code 2020-01-23 17:36:38 +07:00
Dmitry Gridin 8d37b86e82 KotlinStyleGuideCodeStyle: enable trailing comma by default
#KT-34744
2020-01-17 21:02:55 +07:00
Dmitry Gridin b9ed0706fa FormatterUtil: rename parameters in needTrailingComma functions
#KT-34744
2020-01-17 21:02:55 +07:00
Dmitry Gridin 5a922e5cff KotlinCommonBlock: refactoring
#KT-34744
2020-01-17 21:02:54 +07:00
Dmitry Gridin d98794479d kotlinSpacingRules: fix cases with EOL comments and comma
#KT-34744
2020-01-17 21:02:54 +07:00
Dmitry Gridin 8142ad3f4d FormatterUtil: fix getLineCount
#KT-34744
2020-01-17 21:02:54 +07:00
Dmitry Gridin 9511348497 TrailingCommaPostFormatProcessor: should be completed in one round
#KT-34744
2020-01-17 21:02:53 +07:00
Dmitry Gridin 8a45d2eb58 Formatter: add line break between comma and semicolon
#KT-34744
2020-01-17 21:02:53 +07:00
Dmitry Gridin b72da6c4fc Formatter: support trailing comma in destruction declarations
#KT-34744
2020-01-17 21:02:53 +07:00
Dmitry Gridin 96a11707ca Formatter: support trailing comma in lambda value parameters & fix comments in KtParameter
#KT-34744
2020-01-17 21:02:53 +07:00
Dmitry Gridin d013fc2234 Formatter: support trailing comma in when entry
#KT-34744
2020-01-17 21:02:53 +07:00
Dmitry Gridin 4adfaab3ec Formatter: support trailing comma in lambda parameters
#KT-34744
2020-01-17 21:02:53 +07:00
Dmitry Gridin 07bda5a759 Formatter: support trailing comma in collection literal expression
#KT-34744
2020-01-17 21:02:52 +07:00
Dmitry Gridin ccd780c008 Formatter: support trailing comma in type arguments
#KT-34744
2020-01-17 21:02:52 +07:00
Dmitry Gridin b99c7f8d14 Formatter: support trailing comma in type parameters
#KT-34744
2020-01-17 21:02:52 +07:00
Dmitry Gridin 58058eef21 Formatter: support trailing comma in indexing suffix
#KT-34744
2020-01-17 21:02:52 +07:00
Dmitry Gridin c195cd46f2 Formatter: support trailing comma in value arguments
#KT-34744
2020-01-17 21:02:52 +07:00