elixir-ls icon indicating copy to clipboard operation
elixir-ls copied to clipboard

working together with credo in Spacemacs (flycheck)?

Open x-ji opened this issue 6 years ago • 2 comments
trafficstars

Environment

  • Elixir & Erlang versions (elixir --version): 1.8.1
  • Operating system: MacOS
  • Client (editor or IDE): Emacs

The codebase that I'm working on enforces strict credo check on the source code, so it would be nice to have credo working with flycheck, just as is the case by default under alchemist.

Somebody mentioned in ElixirForum that they also tried to do it with the following config:

  (add-hook 'elixir-mode-hook
    (lambda ()
      (flycheck-credo-setup)))

  (add-hook 'lsp-after-initialize-hook
            (lambda ()
              (flycheck-add-next-checker 'lsp-ui
                                         'elixir-credo)))

But it doesn't really work, as credo messages will only be updated in the flycheck buffer, whenever lsp-ui error messages are also updated.

Is there a way to make credo work with lsp? Or is it currently not possible due to some limitations?

x-ji avatar Sep 26 '19 09:09 x-ji

Mpanarin in ElixirForum mentioned that a plugin architecture might be needed for elixir-ls to allow integrating information from linters such as credo.

x-ji avatar Sep 26 '19 14:09 x-ji

@x-ji A PR would be welcome

lukaszsamson avatar Sep 30 '20 15:09 lukaszsamson

There are other language servers that wrap credo

lukaszsamson avatar Jun 03 '23 14:06 lukaszsamson