Add the ability to run elixir tests from test lenses#2407
Add the ability to run elixir tests from test lenses#2407yyoncho merged 3 commits intoemacs-lsp:masterfrom
Conversation
|
|
||
| (defun lsp-elixir--build-test-command (argument) | ||
| "Builds the test command from the ARGUMENT." | ||
| (let ((test-name (gethash "testName" argument)) |
There was a problem hiding this comment.
using gethash is not allowed. All the access to the data structures that come from the language server should happen either by defined lsp-interface or by using lsp-get. This will allow us to migrate to using plists instead of hashtables. You may refer to rust-analyzer for example: https://github.com/yyoncho/lsp-mode/blob/headerline-errors/lsp-protocol.el#L278
There was a problem hiding this comment.
thanks, will have a look.
There was a problem hiding this comment.
@yyoncho I changed to lsp-get, but will figure out how lsp-interface works tomorrow if it might be a better fit.
There was a problem hiding this comment.
lsp-get is good enough for non-core components given the fact that this structure will be accessed only in a few places.
As a side note, most likely vscode supports running the tests in the debugger, right? We can implement that as well.
There was a problem hiding this comment.
Do you mean dap-mode? I have not really worked with it before, but can have a look. Ideally i would not want to click to run tests, but this is the baseline work for future capabilities it seems.
There was a problem hiding this comment.
Do you mean dap-mode?
yes.
Ideally i would not want to click to run tests, but this is the baseline work for future capabilities it seems.
There is lsp-avy-lens. And then you will be able to re-run with M-x recompile.
|
Thank you for contributing to |
Tests running code lenses are now provided by elixir-lsp elixir-lsp/elixir-ls#389 and implemented for vscode elixir-lsp/vscode-elixir-ls#155.
This adds the ability to switch on elixir test lenses and will run the tests using the compile function.