Commit Graph

29 Commits

Author SHA1 Message Date
Potato Hatsue
bc4a11971f
Fix flake compat (#1852)
Co-authored-by: Junyoung/Clare Jang <jjc9310@gmail.com>
2021-05-21 15:58:26 -04:00
Potato Hatsue
9abf566e06
nix: refactor with flakes (#1827)
* nix: refactor with flakes

* Update github actions

* Make pre-commit-hooks/flake-utils follows flake-utils

* Update github actions

* Update github actions

* Support multi GHC versions

* Update github actions

* Copy postInstall from nixpkgs

* Remove invalid ghc865

* Update README

* Use nixpkgs-unstable

* Update README

* Add plugins automatically
2021-05-19 03:32:23 -04:00
Potato Hatsue
3f8d33cb6d
Update nix (#1699)
* Update nix

* genChangelogs -> gen-hls-changelogs
2021-04-10 18:16:58 +08:00
Potato Hatsue
86d67ffe28
Update nixpkgs to ghc 8.10.4 (#1538)
* Update niv and nixpkgs

* Use nixos-unstable in CI

* Do not override mkDerivation

* Switch to nixpkgs-unstable

* Jailbreak only broken packages

* Update nixpkgs

* Better override

* Update nixpkgs

* Check whether the package is jailbroken, add comments

* Downgrade tracy to 0.7.5

* Update maintainer notes
2021-03-16 18:36:19 +08:00
Pepe Iborra
6fbc602274
Extract an hls-brittany-plugin package (#1422)
* Extract a Brittany plugin

* Add the brittany plugin to all the stack descriptors

* Extract tests into a standalone testsuite

* Drop AGPL flag

* Change the default logger to print to stderr

* add hls-brittany-plugin test suite to CI

* Add strict version bounds

These are completely unnecessary, but it's the approach that we seem to be taking

* includes breaking API change: bump ghcide version number

Co-authored-by: Junyoung/Clare Jang <jjc9310@gmail.com>
2021-03-08 05:07:38 +00:00
Junyoung/Clare Jang
c95b0766fe
Add a pre commit hook for code formatting (#1384)
* Add pre-commit-hook

* Update CONTRIBUTING.md

* Reduce stylish-haskell configs
2021-02-18 06:26:08 +00:00
Pepe Iborra
cbd08c6962
Extract Development.IDE.GHC.ExactPrint (#1203)
* Extract Development.IDE.GHC.ExactPrint

We need to start using ghc-exactprint in ghcide code actions

This new module, extracted originally from the tactics plugin and incorporating
some nice types from retrie, provides a reasonable API for exactprint

* lints

* Fix stack 8.8.2 descriptor

Co-authored-by: Junyoung/Clare Jang <jjc9310@gmail.com>
2021-01-13 12:05:39 +00:00
Potato Hatsue
57f28ff357
Haddock comments plugin (#673)
* Add haddock comments plugin
:

Update project config files

Add CPP

Add missing include-dirs

Refactor

Support records

Only suggest when no error

Don't suggest if nothing to change

Update code action title and comment template

Remove toCurrentRange

Add haddock comments plugin

Update project config files

Add CPP

Remove temp files

Remove temp files

Remove spaces

* Minor refactor, remove CPP

* Fix stack-8.10.3.yaml

* Add test cases (unverified)

* Rename test data files, use golden test

* Fix paths of hs files in testing

* Add missing ConstFunction

* Fix paths

Fix paths

* Update annDeltaPos

* Steal goldenGitDiff from class plugin

Co-authored-by: Javier Neira <atreyu.bbb@gmail.com>
Co-authored-by: Junyoung Clare Jang <jjc9310@gmail.com>
2021-01-07 06:58:36 -05:00
Hiromi Ishii
8d5cbe1ea2
Splice Plugin: expands TH splices and QuasiQuotes (#759)
* Implements splice location detection

* Corrects detection logic

* Changed to use (bogus) message for code action

* Splice location

* Extract `Ide.TreeTransform` as an independent package

* It once worked, but stops...

* Now it works for inplace expansion for expressions

* generalises tree transformation to general AST element

* Done for Types and Patterns!

* Disabled "commented" style of expansion

* kills redundant imports

* Updates cabal.project

* Nix fix

* Nix fix, fix

* Throws away loading hacks entirely

* Type adjusted for inverse dependency

* Resolves merge conflicts

* WIP: Support hover and goto definition for top-level splices

I can't work out how to properly integrate this information into the
.hie file machinery. Perhaps it would be better to upstream this.

* Modifies splice information to store both spliced expression and expanded ones as well

* Avoid name collision

* formatting erros

* Safer error handling

* Rewrote using updated ghcide  `TypeCheck` results

* Use `liftRnf rwhnf` to force spine of lists

* Stop using `defaultRunMeta` directly to avoid override of preexisting hooks

* Error report

* Add splice information into HIE generation.

* Resolves interace conflict

* Add test

* Changes to use ParsedModule to detect Splice CodeLens

* formatted

* Implements golden test

* mzero for HsDecl

* Decl Splice

* Workaround for Decl expansion and support type-errored macro expansion.

* Only setting up dflags correcly would suffice

* Removes lines accidentally added

* Regression tests for Declaration splice and kind-error ones

* Workaround for GHC 8.8

* Revert "Workaround for GHC 8.8"

This reverts commit 056f76971f.

* Unsupport pattern splices GHC 8.8

* Corrects line position in GoToHover

* Increases wait time

* Includes only related changes only

* Optimises `something'`

* Adds hie.yaml

* circie ci: Modifies stack-8.10.3.yaml

* Forgot to update dflags in auto-expansion with default strategy

* Forgot to add golden file

* A dummy commit to run CI

* Workaround for GHC 8.8 pattern splices

Co-authored-by: Matthew Pickering <matthewtpickering@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2021-01-05 15:34:06 +00:00
Pepe Iborra
50632e72ef Add tracy and opentelemetry-extra to shell.nix
Usage of these tools is described in

https://github.com/haskell/haskell-language-server/blob/master/ghcide/docs/opentelemetry.md
2020-12-30 18:23:42 +00:00
Pasqualino Titto Assini
edb150ac52 moved eval plugin to hls-eval-plugin (rebased and fixed) 2020-12-29 18:38:27 +01:00
Junyoung Clare Jang
8010dac6da
Fix nix shell 2020-12-26 02:23:30 -05:00
jneira
16e8e89cb4 Add shake-bench component to nix build 2020-12-14 19:58:57 +01:00
Pepe Iborra
7f6080ed91
Split the Imports and Retrie plugins (#647)
* Split out the explicit imports plugin

* Split out the retrie plugin

* Avoid test-breaking plugin descriptor change

It changes the order in which code actions get listed.
Some of the code action tests are not very smart and break.

* Fix stack descriptors

* Add ghc-api-version.h

* add LICENSE
2020-12-05 19:33:09 +00:00
Pepe Iborra
05e1dae781 Add maintainer instructions 2020-12-01 23:11:49 +00:00
Pepe Iborra
8ce4ac34a4 Upgrade Nix script to use the haskell-updates branch.
The haskell-updates branch is already on Stackage nightly, which allows for a
much better cache hit rate (assuming haskell-updates is backed by a Hydra cache,
which I'm not quite sure of).
2020-12-01 23:11:49 +00:00
William Bush
d558c32a89
tech(nix): update niv and remove allowbroken (#350)
https://github.com/haskell/haskell-language-server/issues/325
retrie is no longer appears to be marked broken:
https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/haskell-modules/hackage-packages.nix#L215948
2020-08-25 14:20:43 +02:00
Julien Debon
4f5d12449d
tech(nix): Allow broken as retrie is marked as broken (#331)
See #325 for more information
2020-08-16 23:44:20 +01:00
Pepe Iborra
650cfae6b3 Remove fourmolu from shell.nix and add note on maintaining 2020-08-09 11:38:41 +01:00
Pepe Iborra
c8007c387c Add hoogle to shell.nix 2020-08-08 13:31:54 +01:00
George Thomas
6aab3fb515 Add fourmolu to shell.nix 2020-08-06 17:07:51 +01:00
Pepe Iborra
e70d7e8255 add retrie to shell.nix 2020-08-01 13:35:10 +01:00
Fendor
0439590a96 Fix type error in shell.nix 2020-07-29 12:57:27 +02:00
Pepe Iborra
d286ae810d avoid hard-coding the default compiler 2020-07-26 15:36:34 +01:00
Pepe Iborra
2fe1447710 Simplify by optimizing for Nix cache reuse 2020-07-26 15:36:34 +01:00
Pepe Iborra
b7aa138f15 Fix compat. with ghc865, add more packages and rationale 2020-07-26 15:14:40 +01:00
Pepe Iborra
93844f99b3 Fix compat. with ghc8101 and add more packages
- Removing packages that fail to build with ghc8101 (haskell-lsp due to statistics)
- Adding more prebuilt packages to further leverage the Nix cache
2020-07-26 13:25:34 +01:00
Pepe Iborra
ff114030b2 slightly better shell.nix 2020-07-26 00:18:42 +01:00
fendor
f4bf9fddb1 Use shell.nix from Haskell-IDE-Engine 2020-06-22 12:34:34 +02:00