Skip to content

Improve error message when Brittany is selected as a formatter and server is built without -fagpl #269

Closed
@soywod

Description

@soywod

I try to replace Ormolu by Brittany, but I get this message: Formatter plugin: no formatter found for:[brittany]. I'm using Neovim + Coc, here my config:

  "languageserver": {
    "haskell": {
      "command": "haskell-language-server-wrapper",
      "args": ["--lsp"],
      "filetypes": [
        "hs",
        "lhs",
        "haskell"
      ],
      "rootPatterns": [
        "*.cabal",
        "stack.yaml",
        "cabal.project",
        "package.yaml"
      ],
      "initializationOptions": {
        "haskell": {
          "formattingProvider": "brittany"
        }
      }
    },

I tried to installed brittany globally and locally (inside my project), but I still get the same error. I'm using ghc v8.8.4 with stack v2.3.1.

It could be interesting to add a tiny section about how to use a different formatting provider.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions