haskell-lsp-0.1.0.0: src/Language/Haskell/LSP/TH/Constants.hs
module Language.Haskell.LSP.TH.Constants where
import Data.Aeson.TH
-- ---------------------------------------------------------------------
-- | Standard options for use when generating JSON instances
lspOptions :: Options
lspOptions = defaultOptions { omitNothingFields = True, fieldLabelModifier = drop 1 }
-- NOTE: This needs to be in a separate file because of the TH stage restriction
customModifier :: String -> String
customModifier "_xdata" = "data"
customModifier "_xtype" = "type"
customModifier xs = drop 1 xs