racket-langserver icon indicating copy to clipboard operation
racket-langserver copied to clipboard

Feature Request: Highlight Test Coverage

Open gordoncyu opened this issue 1 year ago • 5 comments

It would be great if other editors could use the language server to highlight code not covered by tests, just like how DrRacket does.

gordoncyu avatar Sep 12 '24 19:09 gordoncyu

Do you mean the functionality describe in https://docs.racket-lang.org/plait/testing-tutorial.html?

dannypsnl avatar Sep 14 '24 14:09 dannypsnl

Yes, I am referring to the "Syntactic test suite coverage". Currently I am just running raco cover thing.rhm and opening the html file in chrome, but giving this information in editor would definitely smooth my workflow and be aligned with the stated goal of "provid[ing] functionality that mimics DrRacket's code tools as closely as possible" in the README, helping in the way any LSP should.

gordoncyu avatar Sep 14 '24 19:09 gordoncyu

I think lsp server can't do that. Test coverage requires to run the code, while lsp server does not run the code and should not run.

There should be a editor specific plugin to do it. For example, there is a button or codelens, click it to run tests in repl, and repl does something under the hood, then show information in editor.

6cdh avatar Sep 15 '24 12:09 6cdh

Make sense, @gordoncyu you can also open this request to https://github.com/Eugleo/magic-racket.

dannypsnl avatar Sep 30 '24 01:09 dannypsnl

I use neovim btw, so doing so would not be my prerogative. I followed @6cdh's advice, writing my own plugin: https://github.com/gordoncyu/racket-cover.nvim.

gordoncyu avatar Oct 01 '24 23:10 gordoncyu