From 9c6d43fb9682d7e308371442421a1c5bb167e73e Mon Sep 17 00:00:00 2001 From: Simon Holthausen Date: Fri, 14 Aug 2020 19:33:43 +0200 Subject: [PATCH 1/4] (docs) Overview of the language-tools and how things work together --- docs/README.md | 1 + docs/internal/overview.md | 80 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 81 insertions(+) create mode 100644 docs/internal/overview.md diff --git a/docs/README.md b/docs/README.md index d5e975e5b..7fe224b91 100644 --- a/docs/README.md +++ b/docs/README.md @@ -96,3 +96,4 @@ Your default formatter for Svelte files may be wrong. Either it's set to the old ## Internals - [Notes about deployment](./internal/deployment.md) +- [Overview of the language-tools and how things work together](./overview.md) diff --git a/docs/internal/overview.md b/docs/internal/overview.md new file mode 100644 index 000000000..0185a2616 --- /dev/null +++ b/docs/internal/overview.md @@ -0,0 +1,80 @@ +# Overview of the language-tools and how things work together + +The `language-tools` repository is a monorepo containing several packages which are closely related to each other. + +- `svelte2tsx` - transforms Svelte code into JSX/TSX code +- `language-server` - a language server adhering to the [LSP](https://microsoft.github.io/language-server-protocol) +- `svelte-check` - a command line tool to get diagnostics for Svelte code +- `svelte-vscode` - the [Svelte for VSCode](https://marketplace.visualstudio.com/items?itemName=svelte.svelte-vscode) extension + +This is how they are related: + +``` +svelte-vscode | + |-> language-server -> svelte2tsx +svelte-check | +``` + +## language-server overview + +As briefly touched already, this is a language-server adhering to the [Language Server Protocol (LSP)](https://microsoft.github.io/language-server-protocol). +The protocol defines the communication between an editor or IDE and a language server that provides language features like auto complete, go to definition, find all references etc. + +Our `language-server` can roughly be splitted into four areas: + +- CSS: Provides intellisense for the things inside `