mirror of
https://github.com/latex-lsp/texlab.git
synced 2025-07-07 21:25:32 +00:00
Capabilities for LSP extensions (#1340)
Clients sending textDocument/build to a server that doesn't support it may receive an error. In a multi-server setup, users expect to send the message only to servers that support it. Add a capability to enable this use case. Closes #1328
This commit is contained in:
parent
29bdb931e8
commit
1f2c9d7c47
1 changed files with 8 additions and 0 deletions
|
@ -23,6 +23,7 @@ use notify_debouncer_full::{DebouncedEvent, Debouncer, RecommendedCache};
|
|||
use parking_lot::{Mutex, RwLock};
|
||||
use rustc_hash::FxHashSet;
|
||||
use serde::{de::DeserializeOwned, Serialize};
|
||||
use serde_json::{Map, Value};
|
||||
use threadpool::ThreadPool;
|
||||
|
||||
use crate::{
|
||||
|
@ -174,6 +175,13 @@ impl Server {
|
|||
..Default::default()
|
||||
}),
|
||||
inlay_hint_provider: Some(OneOf::Left(true)),
|
||||
experimental: Some(Value::Object(Map::from_iter(
|
||||
[
|
||||
("textDocumentBuild".to_string(), Value::Bool(true)),
|
||||
("textDocumentForwardSearch".to_string(), Value::Bool(true)),
|
||||
]
|
||||
.into_iter(),
|
||||
))),
|
||||
..ServerCapabilities::default()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue