Get ESLint to launch and provide diagnostics
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
This commit is contained in:
parent
6e68ff5a50
commit
2a5c0fa5f8
5 changed files with 82 additions and 14 deletions
|
@ -2217,6 +2217,7 @@ impl Project {
|
|||
move |params, mut cx| {
|
||||
let languages = languages.clone();
|
||||
async move {
|
||||
dbg!(¶ms.items);
|
||||
let workspace_config =
|
||||
cx.update(|cx| languages.workspace_configuration(cx)).await;
|
||||
Ok(params
|
||||
|
|
|
@ -536,10 +536,15 @@ impl LocalWorktree {
|
|||
.insert(PathKey(worktree_path.clone()), new_summary);
|
||||
let diagnostics_by_server_id =
|
||||
self.diagnostics.entry(worktree_path.clone()).or_default();
|
||||
let ix = match diagnostics_by_server_id.binary_search_by_key(&server_id, |e| e.0) {
|
||||
Ok(ix) | Err(ix) => ix,
|
||||
};
|
||||
diagnostics_by_server_id[ix] = (server_id, diagnostics);
|
||||
match diagnostics_by_server_id.binary_search_by_key(&server_id, |e| e.0) {
|
||||
Ok(ix) => {
|
||||
diagnostics_by_server_id[ix] = (server_id, diagnostics);
|
||||
}
|
||||
|
||||
Err(ix) => {
|
||||
diagnostics_by_server_id.insert(ix, (server_id, diagnostics));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
let updated = !old_summary.is_empty() || !new_summary.is_empty();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue