diff options
Diffstat (limited to 'support/texlab/src/db/context.rs')
-rw-r--r-- | support/texlab/src/db/context.rs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/support/texlab/src/db/context.rs b/support/texlab/src/db/context.rs new file mode 100644 index 0000000000..c6277eb099 --- /dev/null +++ b/support/texlab/src/db/context.rs @@ -0,0 +1,18 @@ +use crate::Config; + +/// Contains the global context of the server throughout the application. +#[salsa::input(singleton)] +pub struct ServerContext { + /// The server configuration which is extracted from either + /// the `workspace/configuration` or `workspace/didChangeConfiguration` messages. + #[return_ref] + pub config: Config, + + /// Disable usage of `isIncomplete = false` in completion lists. + /// + /// Due to the large number of completion results, + /// the server can only send a subset of the items most of the time. + /// When the filtered list is small enough, `CompletionList.isIncomplete` can be set to `false`. + /// On VSCode, this optimization should not be done so this flag is needed. + pub always_incomplete_completion_list: bool, +} |