-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add more granular control over call parentheses (#330)
* feat: Add more granular control over call parentheses Adds new option call_parentheses with possible values Always, NoString, NoTable, None (Default: Always) When call_parentheses is set to Always stylua applies call parentheses all the time. ```lua xyz({ a = 1, b = 2 }) abc('Hello') When set to NoString it omits parentheses on function call with single table argument. ```lua xyz({a = 1, b = 2 }) abc 'Hello' ``` ``` Similarly when set to NoTable it omits parentheses on function call with single table argument. ```lua xyz { a = 1, b = 2 } abc('Hello') ``` And when it's None stylua omits parentheses on function call with single table or string argument. This is same as `no_call_parentheses = true` ```lua xyz { a = 1, b = 2 } abc 'Hello' ``` * rename NoString->NoSingleString NoTable->NoSingleTable
- Loading branch information
1 parent
3b2c724
commit 6272fdf
Showing
8 changed files
with
390 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.