Skip to content

Commit 3d80afa

Browse files
committed
Set diagnostics source to cabal
1 parent 1932674 commit 3d80afa

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

plugins/hls-cabal-plugin/src/Ide/Plugin/Cabal/Diagnostics.hs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{-# LANGUAGE DuplicateRecordFields #-}
22
{-# LANGUAGE TupleSections #-}
3+
{-# LANGUAGE OverloadedStrings #-}
34
module Ide.Plugin.Cabal.Diagnostics
45
( errorDiagnostic
56
, warningDiagnostic
@@ -23,14 +24,14 @@ import Language.LSP.Types (Diagnostic (..),
2324
-- | Produce a diagnostic from a Cabal parser error
2425
errorDiagnostic :: NormalizedFilePath -> Lib.PError -> FileDiagnostic
2526
errorDiagnostic fp err@(Lib.PError pos _) =
26-
mkDiag fp (T.pack "parsing") DsError (toBeginningOfNextLine pos) msg
27+
mkDiag fp "cabal" DsError (toBeginningOfNextLine pos) msg
2728
where
2829
msg = T.pack $ showPError (fromNormalizedFilePath fp) err
2930

3031
-- | Produce a diagnostic from a Cabal parser warning
3132
warningDiagnostic :: NormalizedFilePath -> Lib.PWarning -> FileDiagnostic
3233
warningDiagnostic fp warning@(Lib.PWarning _ pos _) =
33-
mkDiag fp (T.pack "parsing") DsWarning (toBeginningOfNextLine pos) msg
34+
mkDiag fp "cabal" DsWarning (toBeginningOfNextLine pos) msg
3435
where
3536
msg = T.pack $ showPWarning (fromNormalizedFilePath fp) warning
3637

0 commit comments

Comments
 (0)