lsp: Add server-side tracing support (#15230)

This PR adds another row to the LSP log view: Server traces

![image](https://github.com/user-attachments/assets/e3f77944-45e0-4d04-92fd-aea212859e86)


[Traces](https://docs.rs/lsp-types/latest/lsp_types/notification/enum.LogTrace.html)
are intended for logging execution diagnostics, which is different from
`LogMessage` that we currently support.
When `Server trace` is selected, user can select the level of tracing
(`off`/`messages`/`verbose`) to their liking.

Release Notes:

- Added support for language server tracing to the LSP log view.
This commit is contained in:
Piotr Osiewicz 2024-07-29 01:53:30 +02:00 committed by GitHub
parent bb188f673e
commit a875dd153d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 301 additions and 139 deletions

View file

@ -52,7 +52,7 @@ impl FluentBuilder for ContextMenu {}
impl ContextMenu {
pub fn build(
cx: &mut WindowContext,
f: impl FnOnce(Self, &mut WindowContext) -> Self,
f: impl FnOnce(Self, &mut ViewContext<Self>) -> Self,
) -> View<Self> {
cx.new_view(|cx| {
let focus_handle = cx.focus_handle();