haskell / haskell/haskell-language-server

Allow user specified code ranges through markers in the source

Open
#3,073 8 comments 2 reactions 0 assignees View on GitHub
can-workaround component: hls-code-range-plugin type: enhancement
Dominant language
Haskell
Stars
3k
Forks
455
Avg merge
2d 19h
Merged PRs (30d)
11

Description

## Is your enhancement request related to a problem? Please describe.

I want to be able to collapse the long boilerplate of language pragma at the start of my cabal scripts.

## Describe the solution you'd like

This block of code is foldable:

````
-- region "name of the region"
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE BinaryLiterals #-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DefaultSignatures #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveFoldable #-}
{-# LANGUAGE DeriveFunctor #-}
-- endregion
````

See also: https://code.visualstudio.com/docs/editor/codebasics#_folding

## Describe alternatives you've considered

Continue to live without this feature. :)

## Additional context

I filed a related feature request with the vscode extension: https://github.com/haskell/vscode-haskell/issues/663. If it can be supported at the HLS level, that would be great for all editors, not just vscode, though I imagine there's some work that will need to be done in the extension to take advantage of the feature once it's added to HLS.

IMO this is a pretty low priority feature, but I thought I'd ask just so y'all know at least one person would use it. And in case I'm not the only person interested, it gives others a place find whatever the decision is. Please feel free to close the ticket if y'all aren't interested in implementing this...at least those who find their way to this ticket will be able to find that decision!

And thank you for your consideration and thank you for your contributions to this project, its great!

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.