Skip to content

Commit 80fbec9

Browse files
committed
Merge branch 'master' of https://github.com/haskell/haskell-language-server into call-hierarchy-fix
2 parents 75ed9cd + 0a6c872 commit 80fbec9

File tree

6 files changed

+29
-1
lines changed

6 files changed

+29
-1
lines changed

FUNDING.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
open_collective: haskell-language-server

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -773,6 +773,8 @@ it to look for the right executable.
773773
:heart: The Haskell tooling dream is near, we need your help! :heart:
774774
775775
- Join [our IRC channel](https://web.libera.chat/?channels=#haskell-language-server) at `#haskell-language-server` on [`libera`](https://libera.chat/).
776+
- Follow the [Haskell IDE team twitter account](https://twitter.com/IdeHaskell) for updates and help.
777+
- Join the [#haskell-tooling channel](https://discord.com/channels/280033776820813825/505370075402862594/808027763868827659) in the Functional Programming discord server. You can join the server via [this invitation](https://discord.gg/9spEdTNGrD).
776778
777779
### Style guidelines
778780
@@ -873,3 +875,7 @@ This will typically provide instructions for how to support new languages.
873875
874876
In some cases you may need to write a small bit of additional client support, or expose a way for the user to set the server's [configuration options](#configuring-haskell-language-server) and
875877
for them to configure how the server is started.
878+
879+
### Sponsorship
880+
881+
If you want to contribute financially you can do so via [open-collective](https://opencollective.com/haskell-language-server). In the past the funding has been used to sponsor [summer student projects](https://mpickering.github.io/ide/posts/2021-07-22-summer-of-hls.html).

plugins/hls-pragmas-plugin/src/Ide/Plugin/Pragmas.hs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,16 @@ suggest dflags diag =
8181

8282
suggestDisableWarning :: Diagnostic -> [PragmaEdit]
8383
suggestDisableWarning Diagnostic {_code}
84-
| Just (J.InR (T.stripPrefix "-W" -> Just w)) <- _code =
84+
| Just (J.InR (T.stripPrefix "-W" -> Just w)) <- _code
85+
, w `notElem` warningBlacklist =
8586
pure ("Disable \"" <> w <> "\" warnings", OptGHC w)
8687
| otherwise = []
8788

89+
-- Don't suggest disabling type errors as a solution to all type errors
90+
warningBlacklist :: [T.Text]
91+
-- warningBlacklist = []
92+
warningBlacklist = ["deferred-type-errors"]
93+
8894
-- ---------------------------------------------------------------------
8995

9096
-- | Offer to add a missing Language Pragma to the top of a file.

plugins/hls-pragmas-plugin/test/Main.hs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,13 @@ codeActionTests =
123123
cas <- map fromAction <$> getAllCodeActions doc
124124
liftIO $ "Disable \"unused-imports\" warnings" `elem` map (^. L.title) cas @? "Contains unused-imports code action"
125125
executeCodeAction $ head cas
126+
127+
, goldenWithPragmas "doesn't suggest disabling type errors" "DeferredTypeErrors" $ \doc -> do
128+
129+
_ <- waitForDiagnosticsFrom doc
130+
cas <- map fromAction <$> getAllCodeActions doc
131+
liftIO $ "Disable \"deferred-type-errors\" warnings" `notElem` map (^. L.title) cas @? "Doesn't contain deferred-type-errors code action"
132+
liftIO $ length cas == 0 @? "Expected no code actions, but got: " <> show cas
126133
]
127134

128135
completionTests :: TestTree
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module DeferredTypeErrors where
2+
3+
foo :: Int
4+
foo = ()
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module DeferredTypeErrors where
2+
3+
foo :: Int
4+
foo = ()

0 commit comments

Comments
 (0)