elixir-ls
elixir-ls copied to clipboard
working together with credo in Spacemacs (flycheck)?
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?
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 A PR would be welcome
There are other language servers that wrap credo