The proposed feature would add a credo.lsp (mix credo.lsp) mix task that would start an LSP server for use in text editors. The LSP server would be able to provide full project diagnostics (credo warnings/errors/hints) to the editor for display.
Currently, the way most editors integrate with Credo is via running mix credo --format=flycheck path/to/file.ex on file change, parsing the results, and rendering the results in the editor.
This generally only shows the warnings/errors for the currently viewed file, and is slow, as it boots the VM from scratch every time.
The server concept would boot when the editor starts and communicate via stdin/stdout with a json rpc protocol (the Language Server Protocol). elixir-ls is an example of a full Elixir LS implementation.
Which existing behaviour would change?
This would be an additive patch, adding the mix task to start the server. and the server to run the checks when files change.
What do you want Credo to do?
The proposed feature would add a
credo.lsp
(mix credo.lsp) mix task that would start an LSP server for use in text editors. The LSP server would be able to provide full project diagnostics (credo warnings/errors/hints) to the editor for display.Currently, the way most editors integrate with Credo is via running
mix credo --format=flycheck path/to/file.ex
on file change, parsing the results, and rendering the results in the editor.This generally only shows the warnings/errors for the currently viewed file, and is slow, as it boots the VM from scratch every time.
The server concept would boot when the editor starts and communicate via stdin/stdout with a json rpc protocol (the Language Server Protocol). elixir-ls is an example of a full Elixir LS implementation.
Which existing behaviour would change?
This would be an additive patch, adding the mix task to start the server. and the server to run the checks when files change.