* Faster completions
* optimize withProgressVar
We never remove elements from the map so alter is unnecesary
* [ghcide-bench] accept ghcide options
* Expand completion tests suite
* hlints
* completions for local foreign decls
* Minor improvements for local completions
* Restore completion docs in legacy code path
* Compatibility with GHC < 8.8
* fix merge issue
* address review feedback
* Initial benchmark suite, reusing ideas from Neil's post
https://neilmitchell.blogspot.com/2020/05/fixing-space-leaks-in-ghcide.html
* Add an experiment for code actions without edit
* formatting
* fix code actions bench script
* error handling + options + how to run
* extract Positions and clean up imports
(Neil's review feedback)
* replace with Extra.duration
* allow ImplicitParams
* add bench to the cradle
* applied @mpickering review feedback
* clean up after benchmark
* remove TODO
* [#518] Build ghcide with GHC 8.10.1
Resolves#518
* Move CPP logic to the Compat module
* Revert changes to mkHieFile
* Add local fork of HieAst for 8.10.1
The fix for mkHieFile didn't make it into 8.10.1, so the override is still needed
* Ignore hlint in src-ghc810/HieAst.hs
* Whitelist CPP for Development.IDE.GHC.Orphans
* [#518] Build ghcide with GHC 8.10.1
Resolves#518
* Move CPP logic to the Compat module
* Revert changes to mkHieFile
* Add local fork of HieAst for 8.10.1
The fix for mkHieFile didn't make it into 8.10.1, so the override is still needed
* Ignore hlint in src-ghc810/HieAst.hs
* Whitelist CPP for Development.IDE.GHC.Orphans
* Plugin tests known broken in 8.10.1 (#556)
* Bump up ghc-check version
Co-authored-by: Pepe Iborra <pepeiborra@gmail.com>
Co-authored-by: pepe iborra <pepeiborra@gmail.com>
* Add a custom prefix to command IDs
A client can run more than one instance of ghcide. Some clients have a global
command registry, and all commands must be unique in that registry.
So to make the command ids unique, prefix them with the ghcide server process
id, as is done in haskell-ide-engine.
* Use same command naming scheme as in haskell-language-server
To ease interoperability
* Use makeLspCommandId for prefixing commands
This puts all the prefixing logic in one place.
* Add hlint exception for CPP in Development.IDE.Compat
* Bring in Win32 dependency for windows build
* Create rule to get ModSummary without parsing entire source file
* Load file source from disk if not available in memory
* Fix build after cherry pick
* Couple of fixes
- extract getModSummaryFromImports and fix diagnostics
- replace GetParsedModule by GetModSummary where possible
There is only one usage of GetParsedModule left, and that is in GetSpanInfos
for documentation. This the wrong approach, docs should be loaded from
interface files and not from sources. TODO
* Fix watched file tests
Progress notifications are not being sent anymore
* Compat with GHC 8.6
* Avoid parsing source files for completions and documentation
Instead, embed haddocks in interface files
* Allow CPP in module
* Force things after parsing in order to release buffers
* avoid holding on to stringbuffer unnecessarily
* Skip unnecessary file contents read
* Drop HscEnv requirement
* Add comments on forcing things
* Add comments on GHC_LIB restriction
* Parse files of interest twice to capture Haddock errors
If Opt_Haddock is not enabled we parse twice to capture Haddock parse errors
* Parallelize two-pass parsing
* Update src/Development/IDE/Core/Compile.hs
Co-authored-by: Marcelo Lazaroni <lazaronijunior@gmail.com>
Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
* Show kinds in hover
* Documentation on hover
* Enable kind tests
* Fix tests
* Print literals
* Show (some) overloaded literals
* Fix for 8.4
* Fix tests
* Do not consider literals for definitions
* Suggestions by @cocreature
* No warning for 8.4
* More fixes for 8.4
* Make it work with ghc-lib
* More fixes for warnings when compiled with ghc-lib
* More fixes to build in ghc-lib
* Try once again to build with ghc-lib
* More fixes for ghc-lib
* Fix warning with ghc-lib
This fixes an issue that we encountered in DAML. I’ll add a test for
this in the DAML repo since we cannot test the ghc-lib codepath
here (since we don’t setup an environment that works).
* Remove JSON instances for completions, since we are not implementing "resolve"
* Remove completion resolve data from tests
* Better docs
* Fix tests
* Fix for 8.4
* Turn Haddock markup into Markdown
* Add types to completion items
* Make it work on 8.8 and 8.4
* Revert "Remove completion resolve data from tests"
This reverts commit 625d710f11.
* Revert "Remove JSON instances for completions, since we are not implementing "resolve""
This reverts commit 12ff27dce7.
* Fix tests
* Require higher version of regex-pcre-builtin
* Replace Pandoc with direct conversion from Haddock to Markdown
* Show kinds of type constructors too
* A few fixed to Markdown conversion
* Check optNewColonConvention
* Fix build on 8.4 and 8.8
* More fixes for 8.4 and 8.8
* Check only the common part of the completion text
* Make icons consistent with Outline
* Test docs for completions
* Make constructors return the corresponding CompletionItem + tests for that behavior
* Make test work on 8.4
* Add code action for filling type holes
* Incorporate hole name into action title
Useful if more than one hole appears on the same line. Not so useful
if both of these holes are just `_` rather than `_name` (or more than
one hole on the same line has the same `_name`): In which case perhaps
some numbers could be attached to the action titles, to distinguish
the holes. But I suspect that this would not be worth the effort.
* Add tests for fill-type-hole actions
* Disable two tests on GHC 8.4
These test hints about local bindings, whic GHC 8.4 does not provide.
* Replace compilerVersion with new MIN_GHC_API_VERSION macro