-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.editorconfig
More file actions
88 lines (79 loc) · 3.15 KB
/
.editorconfig
File metadata and controls
88 lines (79 loc) · 3.15 KB
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
# EditorConfig is awesome: https://EditorConfig.org
# See options at: https://github.com/editorconfig/editorconfig/wiki/EditorConfig-Properties#current-universal-properties
# Intellij options starts with `ij`
# top-most EditorConfig file
# The editor looks up the directory tree until it finds `root = true`
root = true
# Match all files
[*]
charset = utf-8
indent_style = space
indent_size = 2
trim_trailing_whitespace = true
end_of_line = lf
# false insert_final_newline otherwise you get it also in a markdown code fence
# and this is the check that fails most often
insert_final_newline = unset
[*.py]
indent_size = 4 # mandatory
# https://www.jetbrains.com/help/idea/settings-code-style-xml.html
[*.xml]
# Why align_attributes false?
# On a pom.xml, if on, the indentation is 9 on the second line: ie 8 (project length) + 1 space
# It clashes with an indent_size of 2
# Example:
# <project xmlns
# xmlns:xsi>
ij_xml_align_attributes = false
# https://github.com/mvdan/sh
# https://github.com/mvdan/sh/blob/master/cmd/shfmt/shfmt.1.scd#examples
# noinspection EditorConfigKeyCorrectness
[{*.bash,*.sh,*.zsh,.envrc,.envrc.jinja2}]
# formats code for POSIX-compliant shells rather than bash-specific features.
shell_variant = posix # like -ln=posix
simplify = true
# Places binary operators (&&, ||, |) at the beginning of the next line in multi-line commands, rather than at the end of the previous line.
binary_next_line = unset # like -bn
ij_shell_binary_ops_start_line = unset
# indents case statement branches an additional level inside the case block, making the structure more visually clear.
switch_case_indent = true # like -ci
ij_shell_switch_cases_indented = true
# adds spaces around redirection operators (e.g., > file instead of >file), improving readability.
space_redirects = true # like -sr
ij_shell_redirect_followed_by_space = true
# Preserves alignment padding in consecutive lines, useful for keeping column-like structures aligned (such as variable assignments or array elements).
keep_padding = true # like -kp
# places the opening brace of function definitions on the next line rather than on the same line as the function name.
function_next_line = true # like -fn
# Prevents shfmt from splitting long lines. Lines will remain as-is rather than being automatically wrapped, giving you manual control over line breaks.
never_split = true # like -ns
# Don't delete any space
minify = false
ij_shell_minify_program = false
[*.md]
# indent is unset because
# due to list alignment, it is 2 with star list and 3 with number list
# ie
# * First
# Second
# 1) First
# Second
indent_size = unset
[*.ts]
# indent is unset because
# a comment has only one space margin in intellij
# ie
# /**
# * Star is at once space
indent_size = unset
[*.java]
# Due to catch (IllegalBlockSizeException
# InvalidKeyException e) {
indent_size = unset
# Block comment (single star on all lines!) should align to the code and not to the first column
# By default, only javadoc comment (double star) do that
ij_java_block_comment_at_first_column = false
# if true, the comments characters (//) are set at the beginning
ij_java_line_comment_at_first_column = false
[*.{cmd,bat}]
end_of_line = crlf