Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to silence warnings from and get status of an LSP server session? #552

Open
angelozerr opened this issue Oct 1, 2024 Discussed in #493 · 1 comment
Open

How to silence warnings from and get status of an LSP server session? #552

angelozerr opened this issue Oct 1, 2024 Discussed in #493 · 1 comment
Assignees

Comments

@angelozerr
Copy link
Contributor

Discussed in #493

Originally posted by harry-xm August 28, 2024
Open a Rust file in https://github.com/eunomia-bpf/eunomia-bpf/tree/master/ecli on macOS and LSP4IJ turns every warning message from rust-analyzer into a notification that is persisted in the Notifications panel.

lsp4ij screenshot

lsp4ij screenshot 2

Is it possible to suppress these notifications, and like the VSCode plugin, display a warning in the status bar? The user can then choose to open the LSP log buffer by clicking it. IMHO, that would be more user-friendly than a bunch of notifications.

vscode screenshot

@angelozerr angelozerr added this to the 0.7.0 milestone Oct 1, 2024
@angelozerr angelozerr self-assigned this Oct 1, 2024
@angelozerr
Copy link
Contributor Author

Today this notification error is handled with LanguageClientImpl with

  @Override
    public final void showMessage(MessageParams messageParams) {
        ServerMessageHandler.showMessage(wrapper.getServerDefinition().getDisplayName(), messageParams, getProject());
    }

Badly we cannot override it because of final modifier.

I removed this final modifier in #543 and you will able to override this showMessage to handle message as you wish.

@angelozerr angelozerr removed this from the 0.7.0 milestone Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant