From ee1b6b87545475085aa0d6fd1b6b57b259f6799c Mon Sep 17 00:00:00 2001 From: Lin Jian Date: Wed, 7 May 2025 03:27:30 +0800 Subject: [PATCH 1/3] Add doc for haskell.cabalFormattingProvider --- docs/configuration.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/configuration.md b/docs/configuration.md index 425fb5579a..098a361ff2 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -41,6 +41,7 @@ This option obviously would not make sense for language servers for other langua Here is a list of the additional settings currently supported by `haskell-language-server`, along with their setting key (you may not need to know this) and default: - Formatting provider (`haskell.formattingProvider`, default `ormolu`): what formatter to use; one of `floskell`, `ormolu`, `fourmolu`, or `stylish-haskell`. +- Cabal formatting provider (`haskell.cabalFormattingProvider`, default `cabal-gild`): what formatter to use for cabal files; one of `cabal-gild` or `cabal-fmt`. - Max completions (`haskell.maxCompletions`, default 40): maximum number of completions sent to the LSP client. - Check project (`haskell.checkProject`, default true): whether to typecheck the entire project on initial load. As it is activated by default could drive to bad performance in large projects. - Check parents (`haskell.checkParents`, default `CheckOnSave`): when to typecheck reverse dependencies of a file; one of `NeverCheck`, `CheckOnSave` (means dependent/parent modules will only be checked when you save), or `AlwaysCheck` (means re-typechecking them on every change). From d00648eaf0d94c52e4c9ff5349e5d5afc9ec66e4 Mon Sep 17 00:00:00 2001 From: Lin Jian Date: Wed, 7 May 2025 03:28:53 +0800 Subject: [PATCH 2/3] Add doc for haskell.sessionLoading --- docs/configuration.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/configuration.md b/docs/configuration.md index 098a361ff2..9da816c09e 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -45,6 +45,7 @@ Here is a list of the additional settings currently supported by `haskell-langua - Max completions (`haskell.maxCompletions`, default 40): maximum number of completions sent to the LSP client. - Check project (`haskell.checkProject`, default true): whether to typecheck the entire project on initial load. As it is activated by default could drive to bad performance in large projects. - Check parents (`haskell.checkParents`, default `CheckOnSave`): when to typecheck reverse dependencies of a file; one of `NeverCheck`, `CheckOnSave` (means dependent/parent modules will only be checked when you save), or `AlwaysCheck` (means re-typechecking them on every change). +- Session loading preference (`haskell.sessionLoading`, default `singleComponent`): how to load sessions; one of `singleComponent` (means always loading only a single component when a new component is discovered) or `multipleComponents` (means always preferring loading multiple components in the cradle at once). `multipleComponents` might not be always possible, if the tool doesn't support multiple components loading. The cradle can decide how to handle these situations, and whether to honour the preference at all. #### Generic plugin configuration From 0dca2a765cc58a266d379cacc6082c24e82b1789 Mon Sep 17 00:00:00 2001 From: Lin Jian Date: Wed, 7 May 2025 03:38:24 +0800 Subject: [PATCH 3/3] Add doc for project-wide renaming --- docs/features.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/docs/features.md b/docs/features.md index 5aade08db3..1eab0054b4 100644 --- a/docs/features.md +++ b/docs/features.md @@ -411,6 +411,17 @@ Known limitations: - Cross-module renaming requires all components to be indexed, which sometimes causes [partial renames in multi-component projects](https://github.com/haskell/haskell-language-server/issues/2193). +To eagerly load all components, you need to + +- set `haskell.sessionLoading` to `multipleComponents`, +- set `hie.yaml` to load all components (currently only cabal supports this), + ```yaml + cradle: + cabal: + component: all + ``` +- and enable tests and benchmarks in `cabal.project` with `tests: True` and `benchmarks: True`. + ## Semantic tokens Provided by: `hls-semantic-tokens-plugin`