You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, when a language server (e.g. Haskell Language Server) returns responses that include newer or partially unsupported LSP extensions (such as textDocument/inlayHint or importLens), LSP4IJ throws a ResponseErrorException and stops consuming the response. This behavior prevents the IDE plugin from continuing to provide other available services, even if most of the protocol is still compatible.
Problem:
Strict error handling causes the entire language server integration to fail when encountering one unsupported feature.
Users lose access to otherwise functional features (completion, diagnostics, hover, etc.).
This is especially problematic for fast-evolving language servers (e.g. HLS) that adopt new LSP extensions ahead of client support.
Proposal:
Introduce a configurable error reporting level in LSP4IJ, for example:
Strict (default): current behavior, fail on any protocol mismatch.
Warn: log the error, show a warning to the user, but continue consuming other responses.
Silent: ignore unsupported responses, continue with available features.
Benefits:
Improves resilience of LSP4IJ-based plugins against evolving language servers.
Allows users to continue working with partially compatible servers.
Provides flexibility for plugin developers and end users to choose the desired balance between strictness and usability.
Suggested Implementation:
Add a configuration option (e.g. in plugin settings or via API) to set error reporting level.
Wrap JSON-RPC response handling with a try/catch that respects the configured level.
Ensure warnings are logged in IDE event log for transparency.
Example Use Case:
With Haskell Language Server, importLens may fail due to rule mismatch, but other features (completion, diagnostics) remain usable. Under "Warn" mode, the plugin would log the error but continue providing those features.
changed the title [-]Allow configurable error reporting levels for partial LSP compatibility[/-][+]Bug/Feature Request: Allow configurable error reporting levels for partial LSP compatibility[/+]on Nov 29, 2025
To be honnest with you I dont understand your issue. LSP4IJ checks the server capability and if server has the proper server capabilty it consumes the lsp request.
The ResponseErrorException is thrown when server throws an exception. It is not lsp4ij which throws this error.
If some lsp feature like inlayHint fails it doesnt fail other lsp requests like completion, etc
IDEA version: 2025.2.5
HLS version: recommend
ghc version: recommend
plugin based on LSP4IJ: Haskell lsp
file: Main.hs in a simple `cabal init --minimal` project
user action: config the haskell plugin and restart the project. Then type any char in the file
zim
***@***.***
The levels this asks for exist: each language server has an Error reporting setting in its Debug tab, with None, In log and As notification (ErrorReportingKind), and LSP4IJ applies it to the errors of its LSP requests. None or In log silences a server's errors for the methods it only partly supports. If an error still pops up with None, a stack trace would show which path skips the setting.
Activity
[-]Allow configurable error reporting levels for partial LSP compatibility[/-][+]Bug/Feature Request: Allow configurable error reporting levels for partial LSP compatibility[/+]angelozerr commentedon Nov 29, 2025
To be honnest with you I dont understand your issue. LSP4IJ checks the server capability and if server has the proper server capabilty it consumes the lsp request.
The ResponseErrorException is thrown when server throws an exception. It is not lsp4ij which throws this error.
If some lsp feature like inlayHint fails it doesnt fail other lsp requests like completion, etc
Zim-Inn commentedon Nov 29, 2025
yes, i got it. i mean that it is huge noise in IDEA, because the error window pop up
angelozerr commentedon Nov 29, 2025
By default you have a popup error but you can disable it, right?
Zim-Inn commentedon Nov 29, 2025
angelozerr commentedon Nov 29, 2025
Could you explain me how to reproduce your issue please.
Zim-Inn commentedon Nov 29, 2025
lagergren commentedon Nov 2, 2026
The levels this asks for exist: each language server has an Error reporting setting in its Debug tab, with
None,In logandAs notification(ErrorReportingKind), and LSP4IJ applies it to the errors of its LSP requests.NoneorIn logsilences a server's errors for the methods it only partly supports. If an error still pops up withNone, a stack trace would show which path skips the setting.fix: log the errors of a language server set to "In log" as warnings,…