summaryrefslogtreecommitdiff
path: root/support/texlab/crates/texlab/src/server/options.rs
diff options
context:
space:
mode:
Diffstat (limited to 'support/texlab/crates/texlab/src/server/options.rs')
-rw-r--r--support/texlab/crates/texlab/src/server/options.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/support/texlab/crates/texlab/src/server/options.rs b/support/texlab/crates/texlab/src/server/options.rs
index 3a2bf1bb10..3828745257 100644
--- a/support/texlab/crates/texlab/src/server/options.rs
+++ b/support/texlab/crates/texlab/src/server/options.rs
@@ -22,6 +22,7 @@ pub struct Options {
pub latexindent: LatexindentOptions,
pub forward_search: ForwardSearchOptions,
pub completion: CompletionOptions,
+ pub inlay_hints: InlayHintOptions,
pub experimental: ExperimentalOptions,
}
@@ -103,6 +104,14 @@ pub struct DiagnosticsOptions {
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
#[serde(default)]
+pub struct InlayHintOptions {
+ pub label_definitions: Option<bool>,
+ pub label_references: Option<bool>,
+}
+
+#[derive(Debug, Clone, Default, Serialize, Deserialize)]
+#[serde(rename_all = "camelCase")]
+#[serde(default)]
pub struct SymbolOptions {
pub allowed_patterns: Vec<RegexPattern>,
pub ignored_patterns: Vec<RegexPattern>,
@@ -243,6 +252,9 @@ impl From<Options> for Config {
.map(|pattern| pattern.0)
.collect();
+ config.inlay_hints.label_definitions = value.inlay_hints.label_definitions.unwrap_or(true);
+ config.inlay_hints.label_references = value.inlay_hints.label_references.unwrap_or(true);
+
config.completion.matcher = match value.completion.matcher {
CompletionMatcher::Fuzzy => base_db::MatchingAlgo::Skim,
CompletionMatcher::FuzzyIgnoreCase => base_db::MatchingAlgo::SkimIgnoreCase,