Skip to content

Commit 8db172c

Browse files
docs: add comments
1 parent c6c7c09 commit 8db172c

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

crates/tinymist/src/server.rs

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,18 @@ pub struct ServerState {
7676
pub pinning_by_browsing_preview: bool,
7777
/// The client focusing file.
7878
pub focusing: Option<ImmutPath>,
79-
/// The client focusing range. There might be multiple ranges selected by
80-
/// the client at the same time, but we only record the primary one.
79+
/// The client focusing selection ranges.
80+
///
81+
/// To reduce complexity, we only record the primary selection range, while
82+
/// there can be multiple ranges selected by the client at the same time.
83+
/// - Example: In VS Code, you can create multiple cursors by `Ctrl + D`.
84+
///
85+
/// To reduce complexity, A further question that we haven't covered
86+
/// currently is that: The client may select ranges in multiple files at
87+
/// the same time, but we only preasume that all of the selections are
88+
/// in the [`Self::focusing`] file.
89+
/// - Example: In VS Code, you can pick multiple ranges in multiple files by
90+
/// the text search command.
8191
pub focusing_selection: Option<LspRange>,
8292
/// The client focusing position, implicitly. It is inferred from the LSP
8393
/// requests so may be inaccurate.

0 commit comments

Comments
 (0)