-
-
Notifications
You must be signed in to change notification settings - Fork 389
Add missing config options in documentation #2203
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
jneira
commented
Sep 17, 2021
•
edited
Loading
edited
- Added diagnosticsDebounceDuration, checkProject, checkParents
- Also add link to the issue about liquid haskell
- Change the tone of uding hie.yaml suggestion: the default should be let hls detect it auto
... diagnosticsDebounceDuration, checkProject, checkParents Aldo add link to the issue about liquid haskell
- 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 load. AS it is activate by default could drive to bad perfomance in large projects. | ||
- Check parents (`haskell.checkParents`, default `CheckOnSaveAndClose`): when to typecheck reverse dependencies of a file; one of `NeverCheck`, `CheckOnClose`, `CheckOnSaveAndClose`, or `AlwaysCheck`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it can affect performance it should be noted how
To make clear the default should be let hls detect it automatically
- Completion snippets (`haskell.completionSnippetsOn`, default true): whether to support completion snippets | ||
- Liquid Haskell (`haskell.liquidOn`, default false): whether to enable Liquid Haskell support (currently unused until the Liquid Haskell support is functional again) | ||
- Hlint (`haskell.hlintOn`, default true): whether to enable Hlint support | ||
- Formatting provider (`haskell.formattingProvider`, default `ormolu`): what formatter to use; one of `floskell`, `ormolu`, `fourmolu`, `stylish-haskell`, or `brittany` (if compiled with the brittany plugin). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think these might be better as tables?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, it will look cleaner
- Actual plugin names are: `ghcide-code-actions-fill-holes`, `ghcide-completions`, `ghcide-hover-and-symbols`, `ghcide-type-lenses`, `ghcide-code-actions-type-signatures`, `ghcide-code-actions-bindings`, `ghcide-code-actions-imports-exports`, `eval`, `moduleName`, `pragmas`, `refineImports`, `importLens`, `class`, `tactics` (aka wingman), `hlint`, `haddockComments`, `retrie`, `splice`. | ||
- So to disable the import lens with an explicit list of module definitions you could set `haskell.plugin.importLens.globalOn: false` | ||
- `haskell.plugin.${pluginName}.${lspCapability}On`: usually with default true. Whether a concrete plugin capability is enabled. | ||
- Capabilities are the different ways a lsp server can interact with the editor. The current available capabilities of the server are: `callHierarchy`, `codeActions`, `codeLens`, `diagnostics`, `hover`, `symbols`, `completion`, `rename`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤯
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a table here too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like tables!
Also this is a good conceptual explanation, but for our users I don't think it's enough that they can know which options they can actually set - they'd have to know which plugins have which capabilities.
I think the best thing is just a big, dumb, table. Ideally auto-generated!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agree, what do you think about merge this as is and improve it in other pr's?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh yes, definitely!
- `haskell.plugin.ghcide-type-lenses.config.mode`, default `always`: Control how type lenses are shown. One of `always`, `exported`, `diganostics`. | ||
- `hlint`: | ||
- `haskell.plugin.hlint.config.flags`, default empty: List of flags used by hlint. | ||
This reference of configuration can be outdated at any time but we can query the `haskell-server-executable` about what configuration is effectively used: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be nice if we had some way to auto-generate this stuff into the docs. Probably not worth the effort to do fully, but perhaps we could have a halfway house, like:
- Write a tool like
vscode-extension-schema
that prints out a markdown or RST table of all the options. - Commit the output to the repo. Regenerate it occasionally if we notice it's out of date.
- Include the generated table into the docs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, but I would do it manually for now in this pr, we could open an issue to track it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was thinking in include the default config/JSON schema directly in docs for reference and link it here, it is easy to regenerate just with actual hls cli output and later we can process it to make it nicer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, but I don't think we should make our users read a JSON file. Either we'll be making a table by hand or we write something to do it 🤷
* Add missing config options ... diagnosticsDebounceDuration, checkProject, checkParents Aldo add link to the issue about liquid haskell * Section about generic plugin configuration * Add plugin specific config * Mark haskell.completionSnippetsOn as deprecated * Remove unused diagnosticsDebounceDuration * Correct typos * Change tone of using hie.yaml suggestion To make clear the default should be let hls detect it automatically * Update exclude list precommit hook * Remove diagnosticsDebounceDuration from source code * Correct typo Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>