Commit Graph

325 Commits

Author SHA1 Message Date
Alejandro Serrano
7f3b0f6dba Code lens for missing signatures (#224)
* Code lens for missing signatures

* Fix tests

* Implement suggestions by @cocreature
2019-12-09 16:32:10 +01:00
Pepe Iborra
5091a1d202 Fix horrible path normalisation issue (#225) 2019-12-08 17:07:15 +01:00
Neil Mitchell
e78e1638ea Remove all extra-deps now they are all on Hackage (#223) 2019-12-07 23:44:00 +01:00
tomjaguarpaw
876df26c6a Clarify that eglot requires Emacs 26.1+ (#217)
(according to https://github.com/joaotavora/eglot#1-2-3)
2019-12-01 18:15:36 +01:00
Neil Mitchell
3ae24dfbb3 #206, copy resolution over to the Setup guide (#214) 2019-11-28 06:11:57 +01:00
Neil Mitchell
824055d45a #208, document the proposed solution (#213) 2019-11-28 06:11:47 +01:00
Greg Steuck
337a268d4c Tighten haskell-lsp* cabal bounds to match #203 (#215) 2019-11-28 06:10:02 +01:00
Neil Mitchell
18955c32b8 Reduce stack.yaml differences (#210) 2019-11-25 16:35:38 +01:00
Neil Mitchell
f89d2d60fa Copy notes from #183 (#209) 2019-11-25 09:00:57 +01:00
Moritz Kiefer
78aa974579
Remove organize imports from the supported features (#202)
We never supported this and still don’t so for now let’s remove it.
2019-11-18 09:37:16 +01:00
Moritz Kiefer
bc32a2eab3
Upgrade to new haskell-lsp release (#203) 2019-11-18 09:37:10 +01:00
Moritz Kiefer
133991b711
Document the solution to #194 (#195) 2019-11-15 14:10:29 +01:00
Jinwoo Lee
3bec234ddb Support plugins (#192)
* Support plugins

Call initializePlugins before running typecheck.

* call initializePlugins only for GHC >= 8.6

initializePlugins doesn't exist in older GHC versions.

* A separate function for initializing plugins

* Add a test for plugins
2019-11-15 09:27:28 +01:00
Moritz Kiefer
7a215d22ef
Infrastructure for on-disk incremental builds (#189)
This is intended for the DAML CLI compiler which is also built upon
`ghcide`. For now, we have no intention of using this in the DAML IDE
or in ghcide but that might change in the future.
2019-11-07 17:13:29 +01:00
Moritz Kiefer
981cd8b8d7
Force cache refresh (#185)
This should hopefully fix CI. Not quite sure what Azure messed
up. This happened on several repositories.
2019-11-05 08:19:39 +01:00
Aniket Deshpande
19c4a6b38f Add configuration example for SpaceVim (#184)
...using its default configuration layers
2019-11-04 20:04:53 +01:00
Rohan Jacob-Rao
0f25910d09
New logging priority for telemetry events (#181) 2019-10-28 18:42:05 -04:00
Martin Huschenbett
e9d862e80f
Use IdeResult in generateCore (#180)
use the `IdeResult` type synonym in the new `generateCore` function's return
type instead of effectively inlining it.
2019-10-28 17:08:28 -04:00
Martin Huschenbett
8745d54ae4
Provide the body of the GenerateCore rule as a standalone function (#179)
We would like to use the rule without caching its artifacts.
2019-10-28 14:01:11 -04:00
Neil Mitchell
233733664d Reduce the extra dependencies (#178) 2019-10-28 09:52:53 +01:00
Jacek Generowicz
440fc1f049 Add goto def / hover tests for classes (#177)
+ internal class in instance declaration
+ internal class in type signature
+ external class in type signature

Hover seems not to work for classes at all.

Goto def works for internal classes, but not external ones.

This leaves the table looking like this:

| | find definition | hover |
|-------------|-----------|---------|
| field in record definition | ✔️  | ✔️ |
| field in record construction |   |  |
| field name as accessor | ✔️ | ✔️ |
| top level name | ✔️ | ✔️ |
| record data constructor |  |  |
| plain data constructor | ✔️ | ✔️  |
| type constructor | ✔️ |  |
| external type constructor |  |  |
| external value |  | ✔️ |
| plain parameter | ✔️ | ✔️ |
| pattern match name | ✔️ | ✔️ |
| top level operator | ✔️ | ✔️ |
| parameter operator | ✔️  | ✔️  |
| name in backticks | ✔️ | ✔️ |
| class in instance declaration | ✔️ |  |
| class in signature | ✔️ |  |
| external class in signature |  |  |
2019-10-23 09:27:48 +02:00
Jacek Generowicz
5645a8030c Move test sample code out to external file (#175)
* Move sample code out into into separate source file

* Add test/data/GotoHover.hs to cabal extra-source-files

* hlint: explicit module export list

* hlint: implement and use readFileUtf8

* hlint: remove -Wmissing-signatures
2019-10-22 16:41:13 +02:00
Jacek Generowicz
38c29030d1 Add gotoDef/hover tests for values from other package (#168)
* Add gotoDef/hover tests for values from other package

* Make Expect constructor names more explicit

* Clean up assertions

* Replace funky function composition operator

* Add signature to checkHoverRange

* Clean up assertion
2019-10-21 10:23:03 -04:00
Andreas Herrmann
9520171921 Allow preprocessors to emit warnings (#176)
* Allow to emit warnings in preprocessor

* preprocessor result type IdePreprocessedSource
2019-10-21 12:24:33 +02:00
Moritz Kiefer
58b997d1aa
Prepare for new releases (#173)
* Prepare for new releases

* More accurate changelog
2019-10-20 17:57:34 -04:00
Neil Mitchell
23142e3cec #170, make sure the right warnings are set when deferring errors to warnings (#172) 2019-10-19 21:22:16 -04:00
Moritz Kiefer
2755212f48
Switch to new releases of haskell-lsp and lsp-test (#171) 2019-10-18 20:58:26 +02:00
Moritz Kiefer
5febbcbc48
Fix progress reporting (#153)
* Fix progress reporting

* Bump haskell-lsp and lsp-test revisions

* Change client name

* Fix typo

* Bump revisions
2019-10-17 11:11:52 +02:00
Jacek Generowicz
3d34065ad4 Add eglot instruction to Emacs section of README (#169) 2019-10-16 16:56:02 +02:00
Jacek Generowicz
23ff24978f Add goto/hover tests for type constructors from other package (#167) 2019-10-15 12:20:35 +02:00
Neil Mitchell
97e5731629 More things are in the latest stack snapshot (#166) 2019-10-13 15:22:01 +02:00
Neil Mitchell
419a7181e0 Copy the content of #159 to the setup guide (#164)
Original content from @sshine
2019-10-13 15:21:41 +02:00
Jacek Generowicz
e583f13d8d Issue visual warning for humans if --lsp option used (#161)
Experience shows that people sometimes mistakenly start `ghcide` on
the command line with the `--lsp` option (which is intended to be used
only in server/client communication scenarios) and then wonder why
nothing is working..

So let's issue a warning message whenever `--lsp` is used.
2019-10-08 19:43:32 +02:00
Moritz Kiefer
2a67821e60
Avoid file path normalization in moduleImportPath (#152)
This fixes some issues where we used an uppercase drive letter in the
import path even though the LSP client uses lowercase drive letters
2019-10-04 09:37:47 +02:00
Jacek Generowicz
726af7fb3f Signal code actions in initialize response (#150) 2019-10-04 08:57:23 +02:00
Moritz Kiefer
fdf5afa79d
Bump GHC 8.8 stacksnapshot (#149)
Still not at a point where all our deps are back in stackage but we’re
getting closer.
2019-10-03 11:07:44 +02:00
Moritz Kiefer
ed6cf474d3
Use a separate finder cache for each typecheck call (#148)
* Use a separate finder cache for each typecheck call

On a large DAML project, we occasionally saw error about missing
modules during typechecking during concurrent compilations. This was
caused by the fact that we modified the IORef in the HscEnv which is
shared between concurrent compilations.
2019-10-02 13:58:53 +02:00
Jacek Generowicz
986bc04014 Stop waiting in tests which don't need to (#145)
A while ago, `testSession` was modified to include a 0.5s wait, for
the sake of tests which were looking for a specific and complete set
of diagnostics, in order to ensure that all the incoming diagnostics
had been received before the comparison was made. This made sense at a
time when the vast majority of tests fit this pattern. Today we have
plenty of tests which have no need for this. Hence:

+ `testSession` has been renamed to `testSessionWait`

+ a new `testSession` has been added, which does not wait at all

+ all tests which use `expectDiagnostics` have been modified to use
  `testSessionWait`, all other tests use the new delayless
  `testSession`.

Locally this knocks almost 25% off the runtime of the full test
suite.
2019-10-01 14:52:07 +02:00
Jacek Generowicz
3284878b7b Add tests for initialize response (#147)
These tests document and monitor the evolution of the capabilities
announced by the server in the initialize response.

Currently the server advertises almost no capabilities. Out of 23
top-level categories, the only 3 which are announced are

+ text document sync
+ hover
+ goto definition

At the very least code actions are known to be provided, but are not
announced in the initialize response.
2019-10-01 13:03:06 +02:00
Jacek Generowicz
5257eb7d9d Refactor goto-definition and hover tests (#146)
+ Reduce manual duplication of information shared between hover and
  goto-def tests

+ Make sure that all the information in the test specifications that
  relates to fiddly line and column numbers, fits together on one
  screen, and is generally easier to match and understand by eye.
2019-10-01 09:24:33 +02:00
Neil Mitchell
e7d3d129ae #129, add a very basic setup guide (#142) 2019-09-30 08:54:57 +02:00
Neil Mitchell
a126bf3530 Add tests for GHC 8.8 (#143) 2019-09-30 08:53:57 +02:00
Neil Mitchell
4493a4a5b8 Ignore the stack.yaml.lock files (#141) 2019-09-30 08:53:14 +02:00
Jacek Generowicz
2779dbb2e1 Add tests for find-definition and hover (#139)
* Add find definition tests

* Add tests for hovers
2019-09-29 12:03:16 +02:00
Neil Mitchell
9d45eee21c #137, make the status message clearer about what worked and what didn't (#138) 2019-09-27 15:18:24 +02:00
Neil Mitchell
83978c3984 Get rid of mtl dependency (#133)
* Get rid of mtl dependency

* Put back mtl dependency
2019-09-25 16:43:05 +02:00
Moritz Kiefer
833c18c876
Point to the VSCode marketplace in the readme (#134)
* Point to the VSCode marketplace in the readme

* Move instructions for building the VSCode extension to Hacking section
2019-09-25 15:25:32 +02:00
Neil Mitchell
60ed687de9 Support multiple hie.yaml files (#127)
* Hack around https://github.com/mpickering/hie-bios/pull/56 - hie-bios expects files to really exist on disk

* Fix getLocatedImportsRule to pass the file to the session

* Add support for multiple simultaneous hie.yaml files.
Also rewrites the user experience on setup to be less verbose.
Also adds masking for GHC session construction.

* HLint

* Code review comments

* Switch to the Strict map
2019-09-25 13:01:41 +02:00
Moritz Kiefer
37f19935e2
Update extension metadata (#132)
That’s the publisher we use for uploading the DAML extension and it
makes little sense to have two publishers.
2019-09-25 10:23:27 +02:00
Moritz Kiefer
baa59d4bea
Use a stack cradle in hie.yaml (#121) 2019-09-25 10:21:11 +02:00