Skip to content

Commit

Permalink
Initial Retrie plugin
Browse files Browse the repository at this point in the history
Supports RULES, functions and type synonyms

Future work:

- Handling names properly (when retrie/#10 is fixed)
- Suggestions for pattern synonyms (when retrie/#15 is released)
- Refactorings: rename, extract, move, etc..
- Automatically add imports when unfolding
- Proper support for workspace folders
  • Loading branch information
pepeiborra committed Aug 1, 2020
1 parent e70d7e8 commit 9b18606
Show file tree
Hide file tree
Showing 3 changed files with 538 additions and 1 deletion.
4 changes: 3 additions & 1 deletion exe/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ import Ide.Plugin.GhcIde as GhcIde
import Ide.Plugin.Floskell as Floskell
import Ide.Plugin.Ormolu as Ormolu
import Ide.Plugin.StylishHaskell as StylishHaskell
import Ide.Plugin.Retrie as Retrie
#if AGPL
import Ide.Plugin.Brittany as Brittany
#endif
Expand Down Expand Up @@ -105,6 +106,7 @@ idePlugins includeExamples = pluginDescToIdePlugins allPlugins
-- , ghcmodDescriptor "ghcmod"
, Ormolu.descriptor "ormolu"
, StylishHaskell.descriptor "stylish-haskell"
, Retrie.descriptor "retrie"
#if AGPL
, Brittany.descriptor "brittany"
#endif
Expand Down Expand Up @@ -143,7 +145,7 @@ main = do
runLspMode :: LspArguments -> IO ()
runLspMode lspArgs@LspArguments {..} = do
LSP.setupLogger argsLogFile ["hls", "hie-bios"]
$ if argsDebugOn then L.DEBUG else L.INFO
$ L.DEBUG -- if argsDebugOn then L.DEBUG else L.INFO

-- lock to avoid overlapping output on stdout
lock <- newLock
Expand Down
3 changes: 3 additions & 0 deletions haskell-language-server.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ library
Ide.Plugin.GhcIde
Ide.Plugin.Ormolu
Ide.Plugin.Pragmas
Ide.Plugin.Retrie
Ide.Plugin.Floskell
Ide.Plugin.Formatter
Ide.Plugin.StylishHaskell
Expand Down Expand Up @@ -83,6 +84,8 @@ library
, optparse-simple
, process
, regex-tdfa >= 1.3.1.0
, retrie >= 0.1.1.0
, safe-exceptions
, shake >= 0.17.5
, stylish-haskell == 0.11.*
, temporary
Expand Down
Loading

0 comments on commit 9b18606

Please sign in to comment.