From 1f689421e7815f5c9e5c1046ae68d97e20612c76 Mon Sep 17 00:00:00 2001 From: zowoq <59103226+zowoq@users.noreply.github.com> Date: Sat, 16 May 2020 12:23:00 +1000 Subject: [PATCH 1/2] .editorconfig: set docbook indent size --- .editorconfig | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/.editorconfig b/.editorconfig index f272739f240a..717a4d903bbc 100644 --- a/.editorconfig +++ b/.editorconfig @@ -13,14 +13,20 @@ charset = utf-8 # see https://nixos.org/nixpkgs/manual/#chap-conventions -# Match nix/ruby/docbook files, set indent to spaces with width of two -[*.{nix,rb,xml}] +# Match nix/perl/python/ruby/shell/docbook files, set indent to spaces +[*.{nix,pl,py,rb,sh,xml}] indent_style = space + +# Match docbook files, set indent width of one +[*.xml] +indent_size = 1 + +# Match nix/ruby files, set indent width of two +[*.{nix,rb}] indent_size = 2 -# Match shell/python/perl scripts, set indent to spaces with width of four -[*.{sh,py,pl}] -indent_style = space +# Match perl/python/shell scripts, set indent width of four +[*.{pl,py,sh}] indent_size = 4 # Match diffs, avoid to trim trailing whitespace From 190577d4e79974547538b81e8b699b1b16aa4553 Mon Sep 17 00:00:00 2001 From: zowoq <59103226+zowoq@users.noreply.github.com> Date: Mon, 18 May 2020 19:11:42 +1000 Subject: [PATCH 2/2] .editorconfig: ignore diffs/patches --- .editorconfig | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.editorconfig b/.editorconfig index 717a4d903bbc..66cd7b8f4746 100644 --- a/.editorconfig +++ b/.editorconfig @@ -11,6 +11,12 @@ insert_final_newline = true trim_trailing_whitespace = true charset = utf-8 +# Ignore diffs/patches +[*.{diff,patch}] +end_of_line = ignore +insert_final_newline = ignore +trim_trailing_whitespace = ignore + # see https://nixos.org/nixpkgs/manual/#chap-conventions # Match nix/perl/python/ruby/shell/docbook files, set indent to spaces @@ -28,7 +34,3 @@ indent_size = 2 # Match perl/python/shell scripts, set indent width of four [*.{pl,py,sh}] indent_size = 4 - -# Match diffs, avoid to trim trailing whitespace -[*.{diff,patch}] -trim_trailing_whitespace = false