Code view:

A painting is a person's account of this edit as text, recorded independently of the node mapping - a rendering often has several equally defensible answers where the mapping has one. Deletions and insertions carry no position on the opposite side in a painting, so that panel draws no caret for them.

Before

…lines 1–544 unchanged (544 lines)
545 )
546 .await?;
547
548 let mut initialization_options = Self::initialization_options_for_adapter(
549 adapter.adapter.clone(),
550 &delegate,
551 )
552 .await?;
553
554 match (&mut initialization_options, override_options) {
555 (Some(initialization_options), Some(override_options)) => {
556 merge_json_value_into(override_options, initialization_options);
557 }
…lines 558–3767 unchanged (3210 lines)
3768 self.rebuild_watched_paths(language_server_id, cx);
3769 }
3770
3771 async fn initialization_options_for_adapter(
3772 adapter: Arc<dyn LspAdapter>,
3773 delegate: &Arc<dyn LspAdapterDelegate>,
3774 ) -> Result<Option<serde_json::Value>> {
3775 let Some(mut initialization_config) =
3776 adapter.clone().initialization_options(delegate).await?
3777 else {
3778 return Ok(None);
3779 };
3780
3781 for other_adapter in delegate.registered_lsp_adapters() {
3782 if other_adapter.name() == adapter.name() {
…lines 3783–13982 unchanged (10200 lines)
13983 self.name.clone()
13984 }
13985
13986 async fn initialization_options(
13987 self: Arc<Self>,
13988 _: &Arc<dyn LspAdapterDelegate>,
13989 ) -> Result<Option<serde_json::Value>> {
13990 let Some(options) = &self.initialization_options else {
13991 return Ok(None);
13992 };
13993 let result = serde_json::from_str(options)?;
13994 Ok(result)
13995 }
…lines 13996–14432 unchanged (437 lines)

After

…lines 1–544 unchanged (544 lines)
545 )
546 .await?;
547
548 let mut initialization_options = Self::initialization_options_for_adapter(
549 adapter.adapter.clone(),
550 &delegate,
551 cx,
552 )
553 .await?;
554
555 match (&mut initialization_options, override_options) {
556 (Some(initialization_options), Some(override_options)) => {
557 merge_json_value_into(override_options, initialization_options);
…lines 558–3768 unchanged (3211 lines)
3769 self.rebuild_watched_paths(language_server_id, cx);
3770 }
3771
3772 async fn initialization_options_for_adapter(
3773 adapter: Arc<dyn LspAdapter>,
3774 delegate: &Arc<dyn LspAdapterDelegate>,
3775 cx: &mut AsyncApp,
3776 ) -> Result<Option<serde_json::Value>> {
3777 let Some(mut initialization_config) =
3778 adapter.clone().initialization_options(delegate, cx).await?
3779 else {
3780 return Ok(None);
3781 };
3782
3783 for other_adapter in delegate.registered_lsp_adapters() {
3784 if other_adapter.name() == adapter.name() {
…lines 3785–13984 unchanged (10200 lines)
13985 self.name.clone()
13986 }
13987
13988 async fn initialization_options(
13989 self: Arc<Self>,
13990 _: &Arc<dyn LspAdapterDelegate>,
13991 _: &mut AsyncApp,
13992 ) -> Result<Option<serde_json::Value>> {
13993 let Some(options) = &self.initialization_options else {
13994 return Ok(None);
13995 };
13996 let result = serde_json::from_str(options)?;
13997 Ok(result)
…lines 13998–14435 unchanged (438 lines)

Before

source_file
line_comment
// "//"
inner_doc_comment_marker
! "!"
doc_comment " LSP store provides unified access to the language server pr"...
line_comment
// "//"
inner_doc_comment_marker
! "!"
doc_comment " The consumers of LSP store can interact with language serve"...
line_comment
// "//"
inner_doc_comment_marker
! "!"
doc_comment "\n"
line_comment
// "//"
inner_doc_comment_marker
! "!"
doc_comment " # Local/Remote LSP Stores\n"
line_comment
// "//"
inner_doc_comment_marker
! "!"
doc_comment " This module is split up into three distinct parts:\n"
line_comment
// "//"
inner_doc_comment_marker
! "!"
doc_comment " - [`LocalLspStore`], which is ran on the host machine (eith"...
line_comment
// "//"
inner_doc_comment_marker
! "!"
doc_comment " - [`RemoteLspStore`], which is ran on the remote machine (p"...
line_comment
// "//"
inner_doc_comment_marker
! "!"
doc_comment " The remote stores don't really care about which language "...
line_comment
// "//"
inner_doc_comment_marker
! "!"
doc_comment " - [`LspStore`], which unifies the two under one consistent "...
line_comment
// "//"
inner_doc_comment_marker
! "!"
doc_comment "\n"
line_comment
// "//"
inner_doc_comment_marker
! "!"
doc_comment " Most of the interesting work happens at the local layer, as"...
mod_item
visibility_modifier
pub "pub"
mod "mod"
identifier "clangd_ext"
; ";"
mod_item
mod "mod"
identifier "code_lens"
; ";"
mod_item
mod "mod"
identifier "document_colors"
; ";"
mod_item
mod "mod"
identifier "document_symbols"
; ";"
mod_item
mod "mod"
identifier "folding_ranges"
; ";"
mod_item
mod "mod"
identifier "inlay_hints"
; ";"
mod_item
visibility_modifier
pub "pub"
mod "mod"
identifier "json_language_server_ext"
; ";"
mod_item
visibility_modifier
pub "pub"
mod "mod"
identifier "log_store"
; ";"
mod_item
visibility_modifier
pub "pub"
mod "mod"
identifier "lsp_ext_command"
; ";"
mod_item
visibility_modifier
pub "pub"
mod "mod"
identifier "rust_analyzer_ext"
; ";"
mod_item
mod "mod"
identifier "semantic_tokens"
; ";"
mod_item
visibility_modifier
pub "pub"
mod "mod"
identifier "vue_language_server_ext"
; ";"
use_declaration
use "use"
scoped_identifier
scoped_identifier
self "self"
:: "::"
identifier "code_lens"
:: "::"
identifier "CodeLensData"
; ";"
use_declaration
use "use"
scoped_identifier
scoped_identifier
self "self"
:: "::"
identifier "document_colors"
:: "::"
identifier "DocumentColorData"
; ";"
use_declaration
use "use"
scoped_identifier
scoped_identifier
self "self"
:: "::"
identifier "document_symbols"
:: "::"
identifier "DocumentSymbolsData"
; ";"
use_declaration
use "use"
scoped_identifier
scoped_identifier
self "self"
:: "::"
identifier "inlay_hints"
:: "::"
identifier "BufferInlayHints"
; ";"
use_declaration (+187 nodes collapsed)
use_declaration
use "use"
scoped_use_list
identifier "anyhow"
:: "::"
use_list
{ "{"
use_as_clause
identifier "Context"
as "as"
identifier "_"
, ","
identifier "Result"
, ","
identifier "anyhow"
} "}"
; ";"
use_declaration
use "use"
scoped_identifier
identifier "async_trait"
:: "::"
identifier "async_trait"
; ";"
use_declaration
use "use"
scoped_use_list
identifier "client"
:: "::"
use_list
{ "{"
identifier "TypedEnvelope"
, ","
identifier "proto"
} "}"
; ";"
use_declaration
use "use"
scoped_identifier
identifier "clock"
:: "::"
identifier "Global"
; ";"
use_declaration
use "use"
scoped_use_list
identifier "collections"
:: "::"
use_list
{ "{"
identifier "BTreeMap"
, ","
identifier "BTreeSet"
, ","
identifier "HashMap"
, ","
identifier "HashSet"
, ","
identifier "btree_map"
} "}"
; ";"
use_declaration (+42 nodes collapsed)
use_declaration
use "use"
scoped_use_list
identifier "globset"
:: "::"
use_list
{ "{"
identifier "Glob"
, ","
identifier "GlobBuilder"
, ","
identifier "GlobMatcher"
, ","
identifier "GlobSet"
, ","
identifier "GlobSetBuilder"
} "}"
; ";"
use_declaration (+31 nodes collapsed)
use_declaration
use "use"
scoped_identifier
identifier "http_client"
:: "::"
identifier "HttpClient"
; ";"
use_declaration
use "use"
use_as_clause
scoped_identifier
identifier "itertools"
:: "::"
identifier "Itertools"
as "as"
identifier "_"
; ";"
use_declaration (+123 nodes collapsed)
use_declaration (+80 nodes collapsed)
use_declaration
use "use"
scoped_identifier
identifier "node_runtime"
:: "::"
identifier "read_package_installed_version"
; ";"
use_declaration
use "use"
scoped_identifier
identifier "parking_lot"
:: "::"
identifier "Mutex"
; ";"
use_declaration (+22 nodes collapsed)
use_declaration
use "use"
use_wildcard
scoped_identifier
identifier "rand"
:: "::"
identifier "prelude"
:: "::"
* "*"
; ";"
use_declaration (+31 nodes collapsed)
use_declaration
use "use"
scoped_identifier
identifier "semver"
:: "::"
identifier "Version"
; ";"
use_declaration
use "use"
scoped_identifier
identifier "serde"
:: "::"
identifier "Serialize"
; ";"
use_declaration
use "use"
scoped_identifier
identifier "serde_json"
:: "::"
identifier "Value"
; ";"
use_declaration
use "use"
scoped_use_list
identifier "settings"
:: "::"
use_list
{ "{"
identifier "Settings"
, ","
identifier "SettingsLocation"
, ","
identifier "SettingsStore"
} "}"
; ";"
use_declaration
use "use"
scoped_use_list
identifier "sha2"
:: "::"
use_list
{ "{"
identifier "Digest"
, ","
identifier "Sha256"
} "}"
; ";"
use_declaration
use "use"
scoped_identifier
identifier "snippet"
:: "::"
identifier "Snippet"
; ";"
use_declaration (+126 nodes collapsed)
use_declaration
use "use"
scoped_identifier
identifier "sum_tree"
:: "::"
identifier "Dimensions"
; ";"
use_declaration (+21 nodes collapsed)
use_declaration (+48 nodes collapsed)
use_declaration
visibility_modifier
pub "pub"
use "use"
scoped_identifier
identifier "document_colors"
:: "::"
identifier "DocumentColors"
; ";"
use_declaration
visibility_modifier
pub "pub"
use "use"
scoped_identifier
identifier "folding_ranges"
:: "::"
identifier "LspFoldingRange"
; ";"
use_declaration
visibility_modifier
pub "pub"
use "use"
use_wildcard
identifier "fs"
:: "::"
* "*"
; ";"
use_declaration
visibility_modifier
pub "pub"
use "use"
scoped_identifier
identifier "language"
:: "::"
identifier "Location"
; ";"
use_declaration
visibility_modifier
pub "pub"
use "use"
scoped_use_list
scoped_identifier
identifier "lsp_store"
:: "::"
identifier "inlay_hints"
:: "::"
use_list
{ "{"
identifier "CacheInlayHints"
, ","
identifier "InvalidationStrategy"
} "}"
; ";"
attribute_item (+21 nodes collapsed)
use_declaration
visibility_modifier
pub "pub"
use "use"
use_as_clause
scoped_identifier
identifier "prettier"
:: "::"
identifier "FORMAT_SUFFIX"
as "as"
identifier "TEST_PRETTIER_FORMAT_SUFFIX"
; ";"
use_declaration (+21 nodes collapsed)
use_declaration (+35 nodes collapsed)
const_item
const "const"
identifier "SERVER_LAUNCHING_BEFORE_SHUTDOWN_TIMEOUT"
: ":"
type_identifier "Duration"
= "="
call_expression
scoped_identifier
identifier "Duration"
:: "::"
identifier "from_secs"
arguments
( "("
integer_literal "5"
) ")"
; ";"
const_item
visibility_modifier
pub "pub"
const "const"
identifier "SERVER_PROGRESS_THROTTLE_TIMEOUT"
: ":"
type_identifier "Duration"
= "="
call_expression
scoped_identifier
identifier "Duration"
:: "::"
identifier "from_millis"
arguments
( "("
integer_literal "100"
) ")"
; ";"
const_item
const "const"
identifier "WORKSPACE_DIAGNOSTICS_TOKEN_START"
: ":"
reference_type
& "&"
primitive_type "str"
= "="
string_literal
" "\""
string_content "id:"
" "\""
; ";"
const_item
const "const"
identifier "SERVER_DOWNLOAD_TIMEOUT"
: ":"
type_identifier "Duration"
= "="
call_expression
scoped_identifier
identifier "Duration"
:: "::"
identifier "from_secs"
arguments
( "("
integer_literal "10"
) ")"
; ";"
static_item
static "static"
identifier "NEXT_PROMPT_REQUEST_ID"
: ":"
type_identifier "AtomicUsize"
= "="
call_expression
scoped_identifier
identifier "AtomicUsize"
:: "::"
identifier "new"
arguments
( "("
integer_literal "0"
) ")"
; ";"
attribute_item (+24 nodes collapsed)
enum_item (+22 nodes collapsed)
impl_item (+110 nodes collapsed)
impl_item (+372 nodes collapsed)
attribute_item
# "#"
[ "["
attribute
identifier "derive"
token_tree
( "("
identifier "Debug"
, ","
identifier "Clone"
, ","
identifier "Copy"
, ","
identifier "PartialEq"
, ","
identifier "Eq"
) ")"
] "]"
enum_item
visibility_modifier
pub "pub"
enum "enum"
type_identifier "FormatTrigger"
enum_variant_list
{ "{"
enum_variant
identifier "Save"
, ","
enum_variant
identifier "Manual"
, ","
} "}"
enum_item (+35 nodes collapsed)
attribute_item
# "#"
[ "["
attribute
identifier "derive"
token_tree
( "("
identifier "Debug"
, ","
identifier "Clone"
, ","
identifier "PartialEq"
, ","
identifier "Eq"
, ","
identifier "Hash"
) ")"
] "]"
struct_item
visibility_modifier
pub "pub"
struct "struct"
type_identifier "OpenLspBufferHandle"
ordered_field_declaration_list
( "("
generic_type
type_identifier "Entity"
type_arguments
< "<"
type_identifier "OpenLspBuffer"
> ">"
) ")"
; ";"
struct_item
struct "struct"
type_identifier "OpenLspBuffer"
ordered_field_declaration_list
( "("
generic_type
type_identifier "Entity"
type_arguments
< "<"
type_identifier "Buffer"
> ">"
) ")"
; ";"
impl_item (+55 nodes collapsed)
attribute_item
# "#"
[ "["
attribute
identifier "derive"
token_tree
( "("
identifier "Clone"
) ")"
] "]"
struct_item (+26 nodes collapsed)
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " Settings that affect language server identity.\n"
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment "\n"
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " Dynamic settings (`LspSettings::settings`) are excluded bec"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " updated via `workspace/didChangeConfiguration` without rest"...
attribute_item
# "#"
[ "["
attribute
identifier "derive"
token_tree
( "("
identifier "Clone"
, ","
identifier "Debug"
, ","
identifier "Hash"
, ","
identifier "PartialEq"
, ","
identifier "Eq"
) ")"
] "]"
struct_item (+29 nodes collapsed)
attribute_item
# "#"
[ "["
attribute
identifier "derive"
token_tree
( "("
identifier "Clone"
, ","
identifier "Debug"
, ","
identifier "Hash"
, ","
identifier "PartialEq"
, ","
identifier "Eq"
) ")"
] "]"
struct_item (+31 nodes collapsed)
attribute_item
# "#"
[ "["
attribute
identifier "derive"
token_tree
( "("
identifier "Debug"
) ")"
] "]"
struct_item (+75 nodes collapsed)
struct_item (+43 nodes collapsed)
attribute_item
# "#"
[ "["
attribute
identifier "derive"
token_tree
( "("
identifier "Default"
, ","
identifier "Debug"
) ")"
] "]"
struct_item (+40 nodes collapsed)
struct_item (+481 nodes collapsed)
impl_item
impl "impl"
type_identifier "LocalLspStore"
declaration_list
{ "{"
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " Returns the running language server for the given ID. Note "...
function_item (+98 nodes collapsed)
function_item (+422 nodes collapsed)
function_item
fn "fn"
identifier "start_language_server"
parameters (+68 nodes collapsed)
-> "->"
type_identifier "LanguageServerId"
block
{ "{"
let_declaration
let "let"
identifier "worktree"
= "="
call_expression
field_expression
identifier "worktree_handle"
. "."
field_identifier "read"
arguments
( "("
identifier "cx"
) ")"
; ";"
let_declaration
let "let"
identifier "worktree_id"
= "="
call_expression
field_expression
identifier "worktree"
. "."
field_identifier "id"
arguments
( "("
) ")"
; ";"
let_declaration
let "let"
identifier "worktree_abs_path"
= "="
call_expression
field_expression
identifier "worktree"
. "."
field_identifier "abs_path"
arguments
( "("
) ")"
; ";"
let_declaration
let "let"
identifier "toolchain"
= "="
call_expression
field_expression
field_expression
identifier "key"
. "."
field_identifier "toolchain"
. "."
field_identifier "clone"
arguments
( "("
) ")"
; ";"
let_declaration
let "let"
identifier "override_options"
= "="
call_expression
field_expression
field_expression
identifier "settings"
. "."
field_identifier "initialization_options"
. "."
field_identifier "clone"
arguments
( "("
) ")"
; ";"
let_declaration (+34 nodes collapsed)
let_declaration
let "let"
identifier "server_id"
= "="
call_expression
field_expression
field_expression
self "self"
. "."
field_identifier "languages"
. "."
field_identifier "next_language_server_id"
arguments
( "("
) ")"
; ";"
expression_statement (+21 nodes collapsed)
let_declaration (+406 nodes collapsed)
let_declaration
let "let"
identifier "update_binary_status"
= "="
call_expression
field_expression
identifier "wait_until_worktree_trust"
. "."
field_identifier "is_none"
arguments
( "("
) ")"
; ";"
let_declaration (+58 nodes collapsed)
let_declaration (+29 nodes collapsed)
let_declaration (+303 nodes collapsed)
let_declaration
let "let"
identifier "startup"
= "="
block
{ "{"
let_declaration
let "let"
identifier "server_name"
= "="
call_expression
field_expression
field_expression
field_expression
identifier "adapter"
. "."
field_identifier "name"
. "."
integer_literal "0"
. "."
field_identifier "clone"
arguments
( "("
) ")"
; ";"
let_declaration
let "let"
identifier "delegate"
= "="
type_cast_expression
identifier "delegate"
as "as"
generic_type
type_identifier "Arc"
type_arguments
< "<"
dynamic_type
dyn "dyn"
type_identifier "LspAdapterDelegate"
> ">"
; ";"
let_declaration
let "let"
identifier "key"
= "="
call_expression
field_expression
identifier "key"
. "."
field_identifier "clone"
arguments
( "("
) ")"
; ";"
let_declaration
let "let"
identifier "adapter"
= "="
call_expression
field_expression
identifier "adapter"
. "."
field_identifier "clone"
arguments
( "("
) ")"
; ";"
let_declaration
let "let"
identifier "lsp_store"
= "="
call_expression
field_expression
field_expression
self "self"
. "."
field_identifier "weak"
. "."
field_identifier "clone"
arguments
( "("
) ")"
; ";"
let_declaration
let "let"
identifier "pending_workspace_folders"
= "="
call_expression
field_expression
identifier "pending_workspace_folders"
. "."
field_identifier "clone"
arguments
( "("
) ")"
; ";"
let_declaration (+23 nodes collapsed)
let_declaration (+25 nodes collapsed)
let_declaration (+55 nodes collapsed)
call_expression
field_expression
identifier "cx"
. "."
field_identifier "spawn"
arguments
( "("
closure_expression
async "async"
move "move"
closure_parameters
| "|"
identifier "cx"
| "|"
block
{ "{"
let_declaration
let "let"
identifier "result"
= "="
await_expression
async_block
async "async"
block
{ "{"
let_declaration
let "let"
identifier "language_server"
= "="
try_expression
await_expression
identifier "pending_server"
. "."
await "await"
? "?"
; ";"
let_declaration (+40 nodes collapsed)
let_declaration
let "let"
mutable_specifier "mut"
identifier "initialization_options"
= "="
try_expression
await_expression
call_expression
scoped_identifier
identifier "Self"
:: "::"
identifier "initialization_options_for_adapter"
arguments
( "("
call_expression
field_expression
field_expression
identifier "adapter"
. "."
field_identifier "adapter"
. "."
field_identifier "clone"
arguments
( "("
) ")"
, ","
reference_expression
& "&"
identifier "delegate"
, ","
) ")"
. "."
await "await"
? "?"
; ";"
expression_statement (+66 nodes collapsed)
let_declaration (+66 nodes collapsed)
expression_statement (+41 nodes collapsed)
let_declaration
let "let"
identifier "did_change_configuration_params"
= "="
struct_expression
scoped_type_identifier
identifier "lsp"
:: "::"
type_identifier "DidChangeConfigurationParams"
field_initializer_list
{ "{"
field_initializer
field_identifier "settings"
: ":"
identifier "workspace_config"
, ","
} "}"
; ";"
let_declaration (+168 nodes collapsed)
expression_statement (+26 nodes collapsed)
call_expression
scoped_identifier
identifier "anyhow"
:: "::"
identifier "Ok"
arguments
( "("
identifier "language_server"
) ")"
} "}"
. "."
await "await"
; ";"
expression_statement (+280 nodes collapsed)
} "}"
) ")"
} "}"
; ";"
let_declaration
let "let"
identifier "state"
= "="
struct_expression
scoped_type_identifier
identifier "LanguageServerState"
:: "::"
type_identifier "Starting"
field_initializer_list
{ "{"
shorthand_field_initializer
identifier "startup"
, ","
shorthand_field_initializer
identifier "pending_workspace_folders"
, ","
} "}"
; ";"
expression_statement (+33 nodes collapsed)
expression_statement
call_expression
field_expression
field_expression
self "self"
. "."
field_identifier "language_servers"
. "."
field_identifier "insert"
arguments
( "("
identifier "server_id"
, ","
identifier "state"
) ")"
; ";"
expression_statement (+43 nodes collapsed)
identifier "server_id"
} "}"
function_item (+1154 nodes collapsed)
function_item (+4219 nodes collapsed)
function_item (+111 nodes collapsed)
function_item (+148 nodes collapsed)
function_item (+141 nodes collapsed)
function_item (+191 nodes collapsed)
function_item (+204 nodes collapsed)
function_item (+168 nodes collapsed)
function_item (+565 nodes collapsed)
function_item (+749 nodes collapsed)
function_item (+4636 nodes collapsed)
function_item (+630 nodes collapsed)
function_item (+682 nodes collapsed)
function_item (+722 nodes collapsed)
function_item (+328 nodes collapsed)
function_item (+678 nodes collapsed)
function_item (+200 nodes collapsed)
function_item (+1144 nodes collapsed)
function_item (+213 nodes collapsed)
function_item (+1436 nodes collapsed)
function_item (+586 nodes collapsed)
function_item (+154 nodes collapsed)
function_item (+191 nodes collapsed)
function_item (+355 nodes collapsed)
function_item (+199 nodes collapsed)
function_item (+708 nodes collapsed)
function_item (+334 nodes collapsed)
attribute_item
# "#"
[ "["
attribute
identifier "allow"
token_tree
( "("
identifier "clippy"
:: "::"
identifier "type_complexity"
) ")"
] "]"
function_item (+878 nodes collapsed)
function_item (+1991 nodes collapsed)
function_item (+295 nodes collapsed)
function_item (+425 nodes collapsed)
function_item (+1121 nodes collapsed)
function_item (+487 nodes collapsed)
function_item (+153 nodes collapsed)
function_item (+107 nodes collapsed)
function_item (+144 nodes collapsed)
function_item
function_modifiers
async "async"
fn "fn"
identifier "initialization_options_for_adapter"
parameters
( "("
parameter
identifier "adapter"
: ":"
generic_type
type_identifier "Arc"
type_arguments
< "<"
dynamic_type
dyn "dyn"
type_identifier "LspAdapter"
> ">"
, ","
parameter
identifier "delegate"
: ":"
reference_type
& "&"
generic_type
type_identifier "Arc"
type_arguments
< "<"
dynamic_type
dyn "dyn"
type_identifier "LspAdapterDelegate"
> ">"
, ","
) ")"
-> "->"
generic_type
type_identifier "Result"
type_arguments
< "<"
generic_type
type_identifier "Option"
type_arguments
< "<"
scoped_type_identifier
identifier "serde_json"
:: "::"
type_identifier "Value"
> ">"
> ">"
block
{ "{"
let_declaration
let "let"
tuple_struct_pattern
identifier "Some"
( "("
mut_pattern
mutable_specifier "mut"
identifier "initialization_config"
) ")"
= "="
try_expression
await_expression
call_expression
field_expression
call_expression
field_expression
identifier "adapter"
. "."
field_identifier "clone"
arguments
( "("
) ")"
. "."
field_identifier "initialization_options"
arguments
( "("
identifier "delegate"
) ")"
. "."
await "await"
? "?"
else "else"
block
{ "{"
expression_statement
return_expression
return "return"
call_expression
identifier "Ok"
arguments
( "("
identifier "None"
) ")"
; ";"
} "}"
; ";"
expression_statement (+110 nodes collapsed)
call_expression
identifier "Ok"
arguments
( "("
call_expression
identifier "Some"
arguments
( "("
identifier "initialization_config"
) ")"
) ")"
} "}"
function_item (+226 nodes collapsed)
function_item (+135 nodes collapsed)
} "}"
function_item (+326 nodes collapsed)
attribute_item
# "#"
[ "["
attribute
identifier "derive"
token_tree
( "("
identifier "Debug"
) ")"
] "]"
struct_item (+65 nodes collapsed)
struct_item (+23 nodes collapsed)
enum_item (+29 nodes collapsed)
impl_item (+35 nodes collapsed)
struct_item (+218 nodes collapsed)
attribute_item
# "#"
[ "["
attribute
identifier "derive"
token_tree
( "("
identifier "Debug"
) ")"
] "]"
struct_item (+113 nodes collapsed)
attribute_item
# "#"
[ "["
attribute
identifier "derive"
token_tree
( "("
identifier "Debug"
, ","
identifier "Clone"
, ","
identifier "Copy"
, ","
identifier "PartialEq"
, ","
identifier "Eq"
, ","
identifier "Hash"
) ")"
] "]"
struct_item (+21 nodes collapsed)
impl_item (+391 nodes collapsed)
attribute_item
# "#"
[ "["
attribute
identifier "derive"
token_tree
( "("
identifier "Debug"
) ")"
] "]"
enum_item (+251 nodes collapsed)
attribute_item
# "#"
[ "["
attribute
identifier "derive"
token_tree
( "("
identifier "Clone"
, ","
identifier "Debug"
, ","
identifier "Serialize"
) ")"
] "]"
struct_item (+120 nodes collapsed)
attribute_item
# "#"
[ "["
attribute
identifier "derive"
token_tree
( "("
identifier "Clone"
, ","
identifier "Debug"
) ")"
] "]"
struct_item (+80 nodes collapsed)
attribute_item
# "#"
[ "["
attribute
identifier "derive"
token_tree
( "("
identifier "Clone"
, ","
identifier "Debug"
, ","
identifier "PartialEq"
, ","
identifier "Eq"
) ")"
] "]"
enum_item (+41 nodes collapsed)
impl_item (+90 nodes collapsed)
impl_item (+78353 nodes collapsed)
line_comment
// "//"
line_comment
// "//"
function_item (+108 nodes collapsed)
function_item (+391 nodes collapsed)
function_item (+1091 nodes collapsed)
function_item (+118 nodes collapsed)
function_item (+148 nodes collapsed)
function_item (+224 nodes collapsed)
impl_item
impl "impl"
generic_type
type_identifier "EventEmitter"
type_arguments
< "<"
type_identifier "LspStoreEvent"
> ">"
for "for"
type_identifier "LspStore"
declaration_list
{ "{"
} "}"
function_item (+88 nodes collapsed)
function_item (+580 nodes collapsed)
attribute_item
# "#"
[ "["
attribute
identifier "derive"
token_tree
( "("
identifier "Debug"
) ")"
] "]"
enum_item (+28 nodes collapsed)
attribute_item
# "#"
[ "["
attribute
identifier "derive"
token_tree
( "("
identifier "Default"
) ")"
] "]"
struct_item (+26 nodes collapsed)
impl_item (+318 nodes collapsed)
impl_item (+163 nodes collapsed)
struct_item (+21 nodes collapsed)
impl_item (+104 nodes collapsed)
attribute_item
# "#"
[ "["
attribute
identifier "derive"
token_tree
( "("
identifier "Default"
) ")"
] "]"
struct_item (+47 nodes collapsed)
attribute_item
# "#"
[ "["
attribute
identifier "derive"
token_tree
( "("
identifier "Default"
) ")"
] "]"
struct_item (+35 nodes collapsed)
impl_item (+548 nodes collapsed)
struct_item
struct "struct"
type_identifier "LspBufferSnapshot"
field_declaration_list
{ "{"
field_declaration
field_identifier "version"
: ":"
primitive_type "i32"
, ","
field_declaration
field_identifier "snapshot"
: ":"
type_identifier "TextBufferSnapshot"
, ","
} "}"
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " A prompt requested by LSP server.\n"
attribute_item
# "#"
[ "["
attribute
identifier "derive"
token_tree
( "("
identifier "Clone"
, ","
identifier "Debug"
) ")"
] "]"
struct_item (+69 nodes collapsed)
impl_item (+292 nodes collapsed)
impl_item (+51 nodes collapsed)
attribute_item
# "#"
[ "["
attribute
identifier "derive"
token_tree
( "("
identifier "Clone"
, ","
identifier "Debug"
, ","
identifier "PartialEq"
) ")"
] "]"
enum_item (+40 nodes collapsed)
impl_item (+585 nodes collapsed)
struct_item (+60 nodes collapsed)
enum_item (+119 nodes collapsed)
impl_item (+182 nodes collapsed)
impl_item (+130 nodes collapsed)
attribute_item
# "#"
[ "["
attribute
identifier "derive"
token_tree
( "("
identifier "Clone"
, ","
identifier "Debug"
, ","
identifier "Serialize"
) ")"
] "]"
struct_item (+75 nodes collapsed)
attribute_item
# "#"
[ "["
attribute
identifier "derive"
token_tree
( "("
identifier "Copy"
, ","
identifier "Clone"
, ","
identifier "Debug"
, ","
identifier "Default"
, ","
identifier "PartialEq"
, ","
identifier "Serialize"
) ")"
] "]"
struct_item (+22 nodes collapsed)
impl_item (+268 nodes collapsed)
attribute_item
# "#"
[ "["
attribute
identifier "derive"
token_tree
( "("
identifier "Clone"
, ","
identifier "Debug"
) ")"
] "]"
enum_item (+78 nodes collapsed)
impl_item (+154 nodes collapsed)
impl_item (+268 nodes collapsed)
enum_item (+34 nodes collapsed)
function_item (+101 nodes collapsed)
struct_item (+43 nodes collapsed)
impl_item (+103 nodes collapsed)
impl_item (+232 nodes collapsed)
attribute_item
# "#"
[ "["
attribute
identifier "async_trait"
token_tree
( "("
? "?"
identifier "Send"
) ")"
] "]"
impl_item
impl "impl"
type_identifier "LspAdapter"
for "for"
type_identifier "SshLspAdapter"
declaration_list
{ "{"
function_item (+25 nodes collapsed)
function_item
function_modifiers
async "async"
fn "fn"
identifier "initialization_options"
parameters
( "("
parameter
self "self"
: ":"
generic_type
type_identifier "Arc"
type_arguments
< "<"
type_identifier "Self"
> ">"
, ","
parameter
_ "_"
: ":"
reference_type
& "&"
generic_type
type_identifier "Arc"
type_arguments
< "<"
dynamic_type
dyn "dyn"
type_identifier "LspAdapterDelegate"
> ">"
, ","
) ")"
-> "->"
generic_type
type_identifier "Result"
type_arguments
< "<"
generic_type
type_identifier "Option"
type_arguments
< "<"
scoped_type_identifier
identifier "serde_json"
:: "::"
type_identifier "Value"
> ">"
> ">"
block (+54 nodes collapsed)
function_item (+35 nodes collapsed)
} "}"
function_item (+98 nodes collapsed)
function_item (+86 nodes collapsed)
struct_item (+87 nodes collapsed)
impl_item (+300 nodes collapsed)
attribute_item
# "#"
[ "["
attribute
identifier "async_trait"
] "]"
impl_item (+1340 nodes collapsed)
function_item (+740 nodes collapsed)
function_item (+87 nodes collapsed)
function_item (+183 nodes collapsed)
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " Completion items are displayed in a `UniformList`.\n"
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " Usually, those items are single-line strings, but in LSP re"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " completion items `label`, `detail` and `label_details.descr"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " Many language plugins construct these items by joining thes"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " All that may lead to a newline being inserted into resultin"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " breaking the completions menu presentation.\n"
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment "\n"
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " Sanitize the text to ensure there are no newlines, or, if t"...
function_item (+814 nodes collapsed)

After

source_file
line_comment
// "//"
inner_doc_comment_marker
! "!"
doc_comment " LSP store provides unified access to the language server pr"...
line_comment
// "//"
inner_doc_comment_marker
! "!"
doc_comment " The consumers of LSP store can interact with language serve"...
line_comment
// "//"
inner_doc_comment_marker
! "!"
doc_comment "\n"
line_comment
// "//"
inner_doc_comment_marker
! "!"
doc_comment " # Local/Remote LSP Stores\n"
line_comment
// "//"
inner_doc_comment_marker
! "!"
doc_comment " This module is split up into three distinct parts:\n"
line_comment
// "//"
inner_doc_comment_marker
! "!"
doc_comment " - [`LocalLspStore`], which is ran on the host machine (eith"...
line_comment
// "//"
inner_doc_comment_marker
! "!"
doc_comment " - [`RemoteLspStore`], which is ran on the remote machine (p"...
line_comment
// "//"
inner_doc_comment_marker
! "!"
doc_comment " The remote stores don't really care about which language "...
line_comment
// "//"
inner_doc_comment_marker
! "!"
doc_comment " - [`LspStore`], which unifies the two under one consistent "...
line_comment
// "//"
inner_doc_comment_marker
! "!"
doc_comment "\n"
line_comment
// "//"
inner_doc_comment_marker
! "!"
doc_comment " Most of the interesting work happens at the local layer, as"...
mod_item
visibility_modifier
pub "pub"
mod "mod"
identifier "clangd_ext"
; ";"
mod_item
mod "mod"
identifier "code_lens"
; ";"
mod_item
mod "mod"
identifier "document_colors"
; ";"
mod_item
mod "mod"
identifier "document_symbols"
; ";"
mod_item
mod "mod"
identifier "folding_ranges"
; ";"
mod_item
mod "mod"
identifier "inlay_hints"
; ";"
mod_item
visibility_modifier
pub "pub"
mod "mod"
identifier "json_language_server_ext"
; ";"
mod_item
visibility_modifier
pub "pub"
mod "mod"
identifier "log_store"
; ";"
mod_item
visibility_modifier
pub "pub"
mod "mod"
identifier "lsp_ext_command"
; ";"
mod_item
visibility_modifier
pub "pub"
mod "mod"
identifier "rust_analyzer_ext"
; ";"
mod_item
mod "mod"
identifier "semantic_tokens"
; ";"
mod_item
visibility_modifier
pub "pub"
mod "mod"
identifier "vue_language_server_ext"
; ";"
use_declaration
use "use"
scoped_identifier
scoped_identifier
self "self"
:: "::"
identifier "code_lens"
:: "::"
identifier "CodeLensData"
; ";"
use_declaration
use "use"
scoped_identifier
scoped_identifier
self "self"
:: "::"
identifier "document_colors"
:: "::"
identifier "DocumentColorData"
; ";"
use_declaration
use "use"
scoped_identifier
scoped_identifier
self "self"
:: "::"
identifier "document_symbols"
:: "::"
identifier "DocumentSymbolsData"
; ";"
use_declaration
use "use"
scoped_identifier
scoped_identifier
self "self"
:: "::"
identifier "inlay_hints"
:: "::"
identifier "BufferInlayHints"
; ";"
use_declaration (+187 nodes collapsed)
use_declaration
use "use"
scoped_use_list
identifier "anyhow"
:: "::"
use_list
{ "{"
use_as_clause
identifier "Context"
as "as"
identifier "_"
, ","
identifier "Result"
, ","
identifier "anyhow"
} "}"
; ";"
use_declaration
use "use"
scoped_identifier
identifier "async_trait"
:: "::"
identifier "async_trait"
; ";"
use_declaration
use "use"
scoped_use_list
identifier "client"
:: "::"
use_list
{ "{"
identifier "TypedEnvelope"
, ","
identifier "proto"
} "}"
; ";"
use_declaration
use "use"
scoped_identifier
identifier "clock"
:: "::"
identifier "Global"
; ";"
use_declaration
use "use"
scoped_use_list
identifier "collections"
:: "::"
use_list
{ "{"
identifier "BTreeMap"
, ","
identifier "BTreeSet"
, ","
identifier "HashMap"
, ","
identifier "HashSet"
, ","
identifier "btree_map"
} "}"
; ";"
use_declaration (+42 nodes collapsed)
use_declaration
use "use"
scoped_use_list
identifier "globset"
:: "::"
use_list
{ "{"
identifier "Glob"
, ","
identifier "GlobBuilder"
, ","
identifier "GlobMatcher"
, ","
identifier "GlobSet"
, ","
identifier "GlobSetBuilder"
} "}"
; ";"
use_declaration (+31 nodes collapsed)
use_declaration
use "use"
scoped_identifier
identifier "http_client"
:: "::"
identifier "HttpClient"
; ";"
use_declaration
use "use"
use_as_clause
scoped_identifier
identifier "itertools"
:: "::"
identifier "Itertools"
as "as"
identifier "_"
; ";"
use_declaration (+123 nodes collapsed)
use_declaration (+80 nodes collapsed)
use_declaration
use "use"
scoped_identifier
identifier "node_runtime"
:: "::"
identifier "read_package_installed_version"
; ";"
use_declaration
use "use"
scoped_identifier
identifier "parking_lot"
:: "::"
identifier "Mutex"
; ";"
use_declaration (+22 nodes collapsed)
use_declaration
use "use"
use_wildcard
scoped_identifier
identifier "rand"
:: "::"
identifier "prelude"
:: "::"
* "*"
; ";"
use_declaration (+31 nodes collapsed)
use_declaration
use "use"
scoped_identifier
identifier "semver"
:: "::"
identifier "Version"
; ";"
use_declaration
use "use"
scoped_identifier
identifier "serde"
:: "::"
identifier "Serialize"
; ";"
use_declaration
use "use"
scoped_identifier
identifier "serde_json"
:: "::"
identifier "Value"
; ";"
use_declaration
use "use"
scoped_use_list
identifier "settings"
:: "::"
use_list
{ "{"
identifier "Settings"
, ","
identifier "SettingsLocation"
, ","
identifier "SettingsStore"
} "}"
; ";"
use_declaration
use "use"
scoped_use_list
identifier "sha2"
:: "::"
use_list
{ "{"
identifier "Digest"
, ","
identifier "Sha256"
} "}"
; ";"
use_declaration
use "use"
scoped_identifier
identifier "snippet"
:: "::"
identifier "Snippet"
; ";"
use_declaration (+126 nodes collapsed)
use_declaration
use "use"
scoped_identifier
identifier "sum_tree"
:: "::"
identifier "Dimensions"
; ";"
use_declaration (+21 nodes collapsed)
use_declaration (+48 nodes collapsed)
use_declaration
visibility_modifier
pub "pub"
use "use"
scoped_identifier
identifier "document_colors"
:: "::"
identifier "DocumentColors"
; ";"
use_declaration
visibility_modifier
pub "pub"
use "use"
scoped_identifier
identifier "folding_ranges"
:: "::"
identifier "LspFoldingRange"
; ";"
use_declaration
visibility_modifier
pub "pub"
use "use"
use_wildcard
identifier "fs"
:: "::"
* "*"
; ";"
use_declaration
visibility_modifier
pub "pub"
use "use"
scoped_identifier
identifier "language"
:: "::"
identifier "Location"
; ";"
use_declaration
visibility_modifier
pub "pub"
use "use"
scoped_use_list
scoped_identifier
identifier "lsp_store"
:: "::"
identifier "inlay_hints"
:: "::"
use_list
{ "{"
identifier "CacheInlayHints"
, ","
identifier "InvalidationStrategy"
} "}"
; ";"
attribute_item (+21 nodes collapsed)
use_declaration
visibility_modifier
pub "pub"
use "use"
use_as_clause
scoped_identifier
identifier "prettier"
:: "::"
identifier "FORMAT_SUFFIX"
as "as"
identifier "TEST_PRETTIER_FORMAT_SUFFIX"
; ";"
use_declaration (+21 nodes collapsed)
use_declaration (+35 nodes collapsed)
const_item
const "const"
identifier "SERVER_LAUNCHING_BEFORE_SHUTDOWN_TIMEOUT"
: ":"
type_identifier "Duration"
= "="
call_expression
scoped_identifier
identifier "Duration"
:: "::"
identifier "from_secs"
arguments
( "("
integer_literal "5"
) ")"
; ";"
const_item
visibility_modifier
pub "pub"
const "const"
identifier "SERVER_PROGRESS_THROTTLE_TIMEOUT"
: ":"
type_identifier "Duration"
= "="
call_expression
scoped_identifier
identifier "Duration"
:: "::"
identifier "from_millis"
arguments
( "("
integer_literal "100"
) ")"
; ";"
const_item
const "const"
identifier "WORKSPACE_DIAGNOSTICS_TOKEN_START"
: ":"
reference_type
& "&"
primitive_type "str"
= "="
string_literal
" "\""
string_content "id:"
" "\""
; ";"
const_item
const "const"
identifier "SERVER_DOWNLOAD_TIMEOUT"
: ":"
type_identifier "Duration"
= "="
call_expression
scoped_identifier
identifier "Duration"
:: "::"
identifier "from_secs"
arguments
( "("
integer_literal "10"
) ")"
; ";"
static_item
static "static"
identifier "NEXT_PROMPT_REQUEST_ID"
: ":"
type_identifier "AtomicUsize"
= "="
call_expression
scoped_identifier
identifier "AtomicUsize"
:: "::"
identifier "new"
arguments
( "("
integer_literal "0"
) ")"
; ";"
attribute_item (+24 nodes collapsed)
enum_item (+22 nodes collapsed)
impl_item (+110 nodes collapsed)
impl_item (+372 nodes collapsed)
attribute_item
# "#"
[ "["
attribute
identifier "derive"
token_tree
( "("
identifier "Debug"
, ","
identifier "Clone"
, ","
identifier "Copy"
, ","
identifier "PartialEq"
, ","
identifier "Eq"
) ")"
] "]"
enum_item
visibility_modifier
pub "pub"
enum "enum"
type_identifier "FormatTrigger"
enum_variant_list
{ "{"
enum_variant
identifier "Save"
, ","
enum_variant
identifier "Manual"
, ","
} "}"
enum_item (+35 nodes collapsed)
attribute_item
# "#"
[ "["
attribute
identifier "derive"
token_tree
( "("
identifier "Debug"
, ","
identifier "Clone"
, ","
identifier "PartialEq"
, ","
identifier "Eq"
, ","
identifier "Hash"
) ")"
] "]"
struct_item
visibility_modifier
pub "pub"
struct "struct"
type_identifier "OpenLspBufferHandle"
ordered_field_declaration_list
( "("
generic_type
type_identifier "Entity"
type_arguments
< "<"
type_identifier "OpenLspBuffer"
> ">"
) ")"
; ";"
struct_item
struct "struct"
type_identifier "OpenLspBuffer"
ordered_field_declaration_list
( "("
generic_type
type_identifier "Entity"
type_arguments
< "<"
type_identifier "Buffer"
> ">"
) ")"
; ";"
impl_item (+55 nodes collapsed)
attribute_item
# "#"
[ "["
attribute
identifier "derive"
token_tree
( "("
identifier "Clone"
) ")"
] "]"
struct_item (+26 nodes collapsed)
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " Settings that affect language server identity.\n"
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment "\n"
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " Dynamic settings (`LspSettings::settings`) are excluded bec"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " updated via `workspace/didChangeConfiguration` without rest"...
attribute_item
# "#"
[ "["
attribute
identifier "derive"
token_tree
( "("
identifier "Clone"
, ","
identifier "Debug"
, ","
identifier "Hash"
, ","
identifier "PartialEq"
, ","
identifier "Eq"
) ")"
] "]"
struct_item (+29 nodes collapsed)
attribute_item
# "#"
[ "["
attribute
identifier "derive"
token_tree
( "("
identifier "Clone"
, ","
identifier "Debug"
, ","
identifier "Hash"
, ","
identifier "PartialEq"
, ","
identifier "Eq"
) ")"
] "]"
struct_item (+31 nodes collapsed)
attribute_item
# "#"
[ "["
attribute
identifier "derive"
token_tree
( "("
identifier "Debug"
) ")"
] "]"
struct_item (+75 nodes collapsed)
struct_item (+43 nodes collapsed)
attribute_item
# "#"
[ "["
attribute
identifier "derive"
token_tree
( "("
identifier "Default"
, ","
identifier "Debug"
) ")"
] "]"
struct_item (+40 nodes collapsed)
struct_item (+481 nodes collapsed)
impl_item
impl "impl"
type_identifier "LocalLspStore"
declaration_list
{ "{"
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " Returns the running language server for the given ID. Note "...
function_item (+98 nodes collapsed)
function_item (+422 nodes collapsed)
function_item
fn "fn"
identifier "start_language_server"
parameters (+68 nodes collapsed)
-> "->"
type_identifier "LanguageServerId"
block
{ "{"
let_declaration
let "let"
identifier "worktree"
= "="
call_expression
field_expression
identifier "worktree_handle"
. "."
field_identifier "read"
arguments
( "("
identifier "cx"
) ")"
; ";"
let_declaration
let "let"
identifier "worktree_id"
= "="
call_expression
field_expression
identifier "worktree"
. "."
field_identifier "id"
arguments
( "("
) ")"
; ";"
let_declaration
let "let"
identifier "worktree_abs_path"
= "="
call_expression
field_expression
identifier "worktree"
. "."
field_identifier "abs_path"
arguments
( "("
) ")"
; ";"
let_declaration
let "let"
identifier "toolchain"
= "="
call_expression
field_expression
field_expression
identifier "key"
. "."
field_identifier "toolchain"
. "."
field_identifier "clone"
arguments
( "("
) ")"
; ";"
let_declaration
let "let"
identifier "override_options"
= "="
call_expression
field_expression
field_expression
identifier "settings"
. "."
field_identifier "initialization_options"
. "."
field_identifier "clone"
arguments
( "("
) ")"
; ";"
let_declaration (+34 nodes collapsed)
let_declaration
let "let"
identifier "server_id"
= "="
call_expression
field_expression
field_expression
self "self"
. "."
field_identifier "languages"
. "."
field_identifier "next_language_server_id"
arguments
( "("
) ")"
; ";"
expression_statement (+21 nodes collapsed)
let_declaration (+406 nodes collapsed)
let_declaration
let "let"
identifier "update_binary_status"
= "="
call_expression
field_expression
identifier "wait_until_worktree_trust"
. "."
field_identifier "is_none"
arguments
( "("
) ")"
; ";"
let_declaration (+58 nodes collapsed)
let_declaration (+29 nodes collapsed)
let_declaration (+303 nodes collapsed)
let_declaration
let "let"
identifier "startup"
= "="
block
{ "{"
let_declaration
let "let"
identifier "server_name"
= "="
call_expression
field_expression
field_expression
field_expression
identifier "adapter"
. "."
field_identifier "name"
. "."
integer_literal "0"
. "."
field_identifier "clone"
arguments
( "("
) ")"
; ";"
let_declaration
let "let"
identifier "delegate"
= "="
type_cast_expression
identifier "delegate"
as "as"
generic_type
type_identifier "Arc"
type_arguments
< "<"
dynamic_type
dyn "dyn"
type_identifier "LspAdapterDelegate"
> ">"
; ";"
let_declaration
let "let"
identifier "key"
= "="
call_expression
field_expression
identifier "key"
. "."
field_identifier "clone"
arguments
( "("
) ")"
; ";"
let_declaration
let "let"
identifier "adapter"
= "="
call_expression
field_expression
identifier "adapter"
. "."
field_identifier "clone"
arguments
( "("
) ")"
; ";"
let_declaration
let "let"
identifier "lsp_store"
= "="
call_expression
field_expression
field_expression
self "self"
. "."
field_identifier "weak"
. "."
field_identifier "clone"
arguments
( "("
) ")"
; ";"
let_declaration
let "let"
identifier "pending_workspace_folders"
= "="
call_expression
field_expression
identifier "pending_workspace_folders"
. "."
field_identifier "clone"
arguments
( "("
) ")"
; ";"
let_declaration (+23 nodes collapsed)
let_declaration (+25 nodes collapsed)
let_declaration (+55 nodes collapsed)
call_expression
field_expression
identifier "cx"
. "."
field_identifier "spawn"
arguments
( "("
closure_expression
async "async"
move "move"
closure_parameters
| "|"
identifier "cx"
| "|"
block
{ "{"
let_declaration
let "let"
identifier "result"
= "="
await_expression
async_block
async "async"
block
{ "{"
let_declaration
let "let"
identifier "language_server"
= "="
try_expression
await_expression
identifier "pending_server"
. "."
await "await"
? "?"
; ";"
let_declaration (+40 nodes collapsed)
let_declaration
let "let"
mutable_specifier "mut"
identifier "initialization_options"
= "="
try_expression
await_expression
call_expression
scoped_identifier
identifier "Self"
:: "::"
identifier "initialization_options_for_adapter"
arguments
( "("
call_expression
field_expression
field_expression
identifier "adapter"
. "."
field_identifier "adapter"
. "."
field_identifier "clone"
arguments
( "("
) ")"
, ","
reference_expression
& "&"
identifier "delegate"
, ","
identifier "cx"
, ","
) ")"
. "."
await "await"
? "?"
; ";"
expression_statement (+66 nodes collapsed)
let_declaration (+66 nodes collapsed)
expression_statement (+41 nodes collapsed)
let_declaration
let "let"
identifier "did_change_configuration_params"
= "="
struct_expression
scoped_type_identifier
identifier "lsp"
:: "::"
type_identifier "DidChangeConfigurationParams"
field_initializer_list
{ "{"
field_initializer
field_identifier "settings"
: ":"
identifier "workspace_config"
, ","
} "}"
; ";"
let_declaration (+168 nodes collapsed)
expression_statement (+26 nodes collapsed)
call_expression
scoped_identifier
identifier "anyhow"
:: "::"
identifier "Ok"
arguments
( "("
identifier "language_server"
) ")"
} "}"
. "."
await "await"
; ";"
expression_statement (+280 nodes collapsed)
} "}"
) ")"
} "}"
; ";"
let_declaration
let "let"
identifier "state"
= "="
struct_expression
scoped_type_identifier
identifier "LanguageServerState"
:: "::"
type_identifier "Starting"
field_initializer_list
{ "{"
shorthand_field_initializer
identifier "startup"
, ","
shorthand_field_initializer
identifier "pending_workspace_folders"
, ","
} "}"
; ";"
expression_statement (+33 nodes collapsed)
expression_statement
call_expression
field_expression
field_expression
self "self"
. "."
field_identifier "language_servers"
. "."
field_identifier "insert"
arguments
( "("
identifier "server_id"
, ","
identifier "state"
) ")"
; ";"
expression_statement (+43 nodes collapsed)
identifier "server_id"
} "}"
function_item (+1154 nodes collapsed)
function_item (+4219 nodes collapsed)
function_item (+111 nodes collapsed)
function_item (+148 nodes collapsed)
function_item (+141 nodes collapsed)
function_item (+191 nodes collapsed)
function_item (+204 nodes collapsed)
function_item (+168 nodes collapsed)
function_item (+565 nodes collapsed)
function_item (+749 nodes collapsed)
function_item (+4636 nodes collapsed)
function_item (+630 nodes collapsed)
function_item (+682 nodes collapsed)
function_item (+722 nodes collapsed)
function_item (+328 nodes collapsed)
function_item (+678 nodes collapsed)
function_item (+200 nodes collapsed)
function_item (+1144 nodes collapsed)
function_item (+213 nodes collapsed)
function_item (+1436 nodes collapsed)
function_item (+586 nodes collapsed)
function_item (+154 nodes collapsed)
function_item (+191 nodes collapsed)
function_item (+355 nodes collapsed)
function_item (+199 nodes collapsed)
function_item (+708 nodes collapsed)
function_item (+334 nodes collapsed)
attribute_item
# "#"
[ "["
attribute
identifier "allow"
token_tree
( "("
identifier "clippy"
:: "::"
identifier "type_complexity"
) ")"
] "]"
function_item (+878 nodes collapsed)
function_item (+1991 nodes collapsed)
function_item (+295 nodes collapsed)
function_item (+425 nodes collapsed)
function_item (+1121 nodes collapsed)
function_item (+487 nodes collapsed)
function_item (+153 nodes collapsed)
function_item (+107 nodes collapsed)
function_item (+144 nodes collapsed)
function_item
function_modifiers
async "async"
fn "fn"
identifier "initialization_options_for_adapter"
parameters
( "("
parameter
identifier "adapter"
: ":"
generic_type
type_identifier "Arc"
type_arguments
< "<"
dynamic_type
dyn "dyn"
type_identifier "LspAdapter"
> ">"
, ","
parameter
identifier "delegate"
: ":"
reference_type
& "&"
generic_type
type_identifier "Arc"
type_arguments
< "<"
dynamic_type
dyn "dyn"
type_identifier "LspAdapterDelegate"
> ">"
, ","
parameter
identifier "cx"
: ":"
reference_type
& "&"
mutable_specifier "mut"
type_identifier "AsyncApp"
, ","
) ")"
-> "->"
generic_type
type_identifier "Result"
type_arguments
< "<"
generic_type
type_identifier "Option"
type_arguments
< "<"
scoped_type_identifier
identifier "serde_json"
:: "::"
type_identifier "Value"
> ">"
> ">"
block
{ "{"
let_declaration
let "let"
tuple_struct_pattern
identifier "Some"
( "("
mut_pattern
mutable_specifier "mut"
identifier "initialization_config"
) ")"
= "="
try_expression
await_expression
call_expression
field_expression
call_expression
field_expression
identifier "adapter"
. "."
field_identifier "clone"
arguments
( "("
) ")"
. "."
field_identifier "initialization_options"
arguments
( "("
identifier "delegate"
, ","
identifier "cx"
) ")"
. "."
await "await"
? "?"
else "else"
block
{ "{"
expression_statement
return_expression
return "return"
call_expression
identifier "Ok"
arguments
( "("
identifier "None"
) ")"
; ";"
} "}"
; ";"
expression_statement (+110 nodes collapsed)
call_expression
identifier "Ok"
arguments
( "("
call_expression
identifier "Some"
arguments
( "("
identifier "initialization_config"
) ")"
) ")"
} "}"
function_item (+226 nodes collapsed)
function_item (+135 nodes collapsed)
} "}"
function_item (+326 nodes collapsed)
attribute_item
# "#"
[ "["
attribute
identifier "derive"
token_tree
( "("
identifier "Debug"
) ")"
] "]"
struct_item (+65 nodes collapsed)
struct_item (+23 nodes collapsed)
enum_item (+29 nodes collapsed)
impl_item (+35 nodes collapsed)
struct_item (+218 nodes collapsed)
attribute_item
# "#"
[ "["
attribute
identifier "derive"
token_tree
( "("
identifier "Debug"
) ")"
] "]"
struct_item (+113 nodes collapsed)
attribute_item
# "#"
[ "["
attribute
identifier "derive"
token_tree
( "("
identifier "Debug"
, ","
identifier "Clone"
, ","
identifier "Copy"
, ","
identifier "PartialEq"
, ","
identifier "Eq"
, ","
identifier "Hash"
) ")"
] "]"
struct_item (+21 nodes collapsed)
impl_item (+391 nodes collapsed)
attribute_item
# "#"
[ "["
attribute
identifier "derive"
token_tree
( "("
identifier "Debug"
) ")"
] "]"
enum_item (+251 nodes collapsed)
attribute_item
# "#"
[ "["
attribute
identifier "derive"
token_tree
( "("
identifier "Clone"
, ","
identifier "Debug"
, ","
identifier "Serialize"
) ")"
] "]"
struct_item (+120 nodes collapsed)
attribute_item
# "#"
[ "["
attribute
identifier "derive"
token_tree
( "("
identifier "Clone"
, ","
identifier "Debug"
) ")"
] "]"
struct_item (+80 nodes collapsed)
attribute_item
# "#"
[ "["
attribute
identifier "derive"
token_tree
( "("
identifier "Clone"
, ","
identifier "Debug"
, ","
identifier "PartialEq"
, ","
identifier "Eq"
) ")"
] "]"
enum_item (+41 nodes collapsed)
impl_item (+90 nodes collapsed)
impl_item (+78353 nodes collapsed)
line_comment
// "//"
line_comment
// "//"
function_item (+108 nodes collapsed)
function_item (+391 nodes collapsed)
function_item (+1091 nodes collapsed)
function_item (+118 nodes collapsed)
function_item (+148 nodes collapsed)
function_item (+224 nodes collapsed)
impl_item
impl "impl"
generic_type
type_identifier "EventEmitter"
type_arguments
< "<"
type_identifier "LspStoreEvent"
> ">"
for "for"
type_identifier "LspStore"
declaration_list
{ "{"
} "}"
function_item (+88 nodes collapsed)
function_item (+580 nodes collapsed)
attribute_item
# "#"
[ "["
attribute
identifier "derive"
token_tree
( "("
identifier "Debug"
) ")"
] "]"
enum_item (+28 nodes collapsed)
attribute_item
# "#"
[ "["
attribute
identifier "derive"
token_tree
( "("
identifier "Default"
) ")"
] "]"
struct_item (+26 nodes collapsed)
impl_item (+318 nodes collapsed)
impl_item (+163 nodes collapsed)
struct_item (+21 nodes collapsed)
impl_item (+104 nodes collapsed)
attribute_item
# "#"
[ "["
attribute
identifier "derive"
token_tree
( "("
identifier "Default"
) ")"
] "]"
struct_item (+47 nodes collapsed)
attribute_item
# "#"
[ "["
attribute
identifier "derive"
token_tree
( "("
identifier "Default"
) ")"
] "]"
struct_item (+35 nodes collapsed)
impl_item (+548 nodes collapsed)
struct_item
struct "struct"
type_identifier "LspBufferSnapshot"
field_declaration_list
{ "{"
field_declaration
field_identifier "version"
: ":"
primitive_type "i32"
, ","
field_declaration
field_identifier "snapshot"
: ":"
type_identifier "TextBufferSnapshot"
, ","
} "}"
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " A prompt requested by LSP server.\n"
attribute_item
# "#"
[ "["
attribute
identifier "derive"
token_tree
( "("
identifier "Clone"
, ","
identifier "Debug"
) ")"
] "]"
struct_item (+69 nodes collapsed)
impl_item (+292 nodes collapsed)
impl_item (+51 nodes collapsed)
attribute_item
# "#"
[ "["
attribute
identifier "derive"
token_tree
( "("
identifier "Clone"
, ","
identifier "Debug"
, ","
identifier "PartialEq"
) ")"
] "]"
enum_item (+40 nodes collapsed)
impl_item (+585 nodes collapsed)
struct_item (+60 nodes collapsed)
enum_item (+119 nodes collapsed)
impl_item (+182 nodes collapsed)
impl_item (+130 nodes collapsed)
attribute_item
# "#"
[ "["
attribute
identifier "derive"
token_tree
( "("
identifier "Clone"
, ","
identifier "Debug"
, ","
identifier "Serialize"
) ")"
] "]"
struct_item (+75 nodes collapsed)
attribute_item
# "#"
[ "["
attribute
identifier "derive"
token_tree
( "("
identifier "Copy"
, ","
identifier "Clone"
, ","
identifier "Debug"
, ","
identifier "Default"
, ","
identifier "PartialEq"
, ","
identifier "Serialize"
) ")"
] "]"
struct_item (+22 nodes collapsed)
impl_item (+268 nodes collapsed)
attribute_item
# "#"
[ "["
attribute
identifier "derive"
token_tree
( "("
identifier "Clone"
, ","
identifier "Debug"
) ")"
] "]"
enum_item (+78 nodes collapsed)
impl_item (+154 nodes collapsed)
impl_item (+268 nodes collapsed)
enum_item (+34 nodes collapsed)
function_item (+101 nodes collapsed)
struct_item (+43 nodes collapsed)
impl_item (+103 nodes collapsed)
impl_item (+232 nodes collapsed)
attribute_item
# "#"
[ "["
attribute
identifier "async_trait"
token_tree
( "("
? "?"
identifier "Send"
) ")"
] "]"
impl_item
impl "impl"
type_identifier "LspAdapter"
for "for"
type_identifier "SshLspAdapter"
declaration_list
{ "{"
function_item (+25 nodes collapsed)
function_item
function_modifiers
async "async"
fn "fn"
identifier "initialization_options"
parameters
( "("
parameter
self "self"
: ":"
generic_type
type_identifier "Arc"
type_arguments
< "<"
type_identifier "Self"
> ">"
, ","
parameter
_ "_"
: ":"
reference_type
& "&"
generic_type
type_identifier "Arc"
type_arguments
< "<"
dynamic_type
dyn "dyn"
type_identifier "LspAdapterDelegate"
> ">"
, ","
parameter
_ "_"
: ":"
reference_type
& "&"
mutable_specifier "mut"
type_identifier "AsyncApp"
, ","
) ")"
-> "->"
generic_type
type_identifier "Result"
type_arguments
< "<"
generic_type
type_identifier "Option"
type_arguments
< "<"
scoped_type_identifier
identifier "serde_json"
:: "::"
type_identifier "Value"
> ">"
> ">"
block (+54 nodes collapsed)
function_item (+35 nodes collapsed)
} "}"
function_item (+98 nodes collapsed)
function_item (+86 nodes collapsed)
struct_item (+87 nodes collapsed)
impl_item (+300 nodes collapsed)
attribute_item
# "#"
[ "["
attribute
identifier "async_trait"
] "]"
impl_item (+1340 nodes collapsed)
function_item (+740 nodes collapsed)
function_item (+87 nodes collapsed)
function_item (+183 nodes collapsed)
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " Completion items are displayed in a `UniformList`.\n"
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " Usually, those items are single-line strings, but in LSP re"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " completion items `label`, `detail` and `label_details.descr"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " Many language plugins construct these items by joining thes"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " All that may lead to a newline being inserted into resultin"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " breaking the completions menu presentation.\n"
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment "\n"
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " Sanitize the text to ensure there are no newlines, or, if t"...
function_item (+814 nodes collapsed)