Description
Your environment
Output of haskell-language-server --probe-tools
or haskell-language-server-wrapper --probe-tools
:
haskell-language-server version: 0.9.0.0 (GHC: 8.8.3) (PATH: /home/andreas/.local/bin/haskell-language-server-wrapper) (GIT hash: d674178246d1303619013bd0435cbfcbb1463530)
Tool versions found on the $PATH
cabal: 3.2.0.0
stack: 2.5.1
ghc: 8.8.3
Which lsp-client do you use:
Vim/CoC
"haskell-language-server": {
"enable": true,
"command": "haskell-language-server-wrapper",
"args": ["--lsp", "--logfile", "/tmp/hls.log"],
"filetypes": ["haskell", "lhaskell"],
"rootPatterns": [
"*.cabal",
"stack.yaml",
"cabal.project",
"package.yaml",
"hie.yaml"
],
"initializationOptions": {
"languageServerHaskell": {
"hlintOn": true,
"maxNumberOfProblems": 10,
"completionSnippetsOn": true,
"formattingProvider": "brittany"
}
}
},
Installing hls with this command (from source):
stack ./install.hs hls-8.8.3 hls-8.8.4 hls-8.10.3
Steps to reproduce
- Format a file
Expected behaviour
- Should be formatted with brittany
Actual behaviour
- Seems to be formatted with ormolu (because of trailing commas and logs)
brittany working with: e2bf01b
brittany working with: 57b78e7
brittany not being used with: d674178
It should be introduced with one of these changes: 57b78e7...d674178
The installation method wasn't changed (related to agpl instructions). The language server configuration wasn't changed.
Include debug information
Execute in the root of your project the command haskell-language-server --debug .
and paste the logs here:
2021-02-15 19:28:53.664802546 [ThreadId 6] INFO hls: Registering ide configuration: IdeConfiguration {workspaceFolders = fromList [NormalizedUri (-1499336395990540516) "file:///home/andreas/dev/repository/git-brunch"], clientSettings = hashed (Just (Object (fromList [("languageServerHaskell",Object (fromList [("hlintOn",Bool True),("completionSnippetsOn",Bool True),("maxNumberOfProblems",Number 10.0),("formattingProvider",String "brittany")]))])))}
2021-02-15 19:28:55.89830073 [ThreadId 229] INFO hls: finish: Ormolu (took 0.00s)
Debug output:
2021-02-15 19:28:53.350653291 [ThreadId 6] INFO haskell-lsp.runWith:
haskell-lsp:Starting up server ...
2021-02-15 19:28:53.664802546 [ThreadId 6] INFO hls: Registering ide configuration: IdeConfiguration {workspaceFolders = fromList [NormalizedUri (-1499336395990540516) "file:///home/andreas/dev/repository/git-brunch"], clientSettings = hashed (Just (Object (fromList [("languageServerHaskell",Object (fromList [("hlintOn",Bool True),("completionSnippetsOn",Bool True),("maxNumberOfProblems",Number 10.0),("formattingProvider",String "brittany")]))])))}
2021-02-15 19:28:53.668000847 [ThreadId 31] INFO hls: Opened text document: file:///home/andreas/dev/repository/git-brunch/app/Main.hs
2021-02-15 19:28:53.668668652 [ThreadId 71] INFO hls: hlint:getIdeas:file:NormalizedFilePath "/home/andreas/dev/repository/git-brunch/app/Main.hs"
2021-02-15 19:28:53.66909833 [ThreadId 80] INFO hls: Consulting the cradle for "app/Main.hs"
2021-02-15 19:28:55.876212634 [ThreadId 80] INFO hls: Using interface files cache dir: ghcide
2021-02-15 19:28:55.876291187 [ThreadId 80] INFO hls: Making new HscEnv[main]
2021-02-15 19:28:55.896621259 [ThreadId 143] INFO hls: hlint:getIdeas:file:NormalizedFilePath "/home/andreas/dev/repository/git-brunch/app/Main.hs"
2021-02-15 19:28:55.89830073 [ThreadId 229] INFO hls: finish: Ormolu (took 0.00s)
2021-02-15 19:28:55.90191449 [ThreadId 248] INFO hls: hlint:getIdeas:setExtensions:[Cpp,OverlappingInstances,UndecidableInstances,IncoherentInstances,UndecidableSuperClasses,MonomorphismRestriction,MonoPatBinds,MonoLocalBinds,RelaxedPolyRec,ExtendedDefaultRules,ForeignFunctionInterface,UnliftedFFITypes,InterruptibleFFI,CApiFFI,GHCForeignImportPrim,JavaScriptFFI,ParallelArrays,TemplateHaskell,TemplateHaskellQuotes,ImplicitParams,ImplicitPrelude,ScopedTypeVariables,AllowAmbiguousTypes,UnliftedNewtypes,BangPatterns,TypeFamilies,TypeFamilyDependencies,TypeInType,OverloadedStrings,OverloadedLists,NumDecimals,DisambiguateRecordFields,RecordWildCards,RecordPuns,ViewPatterns,GADTs,GADTSyntax,NPlusKPatterns,DoAndIfThenElse,BlockArguments,RebindableSyntax,ConstraintKinds,PolyKinds,DataKinds,InstanceSigs,ApplicativeDo,StandaloneDeriving,DeriveDataTypeable,AutoDeriveTypeable,DeriveFunctor,DeriveTraversable,DeriveFoldable,DeriveGeneric,DefaultSignatures,DeriveAnyClass,DeriveLift,DerivingStrategies,DerivingVia,TypeSynonymInstances,FlexibleContexts,FlexibleInstances,ConstrainedClassMethods,MultiParamTypeClasses,NullaryTypeClasses,FunctionalDependencies,UnicodeSyntax,ExistentialQuantification,MagicHash,EmptyDataDecls,KindSignatures,RoleAnnotations,ParallelListComp,MonadComprehensions,GeneralizedNewtypeDeriving,PostfixOperators,TupleSections,PatternGuards,LiberalTypeSynonyms,RankNTypes,ImpredicativeTypes,TypeOperators,ExplicitNamespaces,PackageImports,ExplicitForAll,AlternativeLayoutRuleTransitional,DatatypeContexts,NondecreasingIndentation,RelaxedLayout,TraditionalRecordSyntax,LambdaCase,MultiWayIf,BinaryLiterals,HexFloatLiterals,DuplicateRecordFields,OverloadedLabels,EmptyCase,PatternSynonyms,PartialTypeSignatures,NamedWildCards,TypeApplications,Strict,StrictData,MonadFailDesugaring,EmptyDataDeriving,NumericUnderscores,QuantifiedConstraints,ImportQualifiedPost,CUSKs,StandaloneKindSignatures,StarIsType]
2021-02-15 19:28:55.914352487 [ThreadId 31] INFO hls: Modified text document: file:///home/andreas/dev/repository/git-brunch/app/Main.hs
2021-02-15 19:28:55.915615718 [ThreadId 421] INFO hls: hlint:getIdeas:file:NormalizedFilePath "/home/andreas/dev/repository/git-brunch/app/Main.hs"
2021-02-15 19:28:55.918582146 [ThreadId 500] INFO hls: hlint:getIdeas:setExtensions:[Cpp,OverlappingInstances,UndecidableInstances,IncoherentInstances,UndecidableSuperClasses,MonomorphismRestriction,MonoPatBinds,MonoLocalBinds,RelaxedPolyRec,ExtendedDefaultRules,ForeignFunctionInterface,UnliftedFFITypes,InterruptibleFFI,CApiFFI,GHCForeignImportPrim,JavaScriptFFI,ParallelArrays,TemplateHaskell,TemplateHaskellQuotes,ImplicitParams,ImplicitPrelude,ScopedTypeVariables,AllowAmbiguousTypes,UnliftedNewtypes,BangPatterns,TypeFamilies,TypeFamilyDependencies,TypeInType,OverloadedStrings,OverloadedLists,NumDecimals,DisambiguateRecordFields,RecordWildCards,RecordPuns,ViewPatterns,GADTs,GADTSyntax,NPlusKPatterns,DoAndIfThenElse,BlockArguments,RebindableSyntax,ConstraintKinds,PolyKinds,DataKinds,InstanceSigs,ApplicativeDo,StandaloneDeriving,DeriveDataTypeable,AutoDeriveTypeable,DeriveFunctor,DeriveTraversable,DeriveFoldable,DeriveGeneric,DefaultSignatures,DeriveAnyClass,DeriveLift,DerivingStrategies,DerivingVia,TypeSynonymInstances,FlexibleContexts,FlexibleInstances,ConstrainedClassMethods,MultiParamTypeClasses,NullaryTypeClasses,FunctionalDependencies,UnicodeSyntax,ExistentialQuantification,MagicHash,EmptyDataDecls,KindSignatures,RoleAnnotations,ParallelListComp,MonadComprehensions,GeneralizedNewtypeDeriving,PostfixOperators,TupleSections,PatternGuards,LiberalTypeSynonyms,RankNTypes,ImpredicativeTypes,TypeOperators,ExplicitNamespaces,PackageImports,ExplicitForAll,AlternativeLayoutRuleTransitional,DatatypeContexts,NondecreasingIndentation,RelaxedLayout,TraditionalRecordSyntax,LambdaCase,MultiWayIf,BinaryLiterals,HexFloatLiterals,DuplicateRecordFields,OverloadedLabels,EmptyCase,PatternSynonyms,PartialTypeSignatures,NamedWildCards,TypeApplications,Strict,StrictData,MonadFailDesugaring,EmptyDataDeriving,NumericUnderscores,QuantifiedConstraints,ImportQualifiedPost,CUSKs,StandaloneKindSignatures,StarIsType]
2021-02-15 19:28:55.937798729 [ThreadId 31] INFO hls: Saved text document: file:///home/andreas/dev/repository/git-brunch/app/Main.hs
2021-02-15 19:28:55.950131335 [ThreadId 660] INFO hls: hlint:getIdeas:file:NormalizedFilePath "/home/andreas/dev/repository/git-brunch/app/Main.hs"
2021-02-15 19:28:55.956292248 [ThreadId 752] INFO hls: hlint:getIdeas:setExtensions:[Cpp,OverlappingInstances,UndecidableInstances,IncoherentInstances,UndecidableSuperClasses,MonomorphismRestriction,MonoPatBinds,MonoLocalBinds,RelaxedPolyRec,ExtendedDefaultRules,ForeignFunctionInterface,UnliftedFFITypes,InterruptibleFFI,CApiFFI,GHCForeignImportPrim,JavaScriptFFI,ParallelArrays,TemplateHaskell,TemplateHaskellQuotes,ImplicitParams,ImplicitPrelude,ScopedTypeVariables,AllowAmbiguousTypes,UnliftedNewtypes,BangPatterns,TypeFamilies,TypeFamilyDependencies,TypeInType,OverloadedStrings,OverloadedLists,NumDecimals,DisambiguateRecordFields,RecordWildCards,RecordPuns,ViewPatterns,GADTs,GADTSyntax,NPlusKPatterns,DoAndIfThenElse,BlockArguments,RebindableSyntax,ConstraintKinds,PolyKinds,DataKinds,InstanceSigs,ApplicativeDo,StandaloneDeriving,DeriveDataTypeable,AutoDeriveTypeable,DeriveFunctor,DeriveTraversable,DeriveFoldable,DeriveGeneric,DefaultSignatures,DeriveAnyClass,DeriveLift,DerivingStrategies,DerivingVia,TypeSynonymInstances,FlexibleContexts,FlexibleInstances,ConstrainedClassMethods,MultiParamTypeClasses,NullaryTypeClasses,FunctionalDependencies,UnicodeSyntax,ExistentialQuantification,MagicHash,EmptyDataDecls,KindSignatures,RoleAnnotations,ParallelListComp,MonadComprehensions,GeneralizedNewtypeDeriving,PostfixOperators,TupleSections,PatternGuards,LiberalTypeSynonyms,RankNTypes,ImpredicativeTypes,TypeOperators,ExplicitNamespaces,PackageImports,ExplicitForAll,AlternativeLayoutRuleTransitional,DatatypeContexts,NondecreasingIndentation,RelaxedLayout,TraditionalRecordSyntax,LambdaCase,MultiWayIf,BinaryLiterals,HexFloatLiterals,DuplicateRecordFields,OverloadedLabels,EmptyCase,PatternSynonyms,PartialTypeSignatures,NamedWildCards,TypeApplications,Strict,StrictData,MonadFailDesugaring,EmptyDataDeriving,NumericUnderscores,QuantifiedConstraints,ImportQualifiedPost,CUSKs,StandaloneKindSignatures,StarIsType]
2021-02-15 19:28:55.974935615 [ThreadId 809] INFO hls: Typechecking reverse dependencies for NormalizedFilePath "/home/andreas/dev/repository/git-brunch/app/Main.hs": Just []
2021-02-15 19:28:56.022402146 [ThreadId 844] INFO hls: SUCCEEDED LOADING HIE FILE FOR:"/home/andreas/.cache/ghcide/main-73804d8cf6cf94b7cc4c97cf069a2e1f18fec96e/Paths_git_brunch.hie"
2021-02-15 19:28:56.022538296 [ThreadId 844] INFO hls: Re-indexing hie file forNormalizedFilePath "/home/andreas/dev/repository/git-brunch/.stack-work/dist/x86_64-linux-tinfo6/Cabal-3.0.1.0/build/git-brunch/autogen/Paths_git_brunch.hs"
2021-02-15 19:28:56.101279921 [ThreadId 851] INFO hls: SUCCEEDED LOADING HIE FILE FOR:"/home/andreas/.cache/ghcide/main-73804d8cf6cf94b7cc4c97cf069a2e1f18fec96e/Theme.hie"
2021-02-15 19:28:56.101377059 [ThreadId 851] INFO hls: Re-indexing hie file forNormalizedFilePath "/home/andreas/dev/repository/git-brunch/app/Theme.hs"
2021-02-15 19:28:56.103126939 [ThreadId 858] INFO hls: SUCCEEDED LOADING HIE FILE FOR:"/home/andreas/.cache/ghcide/main-73804d8cf6cf94b7cc4c97cf069a2e1f18fec96e/Git.hie"
2021-02-15 19:28:56.103206561 [ThreadId 858] INFO hls: Re-indexing hie file forNormalizedFilePath "/home/andreas/dev/repository/git-brunch/app/Git.hs"
2021-02-15 19:28:56.27953 [ThreadId 873] INFO hls: SUCCEEDED LOADING HIE FILE FOR:"/home/andreas/.cache/ghcide/main-73804d8cf6cf94b7cc4c97cf069a2e1f18fec96e/GitBrunch.hie"
2021-02-15 19:28:56.279624712 [ThreadId 873] INFO hls: Re-indexing hie file forNormalizedFilePath "/home/andreas/dev/repository/git-brunch/app/GitBrunch.hs"