turn off diagnostics/typecheck diagnostics
Question
TLDR: I want the reverse of disableLanguageServices
My setup mainly uses Pyright + Ruff, with Pyright diagnostics disabled. I don’t really rely on full type-checking and only want simple diagnostics from the Ruff linter. I mostly use Pyright as a “go-to-definition” engine. I want do the same with ty.
I’m trying to find a setting in ty that disables this while still keeping navigation features, but I couldn’t find anything equivalent.
Version
No response
I think adding this as a configuration option (or having a drop down with LSP, Diagnostics only, and Full) makes sense.
An alternative is to allow users to easily deselect all rules.
on nvim, it can be disabled by client.server_capabilities.diagnosticProvider = true but would be the best i can be controlled within ty setting
+1 for this. I'm having @carlesoctav's setup too: pyright (no diag) + ruff. This feature feels mandatory and obvious, especially since many of us already use ruff.
+1 for this. I'm having @carlesoctav's setup too: pyright (no diag) + ruff. This feature feels mandatory and obvious, especially since many of us already use ruff.
Note that ty and ruff show different diagnostics. There are some diagnostics like syntax errors that are surfaced by both tools, but you can disable them in ruff https://docs.astral.sh/ruff/editors/settings/#showsyntaxerrors
I know, that is also true of pyright. In my case, I already have a configured ruff.toml with the rules I care about, and using ty comes down to the fact that it does not interfere at all with that setup. There is no point in having two tools. If ty provides unique diagnostics, they can become part of ruff, in my opinion, similar to how flake and others are integrated. What makes ty an exception to this rule?
What makes ty an exception to this rule?
It works fundamentally differently from Ruff because it supports multifile analysis. Integrating ty (or ruff into ty) is a big lift. We may do this in the future but decided against it to ship a type checker sooner.
That makes sense. Then I suppose the most convenient path forward is to give us an option to disable diagnostics.