Skip to content

Allow user specified code ranges through markers in the source #3073

Open
@bonds

Description

@bonds

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: haskell/vscode-haskell#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!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions