Commit Graph

173 Commits

Author SHA1 Message Date
jinser
763f34cb1e
Provide explicit import in inlay hints (#4235)
* Provide explicit import in inlay hints

* Filter explict imports inlay hints by visible range

* Update lsp dep by source-repository-package

to writing test before new release of haskell/lsp.

* Add test for hls-explicit-imports-plugin inlay hints

* Comment inlay hints start position

* Use `isSubrangeOf` to test if the range is visible

* Remove inlayHintsResolveProvider placeholder for now

* Use explicit InlayHintKind_Type

* Revert "Update lsp dep by source-repository-package"

This reverts commit 245049a580.

* Combine InlayHints by sconcat them

and remove `instance PluginRequestMethod Method_InlayHintResolve`
since have not decide how to combine.

* compress multiple spaces in abbr import tilte

* update test to match inlay hints kind

* rename squashedAbbreviateImportTitle to abbreviateImportTitleWithoutModule

* Request inlay hints with testEdits

* ExplicitImports fallback to codelens when inlay hints not support

* fix explicitImports inlayHints test

* simplify isInlayHintsSupported

* comment fallback

* empty list instead of null codeLens

* clearify name `paddingLeft`

* fix clientCapabilities

* add test for inlay hints without its client caps

* use codeActionNoInlayHintsCaps to avoid error

* simplify isInlayHintSupported

* comment about paddingLeft

* use null as inlay hints kind

* add tooltip for explicit imports inlay hints to improve UX

* chore comments

* refactor

* comment InL [] to indicate no info

* ignore refine inlay hints

* add plcInlayHintsOn config

* update func-test

* keep order to make Parser works

* always provide refine in code lens

---------

Co-authored-by: Michael Peyton Jones <me@michaelpj.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2024-07-09 14:58:37 +00:00
Zubin Duggal
d72a6a0bec Prepare release 2.9.0.1
This is a bindist only release with no code changes
2024-07-05 14:51:10 +05:30
fendor
287ee42ab5
Prepare release 2.9.0.0 (#4319)
* Prepare release 2.9.0.0

* Bump 'bytestring' version for release CI test scripts

The older 'bytestring-0.11.1.0' version doesn't compile with the recent
GHC 9.10.1 release. Bump the version to '0.12.1.0' which can be
successfully compiled on all supported GHC versions.

* Update supported GHC version table

* Move plugin ghc support conditionals into .cabal file

Having them in the cabal.project file is a very neat way to
enable/disable a plugin, but it negatively affects Hackage users as they
can no longer trivially install HLS from Hackage.

This discussion might be revisited in the future, but not during a
release process.

* Disable tests and benchmarks in release test pipeline

On some platforms, building bytestring-0.12.1.0 is not fully supported
yet. Hence, we disable tests and benchmarks, to allow building on the
platform Windows with GHC 9.10.1.

* Always show debug output in release test ci

* Upgrade cabal version in the release pipeline

* Switch to `text` for release test package

---------

Co-authored-by: Michael Peyton Jones <me@michaelpj.com>
2024-06-19 10:35:14 +02:00
wz1000
3009a45c74
Support for 9.10 (#4233)
* Support for 9.10

This includes supports for all plugins, other than formatters and hlint.

We need ghc-exactprint and retrie release before merging this.

* Remove indexed-traversable allow-newer

* Fix couple of warnings

* Fix flags job for hls-graph

* foldl' exposed from Prelude since base 4.20

* Fix flags job for hls-plugin-api

* Fix ghcide hover test

* Fix flags job for hls-eval-plugin

* unzip since 4.19

* More pedantic fixes

* Don't CPP in tests, fix another test

* Switch to ghc-exactprint and witherable from hackage

* Fix all warnings in hls-refactor-plugin

* Remove more no longer necessary allow newers

* Fix all warnings in hls-gadp-plugin and hls-qualify-imported-names-plugin

* Remove allow-newer for boring

* Bump to lsp 2.6, remove more allow-newers

* outline tests

* disable simple plugin on 9.10

* Remove allow-newer for ghc-trace-events

* fix appendConstraint

* stylish

* Remove commutative-semigroups and monoid-subclasses from allow-newer

* Remove free from allow-newer

* Fix 'type wilcard actions' tests

* Remove hie-bios from allow-newer

* Fix suggestNewDefinition tests

* Revert "Fix suggestNewDefinition tests"

This reverts commit 2f3300e964.

* Remove makeDeltaAst breaking tests unrelated to addArgument

* Fix 79 code action tests

* Fix 12 more tests

* Remove co-log-core from allow-newer

* Fix 21 more tests

* Fix 8 import disambiguation tests

* fix windows ghcide tests

* Fix adding argument to function body

* update retrie commit, progress in add argument tests

* Fix few stylish-haskell parse errors

* Fix remaining redundant constraint tests

* Remove allow-newer for constraint-extras

* Fix warnings after master merge

* Fix most add argument tests except for one

* Remove dependent-map from allow-newer

* Try removing some allow-newers from lsp

* Ormolu is updated, add links for other tool dependencies

* Revert "Try removing some allow-newers from lsp"

This reverts commit 6f60029ff2.

* Try this

* Fix all gadt plugin and most class plugin tests, enable 2 tests for ghc 9.4+

* Undo spurious changes

* Update eval plugin tests

* Disable broken refactor plugin test for now

* Fix warnings

* Add source-repository-package to unblock floskell

* Make call hierarchy plugin tests green

* fix semantic tokens 9.10

* Fix remaining class plugin test

* Update hls-change-type tests

* Make class plugin more robust

* Fix stylish parse errors, simplify CPP

* Cleanups

* Remove retrie dep from hls-refactor-plugin

* More retrie fixes

* Fix cabal-plugin-tests by respecting maxCompletions client cfg + a bit of CPP

* Fixup ghcide-tests

* disable retrie, splice and floskell plugins for 9.10

* Update tested-with + fix import warning

* Fix stylish

* Fix compilation with 9.2.8, fix stack jobs

* Remove no longer relevant :type +v test

* Disable tests of disabled plugins in CI

* Try a better broken specifier?

* Fix invalid CI config

* Use getClientConfigAction instead of introducing new HandlerM action

* Move CPPd imports to prevent stylish from evaluating CPP

* Disable stan tests with ghc 9.10 in CI

* attempt fixing exactprint <9.10

* Try enabling fourmolu now

* Revert "Try enabling fourmolu now"

This reverts commit 7142686f62.

* Update code-range-plugin tests

* Fix No newline at the end of file

* Use more recent cabal-gild

* Try setting some linker flags for macos

* Ignore non-local variable completion test on windows for GHC 9.8

---------

Co-authored-by: Jan Hrček <honza.hrk@gmail.com>
Co-authored-by: Patrick <fwy996602672@gmail.com>
Co-authored-by: Michael Peyton Jones <me@michaelpj.com>
Co-authored-by: Fendor <fendor@posteo.de>
2024-06-13 14:45:57 +00:00
Jan Hrcek
c11f32b62a
Bump stack configs + CI to 9.6.5 and 9.8.2 (#4316) 2024-06-12 19:37:52 +02:00
awjchen
cebd641d06
Use restricted monad for plugins (#4057) (#4304)
* Use restricted monad for plugins (#4057)

* Renaming: PluginM -> HandlerM

* Explain intent for HandlerM

* Fix comment

* Apply stylish-haskell
2024-06-10 10:02:58 +00:00
Michael Peyton Jones
71aa2d38e0
Bump to new lsp versions (#4279) 2024-06-06 13:19:32 +00:00
soulomoon
838a51f761
Refactor hls-test-util and reduce getCurrentDirectory after initilization (#4231)
What's done
* [x] Refactor the `runSession*` family function, properly add `TestConfig`, `runSessionWithTestConfig`, as the most generic `runSession*` function.
* [x] remove raraly used variants of `runSession*` functions and replaced by `runSessionWithTestConfig`. 
* [x] migrate `ExceptionTests ClientSettingsTests CodeLensTests CPPTests CradleTests` to use the `hls-test-utils`
* [x] Only shift to lsp root when current root is different from the lsp root in DefaultMain of ghcide. 
* [x] Remove most usage for `getCurrentDirectory`(After DefaultMain is called), Only remain those in top level of wrapper and exe, implement https://github.com/haskell/haskell-language-server/issues/3736#issuecomment-1924507928
* [x] add Note [Root Directory]

Co-authored-by: fendor <fendor@users.noreply.github.com>
2024-05-27 14:03:43 +00:00
Michael Peyton Jones
0651c5c904
Another attempt at using the lsp API for some progress reporting (#4218)
* Another attempt at using the lsp API for some progress reporting

* Fixing tests

* Remove trace

* Make splice plugin tests not depend on progress

* More test fixing

* Switch to hackage

* stack

* warnings

* more

* Put tests back

---------

Co-authored-by: Patrick <fwy996602672@gmail.com>
2024-05-19 16:06:38 +01:00
soulomoon
b43dcbb8cf
3944 extend the properties api to better support nested configuration (#3952)
The implementation closely aligns with the original design, extensively incorporating existing code to minimize workload costs. The new API maintains a consistent style with the old API, which remains unchanged.
Features
With new expose stuff:
`KeyNamePath` -- path to search for properties
`definePropertiesProperty` -- define nested property
`usePropertyByPath` -- extract property by path
`usePropertyByPathEither` -- same as above
`usePropertyByPathAction` -- action api for `usePropertyByPath`
`HasPropertyByPath` -- constraint for using `usePropertyByPath` like the `HasProperty`

We can now define properties upon properties to create nested one. And use KeyNamePath to retrieve the property
```
    nestedPropertiesExample = emptyProperties
        & definePropertiesProperty #parent "parent" (emptyProperties & defineStringProperty #foo "foo" "foo")
        & defineStringProperty #baz "baz" "baz"

    nestedPropertiesExample2 = emptyProperties
        & definePropertiesProperty #parent "parent" (emptyProperties & defineStringProperty #foo "foo" "xxx")
        & defineStringProperty #baz "baz" "baz"

    examplePath1 = SingleKey #baz
    examplePath2 = ConsKeysPath #parent (SingleKey #foo)
```
To retrieve we can have 
```
usePropertyByPathEither examplePath2 nestedPropertiesExample object
```
2024-05-18 12:39:37 +00:00
wz1000
2b8f3438ca
Prepare release 2.8.0.0 (#4191)
* Prepare release 2.8.0.0

* try maerwald runners

* Update version support

* Schedule nightly job to run weekly instead of daily

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2024-05-10 22:22:19 +00:00
Jan Hrcek
a339277ba1
Upgrade to latest lsp / lsp-types / lsp-test (#4166) 2024-04-30 19:33:24 +02:00
fendor
a6f0008956
Allow users to specify whether to use cabal's multi-repl feature (#4179)
We add an option to `Config` that allows clients to specify how HLS
should load components.

We support two loading strategies:

* SessionLoadSingleComponent: Always load only a single component
    when a new component is discovered.
* SessionLoadMultipleComponents: Always allow the cradle to load
    multiple components at once. This might not be always possible,
    e.g., if the tool doesn't support multiple components loading.
    The cradle decides how to handle these situations.

By default, we use the conservative `SessionLoadSingleComponent` mode.

Additionally, changing the config at run-time leads to a reload of the
GHC session, allowing users to switch between the modes without
restarting the full server.
2024-04-23 13:53:06 +00:00
Jan Hrcek
e6f7be7ec4
Fix ghc and hlint warnings (#4181) 2024-04-17 08:48:39 +02:00
soulomoon
81f267243e
enable ThreadId for when testing (#4174)
enable ThreadId for when testing

---------

Co-authored-by: fendor <fendor@users.noreply.github.com>
2024-04-16 18:25:58 +00:00
fendor
5deb99605f
Drop Logger from HLS code base. (#4171)
Move ghcide completely to colog-logging style.
Move plugins that were relying on `ideLogger` to colog style logging.
Move opentelemetry to colog-logging style.

This allows us to drop legacy code and unify the logging experience in
HLS.

We add a bunch of new Log constructors at various locations that aim to
be identical to their previous `Logger` statements.
2024-04-16 07:43:26 +00:00
fendor
16912ccebd
Add cabal-gild as a cabal file formatter plugin (#4101)
* Add cabal-gild as a cabal file formatter plugin

* Add support for multiple cabal formatters

In addition, allow different cabal file formatter provider to specify an
explicit file path, instead of searching only on $PATH.

* Fix cabal formatter test flags
2024-03-11 17:23:29 +00:00
Jan van Brügge
03d418c92c
hls-notes-plugin: Initial implementation (#4126)
* hls-notes-plugin: Initial implementation

* hls-notes-plugin: add to feature list and plugin table

* hls-notes-plugin: Add more documentation comments

* hls-notes-plugin: Fix tests after #3846, add CI job

* hls-notes-plugin: Address review comments

* hls-notes-plugin: Allow Note definition within single line comments

* hls-notes-plugin: Improve "Note not found" error message

* hls-notes-plugin: Allow single line notes to be indented

* treewide: Add missing underscores to note definitions

* hls-notes-plugin: Wait until HLS is done in tests

* hls-notes-plugin: Fix tests on windows

The regex did not allow windows line endings in note definitions

---------

Co-authored-by: Jan Hrcek <2716069+jhrcek@users.noreply.github.com>
Co-authored-by: fendor <fendor@users.noreply.github.com>
2024-03-11 15:19:51 +00:00
Jan Hrcek
5502b76c95
Improve handling of nonsense rename attempts (#4111) 2024-03-02 16:47:09 +01:00
Fendor
26fa28c50e Update HLS version in .cabal files 2024-02-27 15:17:05 +01:00
soulomoon
24b40ca42d
Add Method_TextDocumentSemanticTokensFullDelta (#4073)
* add Method_TextDocumentSemanticTokensFullDelta

* remove persistentGetSemanticTokensRule

* add doc about semanticTokensCache location

* add Note [Semantic Tokens Cache Location]

---------

Co-authored-by: fendor <fendor@users.noreply.github.com>
2024-02-21 22:54:52 +01:00
Jan Hrcek
e37ec7dbb3
Enable pedantic for more components (#4061) 2024-02-09 15:17:34 +01:00
Michael Peyton Jones
0b0eee328f
Bump lsp versions (#4052)
* Bump lsp versions

Broadly:
- A few places where we need to pipe `ProgressToken`s around.
   - I also just removed the progress reporting from resolve commands,
     since it's going to often be costly to do progress reporting on
     something that short. Possibly we could revisit after https://github.com/haskell/lsp/issues/549
- Some changes to the registration options we infer
- A few places where we need to adapt to ignoring registrations or not
- Adapting to use the ghcide verison of `getCompletionPrefix` everywhere
- Adapting to use the new mixed rope format

* stack

* More fixes
2024-02-08 17:32:10 +00:00
Jan Hrcek
0047d133a1
Fix warnings in hls-graph, enable pedantic in CI (#4047)
* Fix warnings in hls-graph, enable pedantic in CI

* Fix build with flags

* stylish-haskell

* Split Key stuff to separate module with explicit export list

* Try the cabal configure suggestion in CI flags job

* Newline fix

* Enable pedantic for all

* Typo

* stylish-haskell

* pedantic is already enabled for all

* Fix error in hls-plugin-api

* Address nitpick, use lsp-types in tests instead
2024-02-06 15:13:41 +00:00
Michael Peyton Jones
975db494a2
Use GHC2021 (#4033)
Co-authored-by: Jan Hrček <honza.hrk@gmail.com>
2024-02-02 12:10:51 +00:00
soulomoon
8dfcaf80b3
Semantic tokens: add module name support and improve performance and accuracy by traversing the hieAst along with source code (#3958)
fix https://github.com/haskell/haskell-language-server/issues/3957

Things have been done:
1. Switch `Name` to `Identifier` in the implementation and add `ModuleName` to the `HsSemanticTokenType`
2. Strip ``` ` ` ``` and `()`, and split out qualified names. e.g.``` `Preclude.length` ``` to ```Preclude.```  `length`
3. add tokenizer to walk ast with the souce rope to get more accurate result and faster. Should fix https://github.com/haskell/haskell-language-server/issues/3983.
4. add type sig to semanticConfig's TH result
2024-01-29 17:34:50 +00:00
Jan Hrcek
dc9326c4ed
Fix -Wall and -Wunused-packages in plugins api and floskell (#4005)
* Fix -Wall and -Wunused-packages in plugins api and floskell

* stylish-haskell

---------

Co-authored-by: Michael Peyton Jones <me@michaelpj.com>
2024-01-22 15:50:16 +00:00
Zubin Duggal
22c0624541 Prepare release 2.6.0.0 2024-01-16 00:35:59 +05:30
Patrick Wales
10b5f3bd51
Properties API: Remove unsafe coerce in favor of type class based method in (#3947)
* remove unsafe coerce to use type class based method

* remove redundant-constraints suppresion
2024-01-14 05:57:48 +08:00
Fendor
4b01eb0149 Fix vscode config generation 2024-01-10 10:02:12 +01:00
Patrick Wales
37925a03b4
Implement semantic tokens plugin to support semantic highlighting(textDocument/semanticTokens/full) (#3892)
* Implement semantic tokens lsp plugin draft

* SemanticTokens: combine information extracted from HieAst

* clean up

* map to default token types in lsp

* use lsp makeSemanticTokens to convert to lsp SemanticTokens type

* add test and cleanup

* refine semantic type to default one in lsp

* Use tokens from hieAst instead of renamedSource and add test

* use customize RefMap to get semantic type

* use refMap from useAsts

* Also compute imported names

* Also compute semantic type from TyThing

* Fix dependencies version

* fix version

* Retrieve nameSet from renamedSource to prevent names not visible(Such as by instance deriving) being handled

* add hlint config to ignore test data

* cean up test data

* revert flake.nix

* Rename query.hs to Query.hs

* Build: add semantic tokens to lts21

* Refactor and add README

* Semantic token, filter names in Ast

* CI: add consistancy check for wether semantic tokens computations is stable across different ghc versions

* Update documentation, cleanup test, remove default modifiers

* Fix: IO now classfied to TTypcon, add test for GADT and data family, Update documentation

* Restore stack.yaml

* fix stack build

* Refactor, move out ActualToken to Mappings and use ide logger

* Refactor: toLspTokenType should return Maybe type

* Stop use stale hieAst

* add getImportedNameSemanticRule rule to semantic tokens plugin

* do not retrieve hie in getImportedNameSemanticRule

* fix: add description for semantic tokens

* remove TValBind and TPaternBind and Use TFunction and TVariable instead

* cleanup

* Refactor useWithStaleMT and took care of the token range using position map

* fix build for 9.4

* refactor, use golden test

* refactor, use ExceptT for computeSemanticTokens

* Fix 9.2

* add persistentSemanticMapRule to prevent semantic tokens block on startup

* Fix, use hieKind instead of cast the type directly

* add options to turn semantic tokens on and off

* Disable stan plugin by default (#3917)

* Fix positionMapping in stale data (#3920)

* Fix positionMapping in stale data

* add test for updatePositionMapping

* add comment to demonstrate addOldDelta

* cleanup

* fix: for local variable, extract type from contextInfo instead of bind site, thus function in pattern binds can also be indentified

* clean up

* Update plugins/hls-semantic-tokens-plugin/src/Ide/Plugin/SemanticTokens/Query.hs

Co-authored-by: Michael Peyton Jones <me@michaelpj.com>

* refactor: remove TNothing and compact the test output

* refactor: rename SemanticTokenType to HsSemanticTokenType to avoid confusion with lsp' SemanticTokenTypes

* refactor: push the computation of semantic token type to getSemanticTokensRule

* update documentation

* cleanup hieAstSpanNames

* remove renamed source from getSemanticTokensRule and optimize query function for semantic token type

* try to exclude names that is not visible in hie and cleanup

* add HieFunMaskKind, it is to differ wether a type at type index is a function or non-function

* expose function flag to expose (=>, ->, -=>, ==>)

* 1. Relax GetDocMap kindMap to get TyThing for more than type variables.
2. Backport isVisibleFunArg

* use customize logger, add test for unicode

* fix: handle unicode in semantic tokens

* update KindMap to TyThingMap

* cleanup

* add realSrcSpanToCodePointRange, realSrcLocToCodePointPosition to Development.IDE.GHC.Error

* add Note [Semantic information from Multiple Sources]

* move recoverFunMaskArray to Mappings.hs

* fix test, data.Set might not appear

* fix: handle semantic tokens with more than one ast

* fix: instance PluginMethod Request Method_TextDocumentSemanticTokensFull

* clean up

* turn semantic tokens off by default

* fix doc

* clean up doc

---------

Co-authored-by: fendor <fendor@users.noreply.github.com>
Co-authored-by: Michael Peyton Jones <me@michaelpj.com>
2024-01-06 13:09:19 +00:00
Nathan Maxson
e5f693195d
Improve no plugin messages (#3864) 2024-01-04 12:03:55 +03:00
Michael Peyton Jones
2b49d9dd7f
Give plugins descriptions, include versions of key dependencies (#3903)
* Plugins have descriptions

* Plugins based on external tools report the version they are built with

* Sort plugins
2023-12-17 21:33:27 +00:00
Zubin Duggal
f46216835a Prepare release 2.5.0.0 2023-12-12 11:58:59 -08:00
Jiri Lojda
20a37ece9e
Merge definitions from all plugins for Document(Type)Definition message (#3846)
* Merge definitions from all plugins for Document(Type)Definition message

- enables multiple plugins to provide Document(Type)Definition for the same message

* Remove unnecessary head usage in ghcide TestUtils

* Use Nothing for original selection when upgrading Location to LocationLink

in combineResponses of plugins to TextDocumentDefinition message

* Share combineResponses document definition and document type definition tests

* Downgrade locations to links when missing client capability in combineResponses (plugin API)

- Upgrade locations to links only when necessary (some responses are links)

* Test preserving link data in combineResponses of Definition message

* Add haddock to mergeDefinitions in plugin API

* Replace usage of OverloadedRecordDot with lenses

- to support GHC < 9.2

* Add TypeFamilies extension to TypesTests to support GHC < 9.4

* Require focus >= 1.0.3.2 to fix 9.8 build for ghcide and hls-graph

---------

Co-authored-by: Michael Peyton Jones <me@michaelpj.com>
2023-11-17 09:33:25 +00:00
BurningLutz
afac9b1872
Fix #3847 (#3854)
* Fix https://github.com/haskell/haskell-language-server/issues/3847

* Add unit test cases for `Ide.PluginUtils.extractTextInRange`.

* More detailed comment about the issue.

---------

Co-authored-by: Michael Peyton Jones <me@michaelpj.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2023-11-14 11:34:03 +00:00
wz1000
1c884ea856
Remove head.hackage (#3867)
* Remove head.hackage

Bump to

- lsp-2.3
- lsp-types-2.1
- hiedb-0.4.4
- hie-bios-12.1 (TODO remove source-repository package in favour of hackage release)
- hie-comat-0.3.1.2

* Bump cabal version for CI

* Add comments for allow-newer

* Fix build on 9.6

* Hopefully fix stack extra-deps

---------

Co-authored-by: Michael Peyton Jones <me@michaelpj.com>
2023-11-14 09:59:59 +00:00
Zubin Duggal
0f240c8540 Prepare release 2.4.0.0 2023-10-10 23:01:28 -07:00
wz1000
d983c89154
Release 2.3.0.0 (#3818)
* Prepare release 2.3.0.0

* release ci: respect ADD_CABAL_ARGS on non-windows builds

* release ci: disable simdutf text for centos

* release ci: disable simdutf text for freebsd

* Fix cabal file of hls-fourmolu-plugin to allow it to be uploaded to hackage

Fixes #3819

* Update ghc version support docs

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2023-10-06 12:11:38 +00:00
Michael Peyton Jones
861aba7bc5
Drop support for GHC 8.10 (#3434)
* Drop support for 8.10

* Fixes

* Try to fix wrapper test

* Try to fix wrapper test

* Fix
2023-08-31 09:36:18 +01:00
Fendor
f5e3fce13f Prepare release 2.2.0.0 2023-08-26 00:24:32 +02:00
Michael Peyton Jones
e4234a3a5e
Adapt to lsp changes for workspace/configuration (#3773)
* Adapt to lsp changes for workspace/configuration

This has a few substantive changes and a lot of messing with tests.

- We now tell `lsp` our config section, and parse just that section.
- We move the logic for updating the shake build rules for client config
  from a `workspace/didChangeConfiguration` handler to the new `lsp`
  callback, which will ensure it gets called in all circumstances that
  can be relevant.

The test changes are more annoying:
- We ignore config and logging messages by default now, so we have to
  stop doing that when we care about it.
- Many tests didn't really need to _change_ the config, but rather just
  to set it once at the beginning. I adjusted a lot of test functions to
  allow passing in the initial config for this reason.

* don't reduce the message timeout for wingman

* Fix stan plugin

* Doh
2023-08-25 14:04:42 +00:00
Nathan Maxson
90d71cee12
Fix #3574 and support resolve in explicit records (#3750)
* Fix #3574 and support resolve in explicit records

* render shouldn't fail, added tests

* Improved comments

* Remove unused language extensions

* 8.10 and 9.0 fixes and separate collect names into it's own rule

* fix flags and add Resolve module haddock

* better tests

* works for all ghc versions

* Fix flags

* ignore incomplete record updates in explicit record fields

---------

Co-authored-by: Michael Peyton Jones <me@michaelpj.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2023-08-24 21:00:34 +00:00
Nathan Maxson
e0d82e7bd4
Pedantic ghcide (#3751) 2023-08-22 19:53:07 +03:00
Nathan Maxson
2aecda97c1
Update to latest lsp packages (#3747)
Co-authored-by: fendor <fendor@users.noreply.github.com>
2023-08-08 06:56:42 +00:00
Nathan Maxson
ec1e6c1b19
Various PluginError PR suggestions I missed earlier (#3737) 2023-07-31 22:28:57 +00:00
Nathan Maxson
8d7555ca2a
Better plugin error infrastructure (#3717)
---------

Co-authored-by: Fendor <power.walross@gmail.com>
2023-07-29 21:44:30 +00:00
Hiromi Ishii
5aa14b36b4
Best-effort support of Qualified Imports in GHC 9.4 (#3712)
* refactor: Avoids misleading name (renames `extractRange` to `extractOverlappingLinesWithRange`)

* fix: first workaround for qualified imports in GHC 9.4

* fix: stylish-haskell

* fix: stop using Debug.Trace

* refactor: uses `regex-applicative-text` to comply with Haskell 2010 Module Name

* ci: `regex-applicative-text` constraint in nightly CI

* fix: Switches from `regex-applicative-text` to `regex-applicative` (due to version constraints)

* Fixes import list

* doc: Notes on the rationale behind `missing`

* doc: `extractQualifiedModuleNameFromMissingName`

* refactor: extractText-related refactoring

* refactor: Use record wildcards alone

* refactor: cosmetic chagnes around indentation consistency

* fix: Fixes dead export

* Corrects typo (Thanks @fendor!)

Co-authored-by: fendor <fendor@users.noreply.github.com>

* refactor: Makes `mapNotInScope` local and renames to `qualify`

---------

Co-authored-by: fendor <fendor@users.noreply.github.com>
2023-07-23 17:44:28 +01:00
Nathan Maxson
b6dc425054
Move Recorder to hls-plugin-api (#3714) 2023-07-23 07:38:14 +00:00
Nathan Maxson
c501f386b5
Resolve refactoring (#3688) 2023-07-17 17:43:39 +00:00