diff --git a/.stylish-haskell.yaml b/.stylish-haskell.yaml index d41f5ccb5a..5896976a7b 100644 --- a/.stylish-haskell.yaml +++ b/.stylish-haskell.yaml @@ -56,8 +56,22 @@ columns: 80 newline: native language_extensions: + - BangPatterns - DataKinds + - DeriveFunctor + - DeriveGeneric + - FlexibleContexts + - GeneralizedNewtypeDeriving + - KindSignatures + - LambdaCase + - NamedFieldPuns - OverloadedStrings + - RecordWildCards + - ScopedTypeVariables + - StandaloneDeriving + - TupleSections + - TypeApplications - TypeOperators + - ViewPatterns cabal: true diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6bc27da912..791cf70274 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -17,8 +17,8 @@ If you don't want to use [nix](https://nixos.org/guides/install-nix.html), you c { "hooks": [ { - "entry": "stylish-haskell -i ", - "exclude": "(/test/testdata/*)", + "entry": "stylish-haskell --inplace", + "exclude": "(test/testdata/.*|hie-compat/.*)", "files": "\\.l?hs$", "id": "stylish-haskell", "language": "system", diff --git a/ghcide/.stylish-haskell.yaml b/ghcide/.stylish-haskell.yaml deleted file mode 100644 index a1c72461b9..0000000000 --- a/ghcide/.stylish-haskell.yaml +++ /dev/null @@ -1,74 +0,0 @@ -# See https://github.com/jaspervdj/stylish-haskell/blob/main/data/stylish-haskell.yaml -# for reference. - -steps: - # - unicode_syntax: - # add_language_pragma: true - - # - module_header: - # indent: 4 - # sort: true - # separate_lists: true - - # - records: - # equals: "indent 2" - # first_field: "indent 2" - # field_comment: 2 - # deriving: 2 - # via: "indent 2" - # sort_deriving: true - # break_enums: false - # break_single_constructors: true - # curried_context: false - - - simple_align: - cases: always - top_level_patterns: always - records: always - multi_way_if: always - - - imports: - align: global - list_align: after_alias - pad_module_names: true - long_list_align: inline - empty_list_align: inherit - list_padding: 4 - separate_lists: true - space_surround: false - ghc_lib_parser: false - - - language_pragmas: - style: vertical - align: true - remove_redundant: true - language_prefix: LANGUAGE - - # - tabs: - # spaces: 8 - - - trailing_whitespace: {} - - # - squash: {} - -columns: 80 - -newline: native - -language_extensions: - - BangPatterns - - DeriveFunctor - - DeriveGeneric - - FlexibleContexts - - GeneralizedNewtypeDeriving - - LambdaCase - - NamedFieldPuns - - OverloadedStrings - - RecordWildCards - - ScopedTypeVariables - - StandaloneDeriving - - TupleSections - - TypeApplications - - ViewPatterns - -cabal: true diff --git a/hls-plugin-api/.stylish-haskell.yaml b/hls-plugin-api/.stylish-haskell.yaml deleted file mode 100644 index 08eda7297c..0000000000 --- a/hls-plugin-api/.stylish-haskell.yaml +++ /dev/null @@ -1,63 +0,0 @@ -# See https://github.com/jaspervdj/stylish-haskell/blob/main/data/stylish-haskell.yaml -# for reference. - -steps: - # - unicode_syntax: - # add_language_pragma: true - - # - module_header: - # indent: 4 - # sort: true - # separate_lists: true - - # - records: - # equals: "indent 2" - # first_field: "indent 2" - # field_comment: 2 - # deriving: 2 - # via: "indent 2" - # sort_deriving: true - # break_enums: false - # break_single_constructors: true - # curried_context: false - - - simple_align: - cases: always - top_level_patterns: always - records: always - multi_way_if: always - - - imports: - align: global - list_align: after_alias - pad_module_names: true - long_list_align: inline - empty_list_align: inherit - list_padding: 4 - separate_lists: true - space_surround: false - ghc_lib_parser: false - - - language_pragmas: - style: vertical - align: true - remove_redundant: true - language_prefix: LANGUAGE - - # - tabs: - # spaces: 8 - - - trailing_whitespace: {} - - # - squash: {} - -columns: 80 - -newline: native - -language_extensions: - - DataKinds - - KindSignatures - - TypeOperators - -cabal: true diff --git a/nix/default.nix b/nix/default.nix index a2dc654085..a846b4d54b 100644 --- a/nix/default.nix +++ b/nix/default.nix @@ -54,7 +54,7 @@ in (import sources.nixpkgs # default_stages = ["manual" "push"]; hooks = { stylish-haskell.enable = true; - stylish-haskell.excludes = [ "/test/testdata/*" "/hie-compat/*" ]; + stylish-haskell.excludes = [ "test/testdata/.*" "hie-compat/.*" ]; }; }; }