fix(oxc_language_server): use config path at init (#2569)

`config_path` was not use in initialization.
Must merge #2568 before to fix vscode.

Co-authored-by: Clément Lafont <johnrazeur@MacBook-Pro-de-Clement.local>
This commit is contained in:
Clément Lafont 2024-03-03 07:01:16 +01:00 committed by GitHub
parent 670081050f
commit 2263377e3f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -89,7 +89,6 @@ impl LanguageServer for Backend {
async fn initialize(&self, params: InitializeParams) -> Result<InitializeResult> {
self.init(params.root_uri)?;
self.init_ignore_glob().await;
self.init_linter_config().await;
let options = params.initialization_options.and_then(|mut value| {
let settings = value.get_mut("settings")?.take();
serde_json::from_value::<Options>(settings).ok()
@ -100,6 +99,7 @@ impl LanguageServer for Backend {
info!("language server version: {:?}", env!("CARGO_PKG_VERSION"));
*self.options.lock().await = value;
}
self.init_linter_config().await;
Ok(InitializeResult {
server_info: Some(ServerInfo { name: "oxc".into(), version: None }),
offset_encoding: None,