haskell / haskell/haskell-language-server
Allow some customization of case-split layout strategy
- Dominant language
- Haskell
- Stars
- 3k
- Forks
- 455
- Avg merge
- 3d 6h
- Merged PRs (30d)
- 16
Description
So far I thought of:
- [ ] allow configuring the indentation w.r.t. the context (currently hardcoded to 2);
- [ ] allow configuring the maximum number (possibly ∞) of underscores for the ctors' arguments before resorting to `{}` (currently hardcoded to 3).
Those two are already grouped in `data`:
https://github.com/haskell/haskell-language-server/blob/5ce2a847d255ce6f420da49771711a89eee78541/plugins/hls-case-split-plugin/src/Ide/Plugin/CaseSplit.hs#L682-L696
Originally considered during [my GSoC 2026 project](https://gist.github.com/Aster89/69a57c364ec2d0cc89f474cc3d194371#future-work--stretch-goals).
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in plugins/hls-case-split-plugin/src/Ide/Plugin/CaseSplit.hs at the referenced data definition around lines 682-696, then trace how the case-split layout strategy consumes it. Make the indentation and constructor-argument underscore limit configurable, including the unlimited case, and verify that both settings affect generated layouts.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- haskell
- Domain
- developer-experience, tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100