Closed
Description
Hey there, I was looking up what options are possible for the checkParents
configuration, and there seems to be a mismatch in several places. Maybe we can find out what is correct and adapt all places mentioned.
Default config
Output of haskell-language-server-wrapper generate-default-config
is "checkParents": "CheckOnSave"
Documentation
- Missing
CheckOnSave
- Has
CheckOnSaveAndClose
Check parents (haskell.checkParents, default CheckOnSaveAndClose): when to typecheck reverse dependencies of a file; one of NeverCheck, CheckOnClose, CheckOnSaveAndClose, or AlwaysCheck.
GHCIDE README
- Says "CheckOnSave means dependent/parent modules will only be checked when you save"
- Options don't include
CheckOnSave
butCheckOnClose
andCheckOnSaveAndClose
- There is a dangling
| ,
Types
The CheckParents
type only seems to have CheckOnSave
and is also used as Aeson instance.
haskell-language-server/hls-plugin-api/src/Ide/Plugin/Config.hs
Lines 36 to 43 in 310e6a4
Your environment
haskell-language-server-wrapper generate-default-config
Found "/home/andreas/dev/work/project/hie.yaml" for "/home/andreas/dev/work/project/a"
Run entered for haskell-language-server-wrapper(haskell-language-server-wrapper) Version 1.8.0.0 x86_64 ghc-9.2.4
Current directory: /home/andreas/dev/work/project
Operating system: linux
Arguments: ["generate-default-config"]
Cradle directory: /home/andreas/dev/work/project
Cradle type: Stack
Tool versions found on the $PATH
cabal: 3.8.1.0
stack: 2.7.5
ghc: 9.2.4
Consulting the cradle to get project GHC version...
Project GHC version: 8.10.7
haskell-language-server exe candidates: ["haskell-language-server-8.10.7","haskell-language-server"]
Launching haskell-language-server exe at:/home/andreas/.ghcup/bin/haskell-language-server-8.10.7
2022-09-14T10:18:56.286445Z | Info | No log file specified; using stderr.
2022-09-14T10:18:56.290215Z | Info | haskell-language-server version: 1.8.0.0 (GHC: 8.10.7) (PATH: /home/andreas/.ghcup/bin/haskell-language-server-8.10.7~1.8.0.0)
2022-09-14T10:18:56.291014Z | Info | Directory: /home/andreas/dev/work/project
2022-09-14T10:18:56.291967Z | Info | Logging heap statistics every 60.00s
{
"haskell": {
"checkParents": "CheckOnSave",
"checkProject": true,
"maxCompletions": 40,
"formattingProvider": "ormolu",
"plugin": {
"rename": {
"globalOn": true,
"config": {
"crossModule": false
}
},
"ghcide-completions": {
"globalOn": true,
"config": {
"autoExtendOn": true,
"snippetsOn": true
}
},
"class": {
"codeActionsOn": true,
"codeLensOn": true
},
"refineImports": {
"codeActionsOn": true,
"codeLensOn": true
},
"splice": {
"globalOn": true
},
"pragmas": {
"completionOn": true,
"codeActionsOn": true
},
"changeTypeSignature": {
"globalOn": true
},
"qualifyImportedNames": {
"globalOn": true
},
"alternateNumberFormat": {
"globalOn": true
},
"hlint": {
"codeActionsOn": true,
"diagnosticsOn": true,
"config": {
"flags": []
}
},
"ghcide-code-actions-fill-holes": {
"globalOn": true
},
"explicitFixity": {
"globalOn": true
},
"haddockComments": {
"globalOn": true
},
"importLens": {
"codeActionsOn": true,
"codeLensOn": true
},
"retrie": {
"globalOn": true
},
"ghcide-type-lenses": {
"globalOn": true,
"config": {
"mode": "always"
}
},
"ghcide-code-actions-imports-exports": {
"globalOn": true
},
"ghcide-hover-and-symbols": {
"symbolsOn": true,
"hoverOn": true
},
"eval": {
"globalOn": true,
"config": {
"diff": true,
"exception": false
}
},
"gadt": {
"globalOn": true
},
"tactics": {
"codeActionsOn": true,
"codeLensOn": true,
"hoverOn": true,
"config": {
"auto_gas": 4,
"max_use_ctor_actions": 5,
"proofstate_styling": true,
"timeout_duration": 2,
"hole_severity": null
}
},
"callHierarchy": {
"globalOn": true
},
"ghcide-code-actions-type-signatures": {
"globalOn": true
},
"ghcide-code-actions-bindings": {
"globalOn": true
},
"moduleName": {
"globalOn": true
}
}
}
}