From 4755178c7e97f22e5c52bd98fd593713a35951e0 Mon Sep 17 00:00:00 2001 From: Andrei Dziahel Date: Mon, 7 Oct 2024 20:06:18 +0200 Subject: [PATCH 1/4] wip --- hls-plugin-api/src/Ide/Plugin/ConfigUtils.hs | 27 ++++++++++++++++++-- hls-plugin-api/src/Ide/Plugin/Properties.hs | 3 ++- src/Ide/Arguments.hs | 1 + 3 files changed, 28 insertions(+), 3 deletions(-) diff --git a/hls-plugin-api/src/Ide/Plugin/ConfigUtils.hs b/hls-plugin-api/src/Ide/Plugin/ConfigUtils.hs index 8ee6110d29..84d73ac806 100644 --- a/hls-plugin-api/src/Ide/Plugin/ConfigUtils.hs +++ b/hls-plugin-api/src/Ide/Plugin/ConfigUtils.hs @@ -16,10 +16,11 @@ import Data.List.Extra (nubOrd) import Data.String (IsString (fromString)) import qualified Data.Text as T import Ide.Plugin.Config -import Ide.Plugin.Properties (toDefaultJSON, - toVSCodeExtensionSchema) +import Ide.Plugin.Properties (Properties(..), toDefaultJSON, + toVSCodeExtensionSchema, SPropertyKey (SProperties), MetaData (..), SomePropertyKeyWithMetaData (..)) import Ide.Types import Language.LSP.Protocol.Message +import GHC.TypeLits (symbolVal) -- Attention: -- 'diagnosticsOn' will never be added into the default config or the schema, @@ -139,3 +140,25 @@ pluginsToVSCodeExtensionSchema IdePlugins {..} = A.object $ mconcat $ singlePlug ] withIdPrefix x = "haskell.plugin." <> pId <> "." <> x toKey' = fromString . T.unpack . withIdPrefix + +-- | Generates markdown tables for custom config +pluginsCustomConfigToMarkdownTables :: IdePlugins a -> T.Text +pluginsCustomConfigToMarkdownTables IdePlugins {..} = T.unlines $ map singlePlugin ipMap + where + singlePlugin PluginDescriptor {pluginConfigDescriptor = ConfigDescriptor {configCustomConfig = c}, pluginId = PluginId pId} = + T.unlines (pluginHeader : tableHeader : rows c) + where + pluginHeader = "## " <> pId + tableHeader = "| Property | Description | Default |" + rows (CustomConfig p) = toMarkdownTable p + toMarkdownTable :: Properties r -> [T.Text] + toMarkdownTable EmptyProperties = mempty + toMarkdownTable (ConsProperties keyNameProxy k m xs) = renderRow (T.pack $ symbolVal keyNameProxy) (SomePropertyKeyWithMetaData k m) : toMarkdownTable xs + renderRow :: T.Text -> SomePropertyKeyWithMetaData -> T.Text + renderRow key (SomePropertyKeyWithMetaData k m) = + let (desc, defaultVal) = case m of + PropertiesMetaData _ desc _ -> (desc, False) + EnumMetaData _ desc _ _ -> ("", True) + MetaData _ desc -> (desc, False) + in T.unwords ["|", key, "|", desc, "|", if defaultVal then "yes" else "no", "|"] + diff --git a/hls-plugin-api/src/Ide/Plugin/Properties.hs b/hls-plugin-api/src/Ide/Plugin/Properties.hs index dda2bb7e33..0d52caa637 100644 --- a/hls-plugin-api/src/Ide/Plugin/Properties.hs +++ b/hls-plugin-api/src/Ide/Plugin/Properties.hs @@ -21,9 +21,10 @@ module Ide.Plugin.Properties MetaData (..), PropertyKey (..), SPropertyKey (..), + SomePropertyKeyWithMetaData (..), KeyNameProxy (..), KeyNamePath (..), - Properties, + Properties(..), HasProperty, HasPropertyByPath, emptyProperties, diff --git a/src/Ide/Arguments.hs b/src/Ide/Arguments.hs index 733da2e557..20f4e3fcfd 100644 --- a/src/Ide/Arguments.hs +++ b/src/Ide/Arguments.hs @@ -33,6 +33,7 @@ data Arguments | BiosMode BiosAction | Ghcide GhcideArguments | VSCodeExtensionSchemaMode + | PluginsCustomConfigMarkdownReferenceMode | DefaultConfigurationMode | PrintLibDir From 0a2221819a11bb8adf93aff2461f1767a8c57a48 Mon Sep 17 00:00:00 2001 From: Andrei Dziahel Date: Tue, 8 Oct 2024 23:51:43 +0200 Subject: [PATCH 2/4] =?UTF-8?q?plugins'=20custom=20config=20params=20autog?= =?UTF-8?q?enerated=20docs=20=E2=80=94=20make=20it=20work?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hls-plugin-api/src/Ide/Plugin/ConfigUtils.hs | 56 ++++++++++------ src/Ide/Arguments.hs | 4 ++ src/Ide/Main.hs | 6 +- test/functional/ConfigSchema.hs | 9 +++ .../schema/ghc96/markdown-reference.md | 66 +++++++++++++++++++ 5 files changed, 121 insertions(+), 20 deletions(-) create mode 100644 test/testdata/schema/ghc96/markdown-reference.md diff --git a/hls-plugin-api/src/Ide/Plugin/ConfigUtils.hs b/hls-plugin-api/src/Ide/Plugin/ConfigUtils.hs index 84d73ac806..3a8872781c 100644 --- a/hls-plugin-api/src/Ide/Plugin/ConfigUtils.hs +++ b/hls-plugin-api/src/Ide/Plugin/ConfigUtils.hs @@ -15,12 +15,13 @@ import qualified Data.Dependent.Sum as DSum import Data.List.Extra (nubOrd) import Data.String (IsString (fromString)) import qualified Data.Text as T +import GHC.TypeLits (symbolVal) import Ide.Plugin.Config -import Ide.Plugin.Properties (Properties(..), toDefaultJSON, - toVSCodeExtensionSchema, SPropertyKey (SProperties), MetaData (..), SomePropertyKeyWithMetaData (..)) +import Ide.Plugin.Properties (MetaData (..), Properties (..), + toDefaultJSON, + toVSCodeExtensionSchema) import Ide.Types import Language.LSP.Protocol.Message -import GHC.TypeLits (symbolVal) -- Attention: -- 'diagnosticsOn' will never be added into the default config or the schema, @@ -141,24 +142,41 @@ pluginsToVSCodeExtensionSchema IdePlugins {..} = A.object $ mconcat $ singlePlug withIdPrefix x = "haskell.plugin." <> pId <> "." <> x toKey' = fromString . T.unpack . withIdPrefix +data PluginCustomConfig = PluginCustomConfig { + pccHeader :: T.Text, + pccParams :: [PluginCustomConfigParam] +} +data PluginCustomConfigParam = PluginCustomConfigParam { + pccpName :: T.Text, + pccpDescription :: T.Text, + pccpIsDefault :: Bool +} + -- | Generates markdown tables for custom config pluginsCustomConfigToMarkdownTables :: IdePlugins a -> T.Text -pluginsCustomConfigToMarkdownTables IdePlugins {..} = T.unlines $ map singlePlugin ipMap +pluginsCustomConfigToMarkdownTables IdePlugins {..} = T.unlines + $ map renderCfg + $ filter (\(PluginCustomConfig _ params) -> not $ null params) + $ map pluginCfg ipMap where - singlePlugin PluginDescriptor {pluginConfigDescriptor = ConfigDescriptor {configCustomConfig = c}, pluginId = PluginId pId} = - T.unlines (pluginHeader : tableHeader : rows c) + renderCfg :: PluginCustomConfig -> T.Text + renderCfg (PluginCustomConfig pId pccParams) = + T.unlines (pluginHeader : tableHeader : rows pccParams) where pluginHeader = "## " <> pId - tableHeader = "| Property | Description | Default |" - rows (CustomConfig p) = toMarkdownTable p - toMarkdownTable :: Properties r -> [T.Text] - toMarkdownTable EmptyProperties = mempty - toMarkdownTable (ConsProperties keyNameProxy k m xs) = renderRow (T.pack $ symbolVal keyNameProxy) (SomePropertyKeyWithMetaData k m) : toMarkdownTable xs - renderRow :: T.Text -> SomePropertyKeyWithMetaData -> T.Text - renderRow key (SomePropertyKeyWithMetaData k m) = - let (desc, defaultVal) = case m of - PropertiesMetaData _ desc _ -> (desc, False) - EnumMetaData _ desc _ _ -> ("", True) - MetaData _ desc -> (desc, False) - in T.unwords ["|", key, "|", desc, "|", if defaultVal then "yes" else "no", "|"] - + tableHeader = "| Property | Description | Default |" <> "\n" <> "| --- | --- | --- |" + rows = map renderRow + renderRow (PluginCustomConfigParam name desc isDefault) = + "| `" <> name <> "` | " <> desc <> " | " <> if isDefault then "Yes" else "No" <> " |" + pluginCfg :: PluginDescriptor r -> PluginCustomConfig + pluginCfg PluginDescriptor {pluginConfigDescriptor = ConfigDescriptor {configCustomConfig = c}, pluginId = PluginId pId} = + PluginCustomConfig pId (pccProcess c) + where + pccProcess :: CustomConfig -> [PluginCustomConfigParam] + pccProcess (CustomConfig EmptyProperties) = mempty + pccProcess (CustomConfig (ConsProperties keyNameProxy _k m xs)) = + let (desc, isDefault) = case m of + PropertiesMetaData _ desc _ -> (desc, False) + EnumMetaData _ desc _ _ -> (desc, True) + MetaData _ desc -> (desc, False) + in PluginCustomConfigParam (T.pack $ symbolVal keyNameProxy) desc isDefault : pccProcess (CustomConfig xs) diff --git a/src/Ide/Arguments.hs b/src/Ide/Arguments.hs index 20f4e3fcfd..be7f35e455 100644 --- a/src/Ide/Arguments.hs +++ b/src/Ide/Arguments.hs @@ -70,6 +70,7 @@ getArguments exeName plugins = execParser opts <|> hsubparser ( command "vscode-extension-schema" extensionSchemaCommand <> command "generate-default-config" generateDefaultConfigCommand + <> command "plugins-custom-config-markdown-reference" pluginsCustomConfigMarkdownReferenceCommand ) <|> listPluginsParser <|> BiosMode <$> biosParser @@ -87,6 +88,9 @@ getArguments exeName plugins = execParser opts generateDefaultConfigCommand = info (pure DefaultConfigurationMode) (fullDesc <> progDesc "Print config supported by the server with default values") + pluginsCustomConfigMarkdownReferenceCommand = + info (pure PluginsCustomConfigMarkdownReferenceMode) + (fullDesc <> progDesc "Print markdown reference for plugins custom config") printVersionParser :: String -> Parser PrintVersion printVersionParser exeName = diff --git a/src/Ide/Main.hs b/src/Ide/Main.hs index 33b1d51a11..f122b53fa6 100644 --- a/src/Ide/Main.hs +++ b/src/Ide/Main.hs @@ -15,6 +15,7 @@ import Data.Function ((&)) import Data.List (sortOn) import Data.Text (Text) import qualified Data.Text as T +import qualified Data.Text.IO as T (putStrLn) import Data.Text.Lazy.Encoding (decodeUtf8) import qualified Data.Text.Lazy.IO as LT import Development.IDE.Core.Rules hiding (Log) @@ -28,7 +29,8 @@ import HIE.Bios.Types hiding (Log) import qualified HIE.Bios.Types as HieBios import Ide.Arguments import Ide.Logger as G -import Ide.Plugin.ConfigUtils (pluginsToDefaultConfig, +import Ide.Plugin.ConfigUtils (pluginsCustomConfigToMarkdownTables, + pluginsToDefaultConfig, pluginsToVSCodeExtensionSchema) import Ide.Types (IdePlugins, PluginId (PluginId), describePlugin, ipMap, pluginId) @@ -103,6 +105,8 @@ defaultMain recorder args idePlugins = do VSCodeExtensionSchemaMode -> do LT.putStrLn $ decodeUtf8 $ encodePrettySorted $ pluginsToVSCodeExtensionSchema idePlugins + PluginsCustomConfigMarkdownReferenceMode -> do + T.putStrLn $ pluginsCustomConfigToMarkdownTables idePlugins DefaultConfigurationMode -> do LT.putStrLn $ decodeUtf8 $ encodePrettySorted $ pluginsToDefaultConfig idePlugins PrintLibDir -> do diff --git a/test/functional/ConfigSchema.hs b/test/functional/ConfigSchema.hs index 3dbbe0ce2f..2ece6972e9 100644 --- a/test/functional/ConfigSchema.hs +++ b/test/functional/ConfigSchema.hs @@ -31,6 +31,9 @@ tests = testGroup "generate schema" , goldenGitDiff "generate-default-config" (defaultConfigFp ghcVersion) $ do stdout <- readProcess hlsExeCommand ["generate-default-config"] "" pure $ BS.pack stdout + , goldenGitDiff "plugins-custom-config-markdown-reference" (markdownReferenceFp ghcVersion) $ do + stdout <- readProcess hlsExeCommand ["plugins-custom-config-markdown-reference"] "" + pure $ BS.pack stdout ] vscodeSchemaFp :: GhcVersion -> FilePath @@ -39,11 +42,17 @@ vscodeSchemaFp ghcVer = "test" "testdata" "schema" prettyGhcVersion defaultConfigFp :: GhcVersion -> FilePath defaultConfigFp ghcVer = "test" "testdata" "schema" prettyGhcVersion ghcVer generateDefaultConfigJson +markdownReferenceFp :: GhcVersion -> FilePath +markdownReferenceFp ghcVer = "test" "testdata" "schema" prettyGhcVersion ghcVer markdownReferenceMd + vscodeSchemaJson :: FilePath vscodeSchemaJson = "vscode-extension-schema.golden.json" generateDefaultConfigJson :: FilePath generateDefaultConfigJson = "default-config.golden.json" +markdownReferenceMd :: FilePath +markdownReferenceMd = "markdown-reference.md" + prettyGhcVersion :: GhcVersion -> String prettyGhcVersion ghcVer = map toLower (show ghcVer) diff --git a/test/testdata/schema/ghc96/markdown-reference.md b/test/testdata/schema/ghc96/markdown-reference.md new file mode 100644 index 0000000000..bd05a4e0c2 --- /dev/null +++ b/test/testdata/schema/ghc96/markdown-reference.md @@ -0,0 +1,66 @@ +## ghcide-completions +| Property | Description | Default | +| --- | --- | --- | +| autoExtendOn | Extends the import list automatically when completing a out-of-scope identifier | No | +| snippetsOn | Inserts snippets when using code completions | No | + +## semanticTokens +| Property | Description | Default | +| --- | --- | --- | +| variableToken | LSP semantic token type to use for variables | Yes +| functionToken | LSP semantic token type to use for functions | Yes +| dataConstructorToken | LSP semantic token type to use for data constructors | Yes +| typeVariableToken | LSP semantic token type to use for type variables | Yes +| classMethodToken | LSP semantic token type to use for typeclass methods | Yes +| patternSynonymToken | LSP semantic token type to use for pattern synonyms | Yes +| typeConstructorToken | LSP semantic token type to use for type constructors | Yes +| classToken | LSP semantic token type to use for typeclasses | Yes +| typeSynonymToken | LSP semantic token type to use for type synonyms | Yes +| typeFamilyToken | LSP semantic token type to use for type families | Yes +| recordFieldToken | LSP semantic token type to use for record fields | Yes +| operatorToken | LSP semantic token type to use for operators | Yes +| moduleToken | LSP semantic token type to use for modules | Yes + +## fourmolu +| Property | Description | Default | +| --- | --- | --- | +| external | Call out to an external "fourmolu" executable, rather than using the bundled library. | No | +| path | Set path to executable (for "external" mode). | No | + +## cabal-gild +| Property | Description | Default | +| --- | --- | --- | +| path | Set path to 'cabal-gild' executable | No | + +## hlint +| Property | Description | Default | +| --- | --- | --- | +| flags | Flags used by hlint | No | + +## ormolu +| Property | Description | Default | +| --- | --- | --- | +| external | Call out to an external "ormolu" executable, rather than using the bundled library | No | + +## ghcide-type-lenses +| Property | Description | Default | +| --- | --- | --- | +| mode | Control how type lenses are shown | Yes + +## cabal-fmt +| Property | Description | Default | +| --- | --- | --- | +| path | Set path to 'cabal-fmt' executable | No | + +## eval +| Property | Description | Default | +| --- | --- | --- | +| exception | Enable marking exceptions with `*** Exception:` similarly to doctest and GHCi. | No | +| diff | Enable the diff output (WAS/NOW) of eval lenses | No | + +## rename +| Property | Description | Default | +| --- | --- | --- | +| crossModule | Enable experimental cross-module renaming | No | + + From e84845f83d5f8455658d3a2ff5342771bedc8805 Mon Sep 17 00:00:00 2001 From: Andrei Dziahel Date: Fri, 11 Oct 2024 19:39:45 +0200 Subject: [PATCH 3/4] autodoc: support enums too --- hls-plugin-api/src/Ide/Plugin/ConfigUtils.hs | 107 ++++++++++++----- hls-plugin-api/src/Ide/Plugin/Properties.hs | 14 +++ .../schema/ghc96/markdown-reference.md | 108 +++++++++--------- 3 files changed, 149 insertions(+), 80 deletions(-) diff --git a/hls-plugin-api/src/Ide/Plugin/ConfigUtils.hs b/hls-plugin-api/src/Ide/Plugin/ConfigUtils.hs index 3a8872781c..bc3b1831a1 100644 --- a/hls-plugin-api/src/Ide/Plugin/ConfigUtils.hs +++ b/hls-plugin-api/src/Ide/Plugin/ConfigUtils.hs @@ -17,7 +17,12 @@ import Data.String (IsString (fromString)) import qualified Data.Text as T import GHC.TypeLits (symbolVal) import Ide.Plugin.Config -import Ide.Plugin.Properties (MetaData (..), Properties (..), +import Ide.Plugin.Properties (KeyNameProxy, MetaData (..), + PluginCustomConfig (..), + PluginCustomConfigParam (..), + Properties (..), + SPropertyKey (..), + SomePropertyKeyWithMetaData (..), toDefaultJSON, toVSCodeExtensionSchema) import Ide.Types @@ -142,41 +147,91 @@ pluginsToVSCodeExtensionSchema IdePlugins {..} = A.object $ mconcat $ singlePlug withIdPrefix x = "haskell.plugin." <> pId <> "." <> x toKey' = fromString . T.unpack . withIdPrefix -data PluginCustomConfig = PluginCustomConfig { - pccHeader :: T.Text, - pccParams :: [PluginCustomConfigParam] -} -data PluginCustomConfigParam = PluginCustomConfigParam { - pccpName :: T.Text, - pccpDescription :: T.Text, - pccpIsDefault :: Bool -} -- | Generates markdown tables for custom config pluginsCustomConfigToMarkdownTables :: IdePlugins a -> T.Text pluginsCustomConfigToMarkdownTables IdePlugins {..} = T.unlines $ map renderCfg $ filter (\(PluginCustomConfig _ params) -> not $ null params) - $ map pluginCfg ipMap + $ map toPluginCustomConfig ipMap where + toPluginCustomConfig :: PluginDescriptor ideState -> PluginCustomConfig + toPluginCustomConfig PluginDescriptor {pluginConfigDescriptor = ConfigDescriptor {configCustomConfig = c}, pluginId = PluginId pId} = + PluginCustomConfig { pcc'Name = pId, pcc'Params = toPluginCustomConfigParams c} + toPluginCustomConfigParams :: CustomConfig -> [PluginCustomConfigParam] + toPluginCustomConfigParams (CustomConfig p) = toPluginCustomConfigParams' p + toPluginCustomConfigParams' :: Properties r -> [PluginCustomConfigParam] + toPluginCustomConfigParams' EmptyProperties = [] + toPluginCustomConfigParams' (ConsProperties (keyNameProxy :: KeyNameProxy s) (k :: SPropertyKey k) (m :: MetaData t) xs) = + toEntry (SomePropertyKeyWithMetaData k m) : toPluginCustomConfigParams' xs + where + toEntry :: SomePropertyKeyWithMetaData -> PluginCustomConfigParam + toEntry (SomePropertyKeyWithMetaData SNumber MetaData {..}) = + PluginCustomConfigParam { + pccp'Name = T.pack $ symbolVal keyNameProxy, + pccp'Description = description, + pccp'Default = T.pack $ show defaultValue, + pccp'EnumValues = [] + } + toEntry (SomePropertyKeyWithMetaData SInteger MetaData {..}) = + PluginCustomConfigParam { + pccp'Name = T.pack $ symbolVal keyNameProxy, + pccp'Description = description, + pccp'Default = T.pack $ show defaultValue, + pccp'EnumValues = [] + } + toEntry (SomePropertyKeyWithMetaData SString MetaData {..}) = + PluginCustomConfigParam { + pccp'Name = T.pack $ symbolVal keyNameProxy, + pccp'Description = description, + pccp'Default = T.pack $ show defaultValue, + pccp'EnumValues = [] + } + toEntry (SomePropertyKeyWithMetaData SBoolean MetaData {..}) = + PluginCustomConfigParam { + pccp'Name = T.pack $ symbolVal keyNameProxy, + pccp'Description = description, + pccp'Default = T.pack $ show defaultValue, + pccp'EnumValues = [] + } + toEntry (SomePropertyKeyWithMetaData (SObject _) MetaData {..}) = + PluginCustomConfigParam { + pccp'Name = T.pack $ symbolVal keyNameProxy, + pccp'Description = description, + pccp'Default = "TODO: nested object", -- T.pack $ show defaultValue, + pccp'EnumValues = [] + } + toEntry (SomePropertyKeyWithMetaData (SArray _) MetaData {..}) = + PluginCustomConfigParam { + pccp'Name = T.pack $ symbolVal keyNameProxy, + pccp'Description = description, + pccp'Default = "TODO: Array values", -- T.pack $ show defaultValue, + pccp'EnumValues = [] + } + toEntry (SomePropertyKeyWithMetaData (SEnum _) EnumMetaData {..}) = + PluginCustomConfigParam { + pccp'Name = T.pack $ symbolVal keyNameProxy, + pccp'Description = description, + pccp'Default = T.pack $ show defaultValue, + pccp'EnumValues = map (T.pack . show) enumValues + } + toEntry (SomePropertyKeyWithMetaData SProperties PropertiesMetaData {..}) = + PluginCustomConfigParam { + pccp'Name = T.pack $ symbolVal keyNameProxy, + pccp'Description = description, + pccp'Default = T.pack $ show defaultValue, + pccp'EnumValues = [] + } renderCfg :: PluginCustomConfig -> T.Text renderCfg (PluginCustomConfig pId pccParams) = T.unlines (pluginHeader : tableHeader : rows pccParams) where pluginHeader = "## " <> pId - tableHeader = "| Property | Description | Default |" <> "\n" <> "| --- | --- | --- |" + tableHeader = + "| Property | Description | Default | Allowed values |" <> "\n" <> + "| --- | --- | --- | --- |" rows = map renderRow - renderRow (PluginCustomConfigParam name desc isDefault) = - "| `" <> name <> "` | " <> desc <> " | " <> if isDefault then "Yes" else "No" <> " |" - pluginCfg :: PluginDescriptor r -> PluginCustomConfig - pluginCfg PluginDescriptor {pluginConfigDescriptor = ConfigDescriptor {configCustomConfig = c}, pluginId = PluginId pId} = - PluginCustomConfig pId (pccProcess c) - where - pccProcess :: CustomConfig -> [PluginCustomConfigParam] - pccProcess (CustomConfig EmptyProperties) = mempty - pccProcess (CustomConfig (ConsProperties keyNameProxy _k m xs)) = - let (desc, isDefault) = case m of - PropertiesMetaData _ desc _ -> (desc, False) - EnumMetaData _ desc _ _ -> (desc, True) - MetaData _ desc -> (desc, False) - in PluginCustomConfigParam (T.pack $ symbolVal keyNameProxy) desc isDefault : pccProcess (CustomConfig xs) + renderRow PluginCustomConfigParam {..} = + "| `" <> pccp'Name <> "` | " <> pccp'Description <> " | `" <> pccp'Default <> "` | " <> renderEnum pccp'EnumValues <> " |" + renderEnum [] = "   " -- Placeholder to prevent missing cells + renderEnum vs = "
    " <> (T.intercalate " " $ map (\x -> "
  • " <> x <> "
  • ") vs) <> "
" diff --git a/hls-plugin-api/src/Ide/Plugin/Properties.hs b/hls-plugin-api/src/Ide/Plugin/Properties.hs index 0d52caa637..49a45721b4 100644 --- a/hls-plugin-api/src/Ide/Plugin/Properties.hs +++ b/hls-plugin-api/src/Ide/Plugin/Properties.hs @@ -43,6 +43,8 @@ module Ide.Plugin.Properties usePropertyByPathEither, usePropertyByPath, (&), + PluginCustomConfig(..), + PluginCustomConfigParam(..), ) where @@ -517,3 +519,15 @@ toVSCodeExtensionSchema' ps = case ps of ] (SomePropertyKeyWithMetaData SProperties PropertiesMetaData {..}) -> map (first Just) $ toVSCodeExtensionSchema' childrenProperties + +data PluginCustomConfig = PluginCustomConfig { + pcc'Name :: T.Text, + pcc'Params :: [PluginCustomConfigParam] +} +data PluginCustomConfigParam = PluginCustomConfigParam { + pccp'Name :: T.Text, + pccp'Description :: T.Text, + pccp'Default :: T.Text, + pccp'EnumValues :: [T.Text] +} + diff --git a/test/testdata/schema/ghc96/markdown-reference.md b/test/testdata/schema/ghc96/markdown-reference.md index bd05a4e0c2..668323ce66 100644 --- a/test/testdata/schema/ghc96/markdown-reference.md +++ b/test/testdata/schema/ghc96/markdown-reference.md @@ -1,66 +1,66 @@ -## ghcide-completions -| Property | Description | Default | -| --- | --- | --- | -| autoExtendOn | Extends the import list automatically when completing a out-of-scope identifier | No | -| snippetsOn | Inserts snippets when using code completions | No | +## hlint +| Property | Description | Default | Allowed values | +| --- | --- | --- | --- | +| `flags` | Flags used by hlint | `TODO: Array values` |   | -## semanticTokens -| Property | Description | Default | -| --- | --- | --- | -| variableToken | LSP semantic token type to use for variables | Yes -| functionToken | LSP semantic token type to use for functions | Yes -| dataConstructorToken | LSP semantic token type to use for data constructors | Yes -| typeVariableToken | LSP semantic token type to use for type variables | Yes -| classMethodToken | LSP semantic token type to use for typeclass methods | Yes -| patternSynonymToken | LSP semantic token type to use for pattern synonyms | Yes -| typeConstructorToken | LSP semantic token type to use for type constructors | Yes -| classToken | LSP semantic token type to use for typeclasses | Yes -| typeSynonymToken | LSP semantic token type to use for type synonyms | Yes -| typeFamilyToken | LSP semantic token type to use for type families | Yes -| recordFieldToken | LSP semantic token type to use for record fields | Yes -| operatorToken | LSP semantic token type to use for operators | Yes -| moduleToken | LSP semantic token type to use for modules | Yes +## cabal-fmt +| Property | Description | Default | Allowed values | +| --- | --- | --- | --- | +| `path` | Set path to 'cabal-fmt' executable | `"cabal-fmt"` |   | -## fourmolu -| Property | Description | Default | -| --- | --- | --- | -| external | Call out to an external "fourmolu" executable, rather than using the bundled library. | No | -| path | Set path to executable (for "external" mode). | No | +## ghcide-completions +| Property | Description | Default | Allowed values | +| --- | --- | --- | --- | +| `autoExtendOn` | Extends the import list automatically when completing a out-of-scope identifier | `True` |   | +| `snippetsOn` | Inserts snippets when using code completions | `True` |   | -## cabal-gild -| Property | Description | Default | -| --- | --- | --- | -| path | Set path to 'cabal-gild' executable | No | +## eval +| Property | Description | Default | Allowed values | +| --- | --- | --- | --- | +| `exception` | Enable marking exceptions with `*** Exception:` similarly to doctest and GHCi. | `False` |   | +| `diff` | Enable the diff output (WAS/NOW) of eval lenses | `True` |   | -## hlint -| Property | Description | Default | -| --- | --- | --- | -| flags | Flags used by hlint | No | +## ghcide-type-lenses +| Property | Description | Default | Allowed values | +| --- | --- | --- | --- | +| `mode` | Control how type lenses are shown | `Always` |
  • Always
  • Exported
  • Diagnostics
| ## ormolu -| Property | Description | Default | -| --- | --- | --- | -| external | Call out to an external "ormolu" executable, rather than using the bundled library | No | +| Property | Description | Default | Allowed values | +| --- | --- | --- | --- | +| `external` | Call out to an external "ormolu" executable, rather than using the bundled library | `False` |   | -## ghcide-type-lenses -| Property | Description | Default | -| --- | --- | --- | -| mode | Control how type lenses are shown | Yes +## rename +| Property | Description | Default | Allowed values | +| --- | --- | --- | --- | +| `crossModule` | Enable experimental cross-module renaming | `False` |   | -## cabal-fmt -| Property | Description | Default | -| --- | --- | --- | -| path | Set path to 'cabal-fmt' executable | No | +## semanticTokens +| Property | Description | Default | Allowed values | +| --- | --- | --- | --- | +| `variableToken` | LSP semantic token type to use for variables | `SemanticTokenTypes_Variable` |
  • SemanticTokenTypes_Namespace
  • SemanticTokenTypes_Type
  • SemanticTokenTypes_Class
  • SemanticTokenTypes_Enum
  • SemanticTokenTypes_Interface
  • SemanticTokenTypes_Struct
  • SemanticTokenTypes_TypeParameter
  • SemanticTokenTypes_Parameter
  • SemanticTokenTypes_Variable
  • SemanticTokenTypes_Property
  • SemanticTokenTypes_EnumMember
  • SemanticTokenTypes_Event
  • SemanticTokenTypes_Function
  • SemanticTokenTypes_Method
  • SemanticTokenTypes_Macro
  • SemanticTokenTypes_Keyword
  • SemanticTokenTypes_Modifier
  • SemanticTokenTypes_Comment
  • SemanticTokenTypes_String
  • SemanticTokenTypes_Number
  • SemanticTokenTypes_Regexp
  • SemanticTokenTypes_Operator
  • SemanticTokenTypes_Decorator
| +| `functionToken` | LSP semantic token type to use for functions | `SemanticTokenTypes_Function` |
  • SemanticTokenTypes_Namespace
  • SemanticTokenTypes_Type
  • SemanticTokenTypes_Class
  • SemanticTokenTypes_Enum
  • SemanticTokenTypes_Interface
  • SemanticTokenTypes_Struct
  • SemanticTokenTypes_TypeParameter
  • SemanticTokenTypes_Parameter
  • SemanticTokenTypes_Variable
  • SemanticTokenTypes_Property
  • SemanticTokenTypes_EnumMember
  • SemanticTokenTypes_Event
  • SemanticTokenTypes_Function
  • SemanticTokenTypes_Method
  • SemanticTokenTypes_Macro
  • SemanticTokenTypes_Keyword
  • SemanticTokenTypes_Modifier
  • SemanticTokenTypes_Comment
  • SemanticTokenTypes_String
  • SemanticTokenTypes_Number
  • SemanticTokenTypes_Regexp
  • SemanticTokenTypes_Operator
  • SemanticTokenTypes_Decorator
| +| `dataConstructorToken` | LSP semantic token type to use for data constructors | `SemanticTokenTypes_EnumMember` |
  • SemanticTokenTypes_Namespace
  • SemanticTokenTypes_Type
  • SemanticTokenTypes_Class
  • SemanticTokenTypes_Enum
  • SemanticTokenTypes_Interface
  • SemanticTokenTypes_Struct
  • SemanticTokenTypes_TypeParameter
  • SemanticTokenTypes_Parameter
  • SemanticTokenTypes_Variable
  • SemanticTokenTypes_Property
  • SemanticTokenTypes_EnumMember
  • SemanticTokenTypes_Event
  • SemanticTokenTypes_Function
  • SemanticTokenTypes_Method
  • SemanticTokenTypes_Macro
  • SemanticTokenTypes_Keyword
  • SemanticTokenTypes_Modifier
  • SemanticTokenTypes_Comment
  • SemanticTokenTypes_String
  • SemanticTokenTypes_Number
  • SemanticTokenTypes_Regexp
  • SemanticTokenTypes_Operator
  • SemanticTokenTypes_Decorator
| +| `typeVariableToken` | LSP semantic token type to use for type variables | `SemanticTokenTypes_TypeParameter` |
  • SemanticTokenTypes_Namespace
  • SemanticTokenTypes_Type
  • SemanticTokenTypes_Class
  • SemanticTokenTypes_Enum
  • SemanticTokenTypes_Interface
  • SemanticTokenTypes_Struct
  • SemanticTokenTypes_TypeParameter
  • SemanticTokenTypes_Parameter
  • SemanticTokenTypes_Variable
  • SemanticTokenTypes_Property
  • SemanticTokenTypes_EnumMember
  • SemanticTokenTypes_Event
  • SemanticTokenTypes_Function
  • SemanticTokenTypes_Method
  • SemanticTokenTypes_Macro
  • SemanticTokenTypes_Keyword
  • SemanticTokenTypes_Modifier
  • SemanticTokenTypes_Comment
  • SemanticTokenTypes_String
  • SemanticTokenTypes_Number
  • SemanticTokenTypes_Regexp
  • SemanticTokenTypes_Operator
  • SemanticTokenTypes_Decorator
| +| `classMethodToken` | LSP semantic token type to use for typeclass methods | `SemanticTokenTypes_Method` |
  • SemanticTokenTypes_Namespace
  • SemanticTokenTypes_Type
  • SemanticTokenTypes_Class
  • SemanticTokenTypes_Enum
  • SemanticTokenTypes_Interface
  • SemanticTokenTypes_Struct
  • SemanticTokenTypes_TypeParameter
  • SemanticTokenTypes_Parameter
  • SemanticTokenTypes_Variable
  • SemanticTokenTypes_Property
  • SemanticTokenTypes_EnumMember
  • SemanticTokenTypes_Event
  • SemanticTokenTypes_Function
  • SemanticTokenTypes_Method
  • SemanticTokenTypes_Macro
  • SemanticTokenTypes_Keyword
  • SemanticTokenTypes_Modifier
  • SemanticTokenTypes_Comment
  • SemanticTokenTypes_String
  • SemanticTokenTypes_Number
  • SemanticTokenTypes_Regexp
  • SemanticTokenTypes_Operator
  • SemanticTokenTypes_Decorator
| +| `patternSynonymToken` | LSP semantic token type to use for pattern synonyms | `SemanticTokenTypes_Macro` |
  • SemanticTokenTypes_Namespace
  • SemanticTokenTypes_Type
  • SemanticTokenTypes_Class
  • SemanticTokenTypes_Enum
  • SemanticTokenTypes_Interface
  • SemanticTokenTypes_Struct
  • SemanticTokenTypes_TypeParameter
  • SemanticTokenTypes_Parameter
  • SemanticTokenTypes_Variable
  • SemanticTokenTypes_Property
  • SemanticTokenTypes_EnumMember
  • SemanticTokenTypes_Event
  • SemanticTokenTypes_Function
  • SemanticTokenTypes_Method
  • SemanticTokenTypes_Macro
  • SemanticTokenTypes_Keyword
  • SemanticTokenTypes_Modifier
  • SemanticTokenTypes_Comment
  • SemanticTokenTypes_String
  • SemanticTokenTypes_Number
  • SemanticTokenTypes_Regexp
  • SemanticTokenTypes_Operator
  • SemanticTokenTypes_Decorator
| +| `typeConstructorToken` | LSP semantic token type to use for type constructors | `SemanticTokenTypes_Enum` |
  • SemanticTokenTypes_Namespace
  • SemanticTokenTypes_Type
  • SemanticTokenTypes_Class
  • SemanticTokenTypes_Enum
  • SemanticTokenTypes_Interface
  • SemanticTokenTypes_Struct
  • SemanticTokenTypes_TypeParameter
  • SemanticTokenTypes_Parameter
  • SemanticTokenTypes_Variable
  • SemanticTokenTypes_Property
  • SemanticTokenTypes_EnumMember
  • SemanticTokenTypes_Event
  • SemanticTokenTypes_Function
  • SemanticTokenTypes_Method
  • SemanticTokenTypes_Macro
  • SemanticTokenTypes_Keyword
  • SemanticTokenTypes_Modifier
  • SemanticTokenTypes_Comment
  • SemanticTokenTypes_String
  • SemanticTokenTypes_Number
  • SemanticTokenTypes_Regexp
  • SemanticTokenTypes_Operator
  • SemanticTokenTypes_Decorator
| +| `classToken` | LSP semantic token type to use for typeclasses | `SemanticTokenTypes_Class` |
  • SemanticTokenTypes_Namespace
  • SemanticTokenTypes_Type
  • SemanticTokenTypes_Class
  • SemanticTokenTypes_Enum
  • SemanticTokenTypes_Interface
  • SemanticTokenTypes_Struct
  • SemanticTokenTypes_TypeParameter
  • SemanticTokenTypes_Parameter
  • SemanticTokenTypes_Variable
  • SemanticTokenTypes_Property
  • SemanticTokenTypes_EnumMember
  • SemanticTokenTypes_Event
  • SemanticTokenTypes_Function
  • SemanticTokenTypes_Method
  • SemanticTokenTypes_Macro
  • SemanticTokenTypes_Keyword
  • SemanticTokenTypes_Modifier
  • SemanticTokenTypes_Comment
  • SemanticTokenTypes_String
  • SemanticTokenTypes_Number
  • SemanticTokenTypes_Regexp
  • SemanticTokenTypes_Operator
  • SemanticTokenTypes_Decorator
| +| `typeSynonymToken` | LSP semantic token type to use for type synonyms | `SemanticTokenTypes_Type` |
  • SemanticTokenTypes_Namespace
  • SemanticTokenTypes_Type
  • SemanticTokenTypes_Class
  • SemanticTokenTypes_Enum
  • SemanticTokenTypes_Interface
  • SemanticTokenTypes_Struct
  • SemanticTokenTypes_TypeParameter
  • SemanticTokenTypes_Parameter
  • SemanticTokenTypes_Variable
  • SemanticTokenTypes_Property
  • SemanticTokenTypes_EnumMember
  • SemanticTokenTypes_Event
  • SemanticTokenTypes_Function
  • SemanticTokenTypes_Method
  • SemanticTokenTypes_Macro
  • SemanticTokenTypes_Keyword
  • SemanticTokenTypes_Modifier
  • SemanticTokenTypes_Comment
  • SemanticTokenTypes_String
  • SemanticTokenTypes_Number
  • SemanticTokenTypes_Regexp
  • SemanticTokenTypes_Operator
  • SemanticTokenTypes_Decorator
| +| `typeFamilyToken` | LSP semantic token type to use for type families | `SemanticTokenTypes_Interface` |
  • SemanticTokenTypes_Namespace
  • SemanticTokenTypes_Type
  • SemanticTokenTypes_Class
  • SemanticTokenTypes_Enum
  • SemanticTokenTypes_Interface
  • SemanticTokenTypes_Struct
  • SemanticTokenTypes_TypeParameter
  • SemanticTokenTypes_Parameter
  • SemanticTokenTypes_Variable
  • SemanticTokenTypes_Property
  • SemanticTokenTypes_EnumMember
  • SemanticTokenTypes_Event
  • SemanticTokenTypes_Function
  • SemanticTokenTypes_Method
  • SemanticTokenTypes_Macro
  • SemanticTokenTypes_Keyword
  • SemanticTokenTypes_Modifier
  • SemanticTokenTypes_Comment
  • SemanticTokenTypes_String
  • SemanticTokenTypes_Number
  • SemanticTokenTypes_Regexp
  • SemanticTokenTypes_Operator
  • SemanticTokenTypes_Decorator
| +| `recordFieldToken` | LSP semantic token type to use for record fields | `SemanticTokenTypes_Property` |
  • SemanticTokenTypes_Namespace
  • SemanticTokenTypes_Type
  • SemanticTokenTypes_Class
  • SemanticTokenTypes_Enum
  • SemanticTokenTypes_Interface
  • SemanticTokenTypes_Struct
  • SemanticTokenTypes_TypeParameter
  • SemanticTokenTypes_Parameter
  • SemanticTokenTypes_Variable
  • SemanticTokenTypes_Property
  • SemanticTokenTypes_EnumMember
  • SemanticTokenTypes_Event
  • SemanticTokenTypes_Function
  • SemanticTokenTypes_Method
  • SemanticTokenTypes_Macro
  • SemanticTokenTypes_Keyword
  • SemanticTokenTypes_Modifier
  • SemanticTokenTypes_Comment
  • SemanticTokenTypes_String
  • SemanticTokenTypes_Number
  • SemanticTokenTypes_Regexp
  • SemanticTokenTypes_Operator
  • SemanticTokenTypes_Decorator
| +| `operatorToken` | LSP semantic token type to use for operators | `SemanticTokenTypes_Operator` |
  • SemanticTokenTypes_Namespace
  • SemanticTokenTypes_Type
  • SemanticTokenTypes_Class
  • SemanticTokenTypes_Enum
  • SemanticTokenTypes_Interface
  • SemanticTokenTypes_Struct
  • SemanticTokenTypes_TypeParameter
  • SemanticTokenTypes_Parameter
  • SemanticTokenTypes_Variable
  • SemanticTokenTypes_Property
  • SemanticTokenTypes_EnumMember
  • SemanticTokenTypes_Event
  • SemanticTokenTypes_Function
  • SemanticTokenTypes_Method
  • SemanticTokenTypes_Macro
  • SemanticTokenTypes_Keyword
  • SemanticTokenTypes_Modifier
  • SemanticTokenTypes_Comment
  • SemanticTokenTypes_String
  • SemanticTokenTypes_Number
  • SemanticTokenTypes_Regexp
  • SemanticTokenTypes_Operator
  • SemanticTokenTypes_Decorator
| +| `moduleToken` | LSP semantic token type to use for modules | `SemanticTokenTypes_Namespace` |
  • SemanticTokenTypes_Namespace
  • SemanticTokenTypes_Type
  • SemanticTokenTypes_Class
  • SemanticTokenTypes_Enum
  • SemanticTokenTypes_Interface
  • SemanticTokenTypes_Struct
  • SemanticTokenTypes_TypeParameter
  • SemanticTokenTypes_Parameter
  • SemanticTokenTypes_Variable
  • SemanticTokenTypes_Property
  • SemanticTokenTypes_EnumMember
  • SemanticTokenTypes_Event
  • SemanticTokenTypes_Function
  • SemanticTokenTypes_Method
  • SemanticTokenTypes_Macro
  • SemanticTokenTypes_Keyword
  • SemanticTokenTypes_Modifier
  • SemanticTokenTypes_Comment
  • SemanticTokenTypes_String
  • SemanticTokenTypes_Number
  • SemanticTokenTypes_Regexp
  • SemanticTokenTypes_Operator
  • SemanticTokenTypes_Decorator
| -## eval -| Property | Description | Default | -| --- | --- | --- | -| exception | Enable marking exceptions with `*** Exception:` similarly to doctest and GHCi. | No | -| diff | Enable the diff output (WAS/NOW) of eval lenses | No | +## fourmolu +| Property | Description | Default | Allowed values | +| --- | --- | --- | --- | +| `external` | Call out to an external "fourmolu" executable, rather than using the bundled library. | `False` |   | +| `path` | Set path to executable (for "external" mode). | `"fourmolu"` |   | -## rename -| Property | Description | Default | -| --- | --- | --- | -| crossModule | Enable experimental cross-module renaming | No | +## cabal-gild +| Property | Description | Default | Allowed values | +| --- | --- | --- | --- | +| `path` | Set path to 'cabal-gild' executable | `"cabal-gild"` |   | From cd4ef8208602a763056e939fd117d6a32a83faad Mon Sep 17 00:00:00 2001 From: Andrei Dziahel Date: Sat, 12 Oct 2024 10:57:29 +0200 Subject: [PATCH 4/4] test: copy markdown reference over to ghc94 & 98 --- .../schema/ghc94/markdown-reference.md | 66 +++++++++++++++++++ .../schema/ghc98/markdown-reference.md | 66 +++++++++++++++++++ 2 files changed, 132 insertions(+) create mode 100644 test/testdata/schema/ghc94/markdown-reference.md create mode 100644 test/testdata/schema/ghc98/markdown-reference.md diff --git a/test/testdata/schema/ghc94/markdown-reference.md b/test/testdata/schema/ghc94/markdown-reference.md new file mode 100644 index 0000000000..668323ce66 --- /dev/null +++ b/test/testdata/schema/ghc94/markdown-reference.md @@ -0,0 +1,66 @@ +## hlint +| Property | Description | Default | Allowed values | +| --- | --- | --- | --- | +| `flags` | Flags used by hlint | `TODO: Array values` |   | + +## cabal-fmt +| Property | Description | Default | Allowed values | +| --- | --- | --- | --- | +| `path` | Set path to 'cabal-fmt' executable | `"cabal-fmt"` |   | + +## ghcide-completions +| Property | Description | Default | Allowed values | +| --- | --- | --- | --- | +| `autoExtendOn` | Extends the import list automatically when completing a out-of-scope identifier | `True` |   | +| `snippetsOn` | Inserts snippets when using code completions | `True` |   | + +## eval +| Property | Description | Default | Allowed values | +| --- | --- | --- | --- | +| `exception` | Enable marking exceptions with `*** Exception:` similarly to doctest and GHCi. | `False` |   | +| `diff` | Enable the diff output (WAS/NOW) of eval lenses | `True` |   | + +## ghcide-type-lenses +| Property | Description | Default | Allowed values | +| --- | --- | --- | --- | +| `mode` | Control how type lenses are shown | `Always` |
  • Always
  • Exported
  • Diagnostics
| + +## ormolu +| Property | Description | Default | Allowed values | +| --- | --- | --- | --- | +| `external` | Call out to an external "ormolu" executable, rather than using the bundled library | `False` |   | + +## rename +| Property | Description | Default | Allowed values | +| --- | --- | --- | --- | +| `crossModule` | Enable experimental cross-module renaming | `False` |   | + +## semanticTokens +| Property | Description | Default | Allowed values | +| --- | --- | --- | --- | +| `variableToken` | LSP semantic token type to use for variables | `SemanticTokenTypes_Variable` |
  • SemanticTokenTypes_Namespace
  • SemanticTokenTypes_Type
  • SemanticTokenTypes_Class
  • SemanticTokenTypes_Enum
  • SemanticTokenTypes_Interface
  • SemanticTokenTypes_Struct
  • SemanticTokenTypes_TypeParameter
  • SemanticTokenTypes_Parameter
  • SemanticTokenTypes_Variable
  • SemanticTokenTypes_Property
  • SemanticTokenTypes_EnumMember
  • SemanticTokenTypes_Event
  • SemanticTokenTypes_Function
  • SemanticTokenTypes_Method
  • SemanticTokenTypes_Macro
  • SemanticTokenTypes_Keyword
  • SemanticTokenTypes_Modifier
  • SemanticTokenTypes_Comment
  • SemanticTokenTypes_String
  • SemanticTokenTypes_Number
  • SemanticTokenTypes_Regexp
  • SemanticTokenTypes_Operator
  • SemanticTokenTypes_Decorator
| +| `functionToken` | LSP semantic token type to use for functions | `SemanticTokenTypes_Function` |
  • SemanticTokenTypes_Namespace
  • SemanticTokenTypes_Type
  • SemanticTokenTypes_Class
  • SemanticTokenTypes_Enum
  • SemanticTokenTypes_Interface
  • SemanticTokenTypes_Struct
  • SemanticTokenTypes_TypeParameter
  • SemanticTokenTypes_Parameter
  • SemanticTokenTypes_Variable
  • SemanticTokenTypes_Property
  • SemanticTokenTypes_EnumMember
  • SemanticTokenTypes_Event
  • SemanticTokenTypes_Function
  • SemanticTokenTypes_Method
  • SemanticTokenTypes_Macro
  • SemanticTokenTypes_Keyword
  • SemanticTokenTypes_Modifier
  • SemanticTokenTypes_Comment
  • SemanticTokenTypes_String
  • SemanticTokenTypes_Number
  • SemanticTokenTypes_Regexp
  • SemanticTokenTypes_Operator
  • SemanticTokenTypes_Decorator
| +| `dataConstructorToken` | LSP semantic token type to use for data constructors | `SemanticTokenTypes_EnumMember` |
  • SemanticTokenTypes_Namespace
  • SemanticTokenTypes_Type
  • SemanticTokenTypes_Class
  • SemanticTokenTypes_Enum
  • SemanticTokenTypes_Interface
  • SemanticTokenTypes_Struct
  • SemanticTokenTypes_TypeParameter
  • SemanticTokenTypes_Parameter
  • SemanticTokenTypes_Variable
  • SemanticTokenTypes_Property
  • SemanticTokenTypes_EnumMember
  • SemanticTokenTypes_Event
  • SemanticTokenTypes_Function
  • SemanticTokenTypes_Method
  • SemanticTokenTypes_Macro
  • SemanticTokenTypes_Keyword
  • SemanticTokenTypes_Modifier
  • SemanticTokenTypes_Comment
  • SemanticTokenTypes_String
  • SemanticTokenTypes_Number
  • SemanticTokenTypes_Regexp
  • SemanticTokenTypes_Operator
  • SemanticTokenTypes_Decorator
| +| `typeVariableToken` | LSP semantic token type to use for type variables | `SemanticTokenTypes_TypeParameter` |
  • SemanticTokenTypes_Namespace
  • SemanticTokenTypes_Type
  • SemanticTokenTypes_Class
  • SemanticTokenTypes_Enum
  • SemanticTokenTypes_Interface
  • SemanticTokenTypes_Struct
  • SemanticTokenTypes_TypeParameter
  • SemanticTokenTypes_Parameter
  • SemanticTokenTypes_Variable
  • SemanticTokenTypes_Property
  • SemanticTokenTypes_EnumMember
  • SemanticTokenTypes_Event
  • SemanticTokenTypes_Function
  • SemanticTokenTypes_Method
  • SemanticTokenTypes_Macro
  • SemanticTokenTypes_Keyword
  • SemanticTokenTypes_Modifier
  • SemanticTokenTypes_Comment
  • SemanticTokenTypes_String
  • SemanticTokenTypes_Number
  • SemanticTokenTypes_Regexp
  • SemanticTokenTypes_Operator
  • SemanticTokenTypes_Decorator
| +| `classMethodToken` | LSP semantic token type to use for typeclass methods | `SemanticTokenTypes_Method` |
  • SemanticTokenTypes_Namespace
  • SemanticTokenTypes_Type
  • SemanticTokenTypes_Class
  • SemanticTokenTypes_Enum
  • SemanticTokenTypes_Interface
  • SemanticTokenTypes_Struct
  • SemanticTokenTypes_TypeParameter
  • SemanticTokenTypes_Parameter
  • SemanticTokenTypes_Variable
  • SemanticTokenTypes_Property
  • SemanticTokenTypes_EnumMember
  • SemanticTokenTypes_Event
  • SemanticTokenTypes_Function
  • SemanticTokenTypes_Method
  • SemanticTokenTypes_Macro
  • SemanticTokenTypes_Keyword
  • SemanticTokenTypes_Modifier
  • SemanticTokenTypes_Comment
  • SemanticTokenTypes_String
  • SemanticTokenTypes_Number
  • SemanticTokenTypes_Regexp
  • SemanticTokenTypes_Operator
  • SemanticTokenTypes_Decorator
| +| `patternSynonymToken` | LSP semantic token type to use for pattern synonyms | `SemanticTokenTypes_Macro` |
  • SemanticTokenTypes_Namespace
  • SemanticTokenTypes_Type
  • SemanticTokenTypes_Class
  • SemanticTokenTypes_Enum
  • SemanticTokenTypes_Interface
  • SemanticTokenTypes_Struct
  • SemanticTokenTypes_TypeParameter
  • SemanticTokenTypes_Parameter
  • SemanticTokenTypes_Variable
  • SemanticTokenTypes_Property
  • SemanticTokenTypes_EnumMember
  • SemanticTokenTypes_Event
  • SemanticTokenTypes_Function
  • SemanticTokenTypes_Method
  • SemanticTokenTypes_Macro
  • SemanticTokenTypes_Keyword
  • SemanticTokenTypes_Modifier
  • SemanticTokenTypes_Comment
  • SemanticTokenTypes_String
  • SemanticTokenTypes_Number
  • SemanticTokenTypes_Regexp
  • SemanticTokenTypes_Operator
  • SemanticTokenTypes_Decorator
| +| `typeConstructorToken` | LSP semantic token type to use for type constructors | `SemanticTokenTypes_Enum` |
  • SemanticTokenTypes_Namespace
  • SemanticTokenTypes_Type
  • SemanticTokenTypes_Class
  • SemanticTokenTypes_Enum
  • SemanticTokenTypes_Interface
  • SemanticTokenTypes_Struct
  • SemanticTokenTypes_TypeParameter
  • SemanticTokenTypes_Parameter
  • SemanticTokenTypes_Variable
  • SemanticTokenTypes_Property
  • SemanticTokenTypes_EnumMember
  • SemanticTokenTypes_Event
  • SemanticTokenTypes_Function
  • SemanticTokenTypes_Method
  • SemanticTokenTypes_Macro
  • SemanticTokenTypes_Keyword
  • SemanticTokenTypes_Modifier
  • SemanticTokenTypes_Comment
  • SemanticTokenTypes_String
  • SemanticTokenTypes_Number
  • SemanticTokenTypes_Regexp
  • SemanticTokenTypes_Operator
  • SemanticTokenTypes_Decorator
| +| `classToken` | LSP semantic token type to use for typeclasses | `SemanticTokenTypes_Class` |
  • SemanticTokenTypes_Namespace
  • SemanticTokenTypes_Type
  • SemanticTokenTypes_Class
  • SemanticTokenTypes_Enum
  • SemanticTokenTypes_Interface
  • SemanticTokenTypes_Struct
  • SemanticTokenTypes_TypeParameter
  • SemanticTokenTypes_Parameter
  • SemanticTokenTypes_Variable
  • SemanticTokenTypes_Property
  • SemanticTokenTypes_EnumMember
  • SemanticTokenTypes_Event
  • SemanticTokenTypes_Function
  • SemanticTokenTypes_Method
  • SemanticTokenTypes_Macro
  • SemanticTokenTypes_Keyword
  • SemanticTokenTypes_Modifier
  • SemanticTokenTypes_Comment
  • SemanticTokenTypes_String
  • SemanticTokenTypes_Number
  • SemanticTokenTypes_Regexp
  • SemanticTokenTypes_Operator
  • SemanticTokenTypes_Decorator
| +| `typeSynonymToken` | LSP semantic token type to use for type synonyms | `SemanticTokenTypes_Type` |
  • SemanticTokenTypes_Namespace
  • SemanticTokenTypes_Type
  • SemanticTokenTypes_Class
  • SemanticTokenTypes_Enum
  • SemanticTokenTypes_Interface
  • SemanticTokenTypes_Struct
  • SemanticTokenTypes_TypeParameter
  • SemanticTokenTypes_Parameter
  • SemanticTokenTypes_Variable
  • SemanticTokenTypes_Property
  • SemanticTokenTypes_EnumMember
  • SemanticTokenTypes_Event
  • SemanticTokenTypes_Function
  • SemanticTokenTypes_Method
  • SemanticTokenTypes_Macro
  • SemanticTokenTypes_Keyword
  • SemanticTokenTypes_Modifier
  • SemanticTokenTypes_Comment
  • SemanticTokenTypes_String
  • SemanticTokenTypes_Number
  • SemanticTokenTypes_Regexp
  • SemanticTokenTypes_Operator
  • SemanticTokenTypes_Decorator
| +| `typeFamilyToken` | LSP semantic token type to use for type families | `SemanticTokenTypes_Interface` |
  • SemanticTokenTypes_Namespace
  • SemanticTokenTypes_Type
  • SemanticTokenTypes_Class
  • SemanticTokenTypes_Enum
  • SemanticTokenTypes_Interface
  • SemanticTokenTypes_Struct
  • SemanticTokenTypes_TypeParameter
  • SemanticTokenTypes_Parameter
  • SemanticTokenTypes_Variable
  • SemanticTokenTypes_Property
  • SemanticTokenTypes_EnumMember
  • SemanticTokenTypes_Event
  • SemanticTokenTypes_Function
  • SemanticTokenTypes_Method
  • SemanticTokenTypes_Macro
  • SemanticTokenTypes_Keyword
  • SemanticTokenTypes_Modifier
  • SemanticTokenTypes_Comment
  • SemanticTokenTypes_String
  • SemanticTokenTypes_Number
  • SemanticTokenTypes_Regexp
  • SemanticTokenTypes_Operator
  • SemanticTokenTypes_Decorator
| +| `recordFieldToken` | LSP semantic token type to use for record fields | `SemanticTokenTypes_Property` |
  • SemanticTokenTypes_Namespace
  • SemanticTokenTypes_Type
  • SemanticTokenTypes_Class
  • SemanticTokenTypes_Enum
  • SemanticTokenTypes_Interface
  • SemanticTokenTypes_Struct
  • SemanticTokenTypes_TypeParameter
  • SemanticTokenTypes_Parameter
  • SemanticTokenTypes_Variable
  • SemanticTokenTypes_Property
  • SemanticTokenTypes_EnumMember
  • SemanticTokenTypes_Event
  • SemanticTokenTypes_Function
  • SemanticTokenTypes_Method
  • SemanticTokenTypes_Macro
  • SemanticTokenTypes_Keyword
  • SemanticTokenTypes_Modifier
  • SemanticTokenTypes_Comment
  • SemanticTokenTypes_String
  • SemanticTokenTypes_Number
  • SemanticTokenTypes_Regexp
  • SemanticTokenTypes_Operator
  • SemanticTokenTypes_Decorator
| +| `operatorToken` | LSP semantic token type to use for operators | `SemanticTokenTypes_Operator` |
  • SemanticTokenTypes_Namespace
  • SemanticTokenTypes_Type
  • SemanticTokenTypes_Class
  • SemanticTokenTypes_Enum
  • SemanticTokenTypes_Interface
  • SemanticTokenTypes_Struct
  • SemanticTokenTypes_TypeParameter
  • SemanticTokenTypes_Parameter
  • SemanticTokenTypes_Variable
  • SemanticTokenTypes_Property
  • SemanticTokenTypes_EnumMember
  • SemanticTokenTypes_Event
  • SemanticTokenTypes_Function
  • SemanticTokenTypes_Method
  • SemanticTokenTypes_Macro
  • SemanticTokenTypes_Keyword
  • SemanticTokenTypes_Modifier
  • SemanticTokenTypes_Comment
  • SemanticTokenTypes_String
  • SemanticTokenTypes_Number
  • SemanticTokenTypes_Regexp
  • SemanticTokenTypes_Operator
  • SemanticTokenTypes_Decorator
| +| `moduleToken` | LSP semantic token type to use for modules | `SemanticTokenTypes_Namespace` |
  • SemanticTokenTypes_Namespace
  • SemanticTokenTypes_Type
  • SemanticTokenTypes_Class
  • SemanticTokenTypes_Enum
  • SemanticTokenTypes_Interface
  • SemanticTokenTypes_Struct
  • SemanticTokenTypes_TypeParameter
  • SemanticTokenTypes_Parameter
  • SemanticTokenTypes_Variable
  • SemanticTokenTypes_Property
  • SemanticTokenTypes_EnumMember
  • SemanticTokenTypes_Event
  • SemanticTokenTypes_Function
  • SemanticTokenTypes_Method
  • SemanticTokenTypes_Macro
  • SemanticTokenTypes_Keyword
  • SemanticTokenTypes_Modifier
  • SemanticTokenTypes_Comment
  • SemanticTokenTypes_String
  • SemanticTokenTypes_Number
  • SemanticTokenTypes_Regexp
  • SemanticTokenTypes_Operator
  • SemanticTokenTypes_Decorator
| + +## fourmolu +| Property | Description | Default | Allowed values | +| --- | --- | --- | --- | +| `external` | Call out to an external "fourmolu" executable, rather than using the bundled library. | `False` |   | +| `path` | Set path to executable (for "external" mode). | `"fourmolu"` |   | + +## cabal-gild +| Property | Description | Default | Allowed values | +| --- | --- | --- | --- | +| `path` | Set path to 'cabal-gild' executable | `"cabal-gild"` |   | + + diff --git a/test/testdata/schema/ghc98/markdown-reference.md b/test/testdata/schema/ghc98/markdown-reference.md new file mode 100644 index 0000000000..668323ce66 --- /dev/null +++ b/test/testdata/schema/ghc98/markdown-reference.md @@ -0,0 +1,66 @@ +## hlint +| Property | Description | Default | Allowed values | +| --- | --- | --- | --- | +| `flags` | Flags used by hlint | `TODO: Array values` |   | + +## cabal-fmt +| Property | Description | Default | Allowed values | +| --- | --- | --- | --- | +| `path` | Set path to 'cabal-fmt' executable | `"cabal-fmt"` |   | + +## ghcide-completions +| Property | Description | Default | Allowed values | +| --- | --- | --- | --- | +| `autoExtendOn` | Extends the import list automatically when completing a out-of-scope identifier | `True` |   | +| `snippetsOn` | Inserts snippets when using code completions | `True` |   | + +## eval +| Property | Description | Default | Allowed values | +| --- | --- | --- | --- | +| `exception` | Enable marking exceptions with `*** Exception:` similarly to doctest and GHCi. | `False` |   | +| `diff` | Enable the diff output (WAS/NOW) of eval lenses | `True` |   | + +## ghcide-type-lenses +| Property | Description | Default | Allowed values | +| --- | --- | --- | --- | +| `mode` | Control how type lenses are shown | `Always` |
  • Always
  • Exported
  • Diagnostics
| + +## ormolu +| Property | Description | Default | Allowed values | +| --- | --- | --- | --- | +| `external` | Call out to an external "ormolu" executable, rather than using the bundled library | `False` |   | + +## rename +| Property | Description | Default | Allowed values | +| --- | --- | --- | --- | +| `crossModule` | Enable experimental cross-module renaming | `False` |   | + +## semanticTokens +| Property | Description | Default | Allowed values | +| --- | --- | --- | --- | +| `variableToken` | LSP semantic token type to use for variables | `SemanticTokenTypes_Variable` |
  • SemanticTokenTypes_Namespace
  • SemanticTokenTypes_Type
  • SemanticTokenTypes_Class
  • SemanticTokenTypes_Enum
  • SemanticTokenTypes_Interface
  • SemanticTokenTypes_Struct
  • SemanticTokenTypes_TypeParameter
  • SemanticTokenTypes_Parameter
  • SemanticTokenTypes_Variable
  • SemanticTokenTypes_Property
  • SemanticTokenTypes_EnumMember
  • SemanticTokenTypes_Event
  • SemanticTokenTypes_Function
  • SemanticTokenTypes_Method
  • SemanticTokenTypes_Macro
  • SemanticTokenTypes_Keyword
  • SemanticTokenTypes_Modifier
  • SemanticTokenTypes_Comment
  • SemanticTokenTypes_String
  • SemanticTokenTypes_Number
  • SemanticTokenTypes_Regexp
  • SemanticTokenTypes_Operator
  • SemanticTokenTypes_Decorator
| +| `functionToken` | LSP semantic token type to use for functions | `SemanticTokenTypes_Function` |
  • SemanticTokenTypes_Namespace
  • SemanticTokenTypes_Type
  • SemanticTokenTypes_Class
  • SemanticTokenTypes_Enum
  • SemanticTokenTypes_Interface
  • SemanticTokenTypes_Struct
  • SemanticTokenTypes_TypeParameter
  • SemanticTokenTypes_Parameter
  • SemanticTokenTypes_Variable
  • SemanticTokenTypes_Property
  • SemanticTokenTypes_EnumMember
  • SemanticTokenTypes_Event
  • SemanticTokenTypes_Function
  • SemanticTokenTypes_Method
  • SemanticTokenTypes_Macro
  • SemanticTokenTypes_Keyword
  • SemanticTokenTypes_Modifier
  • SemanticTokenTypes_Comment
  • SemanticTokenTypes_String
  • SemanticTokenTypes_Number
  • SemanticTokenTypes_Regexp
  • SemanticTokenTypes_Operator
  • SemanticTokenTypes_Decorator
| +| `dataConstructorToken` | LSP semantic token type to use for data constructors | `SemanticTokenTypes_EnumMember` |
  • SemanticTokenTypes_Namespace
  • SemanticTokenTypes_Type
  • SemanticTokenTypes_Class
  • SemanticTokenTypes_Enum
  • SemanticTokenTypes_Interface
  • SemanticTokenTypes_Struct
  • SemanticTokenTypes_TypeParameter
  • SemanticTokenTypes_Parameter
  • SemanticTokenTypes_Variable
  • SemanticTokenTypes_Property
  • SemanticTokenTypes_EnumMember
  • SemanticTokenTypes_Event
  • SemanticTokenTypes_Function
  • SemanticTokenTypes_Method
  • SemanticTokenTypes_Macro
  • SemanticTokenTypes_Keyword
  • SemanticTokenTypes_Modifier
  • SemanticTokenTypes_Comment
  • SemanticTokenTypes_String
  • SemanticTokenTypes_Number
  • SemanticTokenTypes_Regexp
  • SemanticTokenTypes_Operator
  • SemanticTokenTypes_Decorator
| +| `typeVariableToken` | LSP semantic token type to use for type variables | `SemanticTokenTypes_TypeParameter` |
  • SemanticTokenTypes_Namespace
  • SemanticTokenTypes_Type
  • SemanticTokenTypes_Class
  • SemanticTokenTypes_Enum
  • SemanticTokenTypes_Interface
  • SemanticTokenTypes_Struct
  • SemanticTokenTypes_TypeParameter
  • SemanticTokenTypes_Parameter
  • SemanticTokenTypes_Variable
  • SemanticTokenTypes_Property
  • SemanticTokenTypes_EnumMember
  • SemanticTokenTypes_Event
  • SemanticTokenTypes_Function
  • SemanticTokenTypes_Method
  • SemanticTokenTypes_Macro
  • SemanticTokenTypes_Keyword
  • SemanticTokenTypes_Modifier
  • SemanticTokenTypes_Comment
  • SemanticTokenTypes_String
  • SemanticTokenTypes_Number
  • SemanticTokenTypes_Regexp
  • SemanticTokenTypes_Operator
  • SemanticTokenTypes_Decorator
| +| `classMethodToken` | LSP semantic token type to use for typeclass methods | `SemanticTokenTypes_Method` |
  • SemanticTokenTypes_Namespace
  • SemanticTokenTypes_Type
  • SemanticTokenTypes_Class
  • SemanticTokenTypes_Enum
  • SemanticTokenTypes_Interface
  • SemanticTokenTypes_Struct
  • SemanticTokenTypes_TypeParameter
  • SemanticTokenTypes_Parameter
  • SemanticTokenTypes_Variable
  • SemanticTokenTypes_Property
  • SemanticTokenTypes_EnumMember
  • SemanticTokenTypes_Event
  • SemanticTokenTypes_Function
  • SemanticTokenTypes_Method
  • SemanticTokenTypes_Macro
  • SemanticTokenTypes_Keyword
  • SemanticTokenTypes_Modifier
  • SemanticTokenTypes_Comment
  • SemanticTokenTypes_String
  • SemanticTokenTypes_Number
  • SemanticTokenTypes_Regexp
  • SemanticTokenTypes_Operator
  • SemanticTokenTypes_Decorator
| +| `patternSynonymToken` | LSP semantic token type to use for pattern synonyms | `SemanticTokenTypes_Macro` |
  • SemanticTokenTypes_Namespace
  • SemanticTokenTypes_Type
  • SemanticTokenTypes_Class
  • SemanticTokenTypes_Enum
  • SemanticTokenTypes_Interface
  • SemanticTokenTypes_Struct
  • SemanticTokenTypes_TypeParameter
  • SemanticTokenTypes_Parameter
  • SemanticTokenTypes_Variable
  • SemanticTokenTypes_Property
  • SemanticTokenTypes_EnumMember
  • SemanticTokenTypes_Event
  • SemanticTokenTypes_Function
  • SemanticTokenTypes_Method
  • SemanticTokenTypes_Macro
  • SemanticTokenTypes_Keyword
  • SemanticTokenTypes_Modifier
  • SemanticTokenTypes_Comment
  • SemanticTokenTypes_String
  • SemanticTokenTypes_Number
  • SemanticTokenTypes_Regexp
  • SemanticTokenTypes_Operator
  • SemanticTokenTypes_Decorator
| +| `typeConstructorToken` | LSP semantic token type to use for type constructors | `SemanticTokenTypes_Enum` |
  • SemanticTokenTypes_Namespace
  • SemanticTokenTypes_Type
  • SemanticTokenTypes_Class
  • SemanticTokenTypes_Enum
  • SemanticTokenTypes_Interface
  • SemanticTokenTypes_Struct
  • SemanticTokenTypes_TypeParameter
  • SemanticTokenTypes_Parameter
  • SemanticTokenTypes_Variable
  • SemanticTokenTypes_Property
  • SemanticTokenTypes_EnumMember
  • SemanticTokenTypes_Event
  • SemanticTokenTypes_Function
  • SemanticTokenTypes_Method
  • SemanticTokenTypes_Macro
  • SemanticTokenTypes_Keyword
  • SemanticTokenTypes_Modifier
  • SemanticTokenTypes_Comment
  • SemanticTokenTypes_String
  • SemanticTokenTypes_Number
  • SemanticTokenTypes_Regexp
  • SemanticTokenTypes_Operator
  • SemanticTokenTypes_Decorator
| +| `classToken` | LSP semantic token type to use for typeclasses | `SemanticTokenTypes_Class` |
  • SemanticTokenTypes_Namespace
  • SemanticTokenTypes_Type
  • SemanticTokenTypes_Class
  • SemanticTokenTypes_Enum
  • SemanticTokenTypes_Interface
  • SemanticTokenTypes_Struct
  • SemanticTokenTypes_TypeParameter
  • SemanticTokenTypes_Parameter
  • SemanticTokenTypes_Variable
  • SemanticTokenTypes_Property
  • SemanticTokenTypes_EnumMember
  • SemanticTokenTypes_Event
  • SemanticTokenTypes_Function
  • SemanticTokenTypes_Method
  • SemanticTokenTypes_Macro
  • SemanticTokenTypes_Keyword
  • SemanticTokenTypes_Modifier
  • SemanticTokenTypes_Comment
  • SemanticTokenTypes_String
  • SemanticTokenTypes_Number
  • SemanticTokenTypes_Regexp
  • SemanticTokenTypes_Operator
  • SemanticTokenTypes_Decorator
| +| `typeSynonymToken` | LSP semantic token type to use for type synonyms | `SemanticTokenTypes_Type` |
  • SemanticTokenTypes_Namespace
  • SemanticTokenTypes_Type
  • SemanticTokenTypes_Class
  • SemanticTokenTypes_Enum
  • SemanticTokenTypes_Interface
  • SemanticTokenTypes_Struct
  • SemanticTokenTypes_TypeParameter
  • SemanticTokenTypes_Parameter
  • SemanticTokenTypes_Variable
  • SemanticTokenTypes_Property
  • SemanticTokenTypes_EnumMember
  • SemanticTokenTypes_Event
  • SemanticTokenTypes_Function
  • SemanticTokenTypes_Method
  • SemanticTokenTypes_Macro
  • SemanticTokenTypes_Keyword
  • SemanticTokenTypes_Modifier
  • SemanticTokenTypes_Comment
  • SemanticTokenTypes_String
  • SemanticTokenTypes_Number
  • SemanticTokenTypes_Regexp
  • SemanticTokenTypes_Operator
  • SemanticTokenTypes_Decorator
| +| `typeFamilyToken` | LSP semantic token type to use for type families | `SemanticTokenTypes_Interface` |
  • SemanticTokenTypes_Namespace
  • SemanticTokenTypes_Type
  • SemanticTokenTypes_Class
  • SemanticTokenTypes_Enum
  • SemanticTokenTypes_Interface
  • SemanticTokenTypes_Struct
  • SemanticTokenTypes_TypeParameter
  • SemanticTokenTypes_Parameter
  • SemanticTokenTypes_Variable
  • SemanticTokenTypes_Property
  • SemanticTokenTypes_EnumMember
  • SemanticTokenTypes_Event
  • SemanticTokenTypes_Function
  • SemanticTokenTypes_Method
  • SemanticTokenTypes_Macro
  • SemanticTokenTypes_Keyword
  • SemanticTokenTypes_Modifier
  • SemanticTokenTypes_Comment
  • SemanticTokenTypes_String
  • SemanticTokenTypes_Number
  • SemanticTokenTypes_Regexp
  • SemanticTokenTypes_Operator
  • SemanticTokenTypes_Decorator
| +| `recordFieldToken` | LSP semantic token type to use for record fields | `SemanticTokenTypes_Property` |
  • SemanticTokenTypes_Namespace
  • SemanticTokenTypes_Type
  • SemanticTokenTypes_Class
  • SemanticTokenTypes_Enum
  • SemanticTokenTypes_Interface
  • SemanticTokenTypes_Struct
  • SemanticTokenTypes_TypeParameter
  • SemanticTokenTypes_Parameter
  • SemanticTokenTypes_Variable
  • SemanticTokenTypes_Property
  • SemanticTokenTypes_EnumMember
  • SemanticTokenTypes_Event
  • SemanticTokenTypes_Function
  • SemanticTokenTypes_Method
  • SemanticTokenTypes_Macro
  • SemanticTokenTypes_Keyword
  • SemanticTokenTypes_Modifier
  • SemanticTokenTypes_Comment
  • SemanticTokenTypes_String
  • SemanticTokenTypes_Number
  • SemanticTokenTypes_Regexp
  • SemanticTokenTypes_Operator
  • SemanticTokenTypes_Decorator
| +| `operatorToken` | LSP semantic token type to use for operators | `SemanticTokenTypes_Operator` |
  • SemanticTokenTypes_Namespace
  • SemanticTokenTypes_Type
  • SemanticTokenTypes_Class
  • SemanticTokenTypes_Enum
  • SemanticTokenTypes_Interface
  • SemanticTokenTypes_Struct
  • SemanticTokenTypes_TypeParameter
  • SemanticTokenTypes_Parameter
  • SemanticTokenTypes_Variable
  • SemanticTokenTypes_Property
  • SemanticTokenTypes_EnumMember
  • SemanticTokenTypes_Event
  • SemanticTokenTypes_Function
  • SemanticTokenTypes_Method
  • SemanticTokenTypes_Macro
  • SemanticTokenTypes_Keyword
  • SemanticTokenTypes_Modifier
  • SemanticTokenTypes_Comment
  • SemanticTokenTypes_String
  • SemanticTokenTypes_Number
  • SemanticTokenTypes_Regexp
  • SemanticTokenTypes_Operator
  • SemanticTokenTypes_Decorator
| +| `moduleToken` | LSP semantic token type to use for modules | `SemanticTokenTypes_Namespace` |
  • SemanticTokenTypes_Namespace
  • SemanticTokenTypes_Type
  • SemanticTokenTypes_Class
  • SemanticTokenTypes_Enum
  • SemanticTokenTypes_Interface
  • SemanticTokenTypes_Struct
  • SemanticTokenTypes_TypeParameter
  • SemanticTokenTypes_Parameter
  • SemanticTokenTypes_Variable
  • SemanticTokenTypes_Property
  • SemanticTokenTypes_EnumMember
  • SemanticTokenTypes_Event
  • SemanticTokenTypes_Function
  • SemanticTokenTypes_Method
  • SemanticTokenTypes_Macro
  • SemanticTokenTypes_Keyword
  • SemanticTokenTypes_Modifier
  • SemanticTokenTypes_Comment
  • SemanticTokenTypes_String
  • SemanticTokenTypes_Number
  • SemanticTokenTypes_Regexp
  • SemanticTokenTypes_Operator
  • SemanticTokenTypes_Decorator
| + +## fourmolu +| Property | Description | Default | Allowed values | +| --- | --- | --- | --- | +| `external` | Call out to an external "fourmolu" executable, rather than using the bundled library. | `False` |   | +| `path` | Set path to executable (for "external" mode). | `"fourmolu"` |   | + +## cabal-gild +| Property | Description | Default | Allowed values | +| --- | --- | --- | --- | +| `path` | Set path to 'cabal-gild' executable | `"cabal-gild"` |   | + +