LSP-typescript icon indicating copy to clipboard operation
LSP-typescript copied to clipboard

Diagnostics across files within a project

Open agreco opened this issue 3 years ago • 13 comments

Hey,

I've been using this LSP server with a lot of success on my projects.

There is one feature I think is still missing, which is the ability to use the LSP diagnostics panel to show all errors/warnings across files within a project. To determine if a project has any issues I have to compile the project from outside ST.

I raised the same issue here: https://github.com/sublimelsp/LSP/issues/1803, and the advice was that type of feature would need to be handled by the LSP server in question.

Hope this is enough info.

Cheers

agreco avatar Jul 21 '21 08:07 agreco

The server itself is at https://github.com/typescript-language-server/typescript-language-server. This package is just a simple wrapper to get it running.

That said, I don't really think https://github.com/typescript-language-server/typescript-language-server can support it. It depends on typescript compiler itself (tsserver) and I don't see this being an option there.

rchl avatar Aug 23 '21 20:08 rchl

In any case, feel free to raise this at https://github.com/typescript-language-server/typescript-language-server.

Even though I'm one of the maintainers of that server, I'm not sure if that's possible. Maybe someone else will be able to chime in there.

rchl avatar Aug 23 '21 20:08 rchl

In any case, feel free to raise this at https://github.com/typescript-language-server/typescript-language-server.

Even though I'm one of the maintainers of that server, I'm not sure if that's possible. Maybe someone else will be able to chime in there.

Sure thing, thanks for the reply.

agreco avatar Aug 24 '21 11:08 agreco

As I've eventually realized in the linked issue, this is a feature that fits this package more than the actual server.

rchl avatar Sep 13 '21 14:09 rchl

Cool! Look forward to some more discussions :)

agreco avatar Sep 13 '21 14:09 agreco

Opps! just closed this ticket by accident. Apologies!!

agreco avatar Sep 13 '21 14:09 agreco

Sounds like a job for a Build System? https://www.sublimetext.com/docs/build_systems.html

rwols avatar Sep 14 '21 16:09 rwols

That would probably not provide a great experience since it would pop up the panel on starting each build rather than only showing a panel on there being a build errors.

So probably it would have to be some custom command similar to an example in the documentation. And not necessarily tied to the build system.

rchl avatar Sep 16 '21 06:09 rchl

Related issue https://github.com/sublimelsp/LSP/issues/1868

predragnikolic avatar Oct 14 '21 10:10 predragnikolic

Related issue sublimelsp/LSP#1868

That issue is quite interesting, it seems that the PR which was created off the back of that has been merged and should provide diagnostics across a project. I've tried updating my packages but I'm not experiencing this change, can anyone else confirm?

agreco avatar Nov 17 '21 16:11 agreco

That's not gonna help here as the server doesn't report diagnostics for the whole project in the first place.

rchl avatar Nov 17 '21 21:11 rchl

That's not gonna help here as the server doesn't report diagnostics for the whole project in the first place.

Ah of course! Apologies for any confusion caused.

agreco avatar Nov 23 '21 20:11 agreco

tsc --no-emit reports type errors across the project, would it be possible to get these kinds of results through LSP and be able to navigate to each issue or apply code actions to them?

JGJP avatar Nov 25 '22 05:11 JGJP