Fix TypeScript diagnostics (#3457)

Deals with https://github.com/zed-industries/community/issues/2124

* sends more ClientCapabilities LSP data, diagnostics capabilities in
particular: those are now required by typescript-language-server LSP to
start publishing diagnostics
* sends more parameters during eslint workspace initialization, so it is
able to correctly look up project's typescript config
Presumably, it's not enough and some convoluted project set ups may
break still, but let's wait for examples and feedback.

Release Notes:

- Fixed typescript-language-server diagnostics not appearing for newer
server versions; fixed eslint diagnostics using wrong directory for
typescript config lookup
This commit is contained in:
Kirill Bulatov 2023-11-30 13:25:25 +02:00
parent 9b37b9a047
commit b6eadc9af8
16 changed files with 140 additions and 44 deletions

View file

@ -107,7 +107,11 @@ impl LspAdapter for TailwindLspAdapter {
}))
}
fn workspace_configuration(&self, _: &mut AppContext) -> BoxFuture<'static, Value> {
fn workspace_configuration(
&self,
_workspace_root: &Path,
_: &mut AppContext,
) -> BoxFuture<'static, Value> {
future::ready(json!({
"tailwindCSS": {
"emmetCompletions": true,