Skip to content

Commit c3c5d2b

Browse files
committed
Keep plugin id of cabal-fmt in sync with default config id
Add documentation to note that these values are to be kept in sync
1 parent e3a7df6 commit c3c5d2b

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

hls-plugin-api/src/Ide/Types.hs

+1
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,7 @@ instance Default Config where
200200
-- , formattingProvider = "floskell"
201201
-- , formattingProvider = "stylish-haskell"
202202
, cabalFormattingProvider = "cabal-fmt"
203+
-- this string value needs to kept in sync with the value provided in HlsPlugins
203204
, maxCompletions = 40
204205
, plugins = mempty
205206
}

src/HlsPlugins.hs

+3-1
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,9 @@ idePlugins recorder = pluginDescToIdePlugins allPlugins
161161
let pId = "fourmolu" in Fourmolu.descriptor (pluginRecorder pId) pId:
162162
#endif
163163
#if hls_cabalfmt
164-
let pId = "cabalfmt" in CabalFmt.descriptor (pluginRecorder pId) pId:
164+
-- this pId needs to be kept in sync with the hardcoded
165+
-- cabalFormattingProvider in the Default Config
166+
let pId = "cabal-fmt" in CabalFmt.descriptor (pluginRecorder pId) pId:
165167
#endif
166168
#if hls_tactic
167169
let pId = "tactics" in Tactic.descriptor (pluginRecorder pId) pId:

0 commit comments

Comments
 (0)