Skip to content

Commit a4dee2d

Browse files
committed
Do not override custom user commands
1 parent 6d1f1a5 commit a4dee2d

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

ghcide/src/Development/IDE/Main.hs

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -81,20 +81,20 @@ import System.Time.Extra (offsetTime,
8181
import Text.Printf (printf)
8282

8383
data Arguments = Arguments
84-
{ argsOTMemoryProfiling :: Bool
85-
, argFiles :: Maybe [FilePath] -- ^ Nothing: lsp server ; Just: typecheck and exit
86-
, argsLogger :: IO Logger
87-
, argsRules :: Rules ()
88-
, argsHlsPlugins :: IdePlugins IdeState
89-
, argsGhcidePlugin :: Plugin Config -- ^ Deprecated
84+
{ argsOTMemoryProfiling :: Bool
85+
, argFiles :: Maybe [FilePath] -- ^ Nothing: lsp server ; Just: typecheck and exit
86+
, argsLogger :: IO Logger
87+
, argsRules :: Rules ()
88+
, argsHlsPlugins :: IdePlugins IdeState
89+
, argsGhcidePlugin :: Plugin Config -- ^ Deprecated
9090
, argsSessionLoadingOptions :: SessionLoadingOptions
91-
, argsIdeOptions :: Config -> Action IdeGhcSession -> IdeOptions
92-
, argsLspOptions :: LSP.Options
93-
, argsDefaultHlsConfig :: Config
94-
, argsGetHieDbLoc :: FilePath -> IO FilePath -- ^ Map project roots to the location of the hiedb for the project
95-
, argsDebouncer :: IO (Debouncer NormalizedUri) -- ^ Debouncer used for diagnostics
96-
, argsHandleIn :: IO Handle
97-
, argsHandleOut :: IO Handle
91+
, argsIdeOptions :: Config -> Action IdeGhcSession -> IdeOptions
92+
, argsLspOptions :: LSP.Options
93+
, argsDefaultHlsConfig :: Config
94+
, argsGetHieDbLoc :: FilePath -> IO FilePath -- ^ Map project roots to the location of the hiedb for the project
95+
, argsDebouncer :: IO (Debouncer NormalizedUri) -- ^ Debouncer used for diagnostics
96+
, argsHandleIn :: IO Handle
97+
, argsHandleOut :: IO Handle
9898
}
9999

100100
instance Default Arguments where
@@ -145,7 +145,7 @@ defaultMain Arguments{..} = do
145145
let hlsPlugin = asGhcIdePlugin argsHlsPlugins
146146
hlsCommands = allLspCmdIds' pid argsHlsPlugins
147147
plugins = hlsPlugin <> argsGhcidePlugin
148-
options = argsLspOptions { LSP.executeCommandCommands = Just hlsCommands }
148+
options = argsLspOptions { LSP.executeCommandCommands = Just $ (argsLspOptions LSP.executeCommandCommands) <> hlsCommands }
149149
argsOnConfigChange = getConfigFromNotification
150150
rules = argsRules >> pluginRules plugins
151151

0 commit comments

Comments
 (0)