SUMMARY *** Request: allow diagnostics to be ignored by [diagnostic severity](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#diagnosticSeverity) and/or pattern. Rust supports disabling code at compile-time via feature flags. Its LSP server, rust-analyzer, will report an *information* diagnostic whenever it encounters code which is code which is disabled this way (I find this behaviour dubious, but rust-analyzer is tested against VS Code and is presumably okay there). In Kate, these diagnostics result in each line of the disabled code section being underlined and an info pop-up on mouse-over anywhere here. This behaviour is useless and distracting. (Even if it were easy enough to switch the current set of feature-flags to enable scanning of this code section, this behaviour would still not be desirable since it is common to need to edit code both with and without some feature, and the current underline is quite ugly for a block of code while the pop-up just gets in the way.) *** STEPS TO REPRODUCE 1. Set up a project with rust-analyzer 2. Add some code like: #[cfg(feature = "foo")] println("this message is only printed with feature 'foo'");
You can suppress a diagnostic using a pattern, see https://docs.kde.org/stable5/en/kate/kate/kate-application-plugin-lspclient.html Alternatively you can disable on this on the server side: ``` "lspclient": { "servers": { "rust": { "initializationOptions": { "diagnostics": { "disabled": [ "inactive-code" ] } } } } } ```