Skip to content

Per-project formatter #347

Answered by mrcjkb
leana8959 asked this question in Q&A
Feb 22, 2024 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

Hey 👋

haskell-tools doesn't do formatting. That's done by haskell-language-server, which has plugins for the for the different formatting providers.

For configuration via this plugin, see the advanced configuration section in the readme.

For haskell-language-server settings, see the hls documentation.

haskell-language-server loads the configuration at startup, and can't dynamically change the formatting provider at runtime.

If you only need different settings per project, you can use a hls.json (see this readme section).

To change the provider within a session, for the same project, you would have to change the configuration and then restart the LSP client with :HlsRestart (or vim.cmd.Hls…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@leana8959
Comment options

Answer selected by leana8959
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants