haskell-language-server icon indicating copy to clipboard operation
haskell-language-server copied to clipboard

Improve haddock comments

Open kokobd opened this issue 2 years ago • 0 comments

Changes

  • Try my best to preserve the original indentation of record fields
  • Add haddock comments to data constructors
  • Add me as a code owner to this plugin. I'll keep this plugin updated.

Limitations

  • This PR doesn't include support for ghc-9.2. It will be added in a later one.

Motivation

Previously, when you execute the "Generate fields comments" action on the following record:

data Record = Record
  { a :: Int
  , b :: String
  }

You will get:

data Record = Record
  {
                -- | 
                a :: Int
  ,
                -- | 
                b :: String
  }

I think this is not satisfactory, and we should preserve the original indentation as much as we can.

kokobd avatar Sep 21 '22 05:09 kokobd