jeapostrophe / racket-langserver

Other
263 stars 24 forks source link

Feature Request: Highlight Test Coverage #134

Open gordoncyu opened 6 days ago

gordoncyu commented 6 days ago

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

dannypsnl commented 4 days ago

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

gordoncyu commented 4 days ago

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.

6cdh commented 3 days ago

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.