diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 404e4f455..d933d4de7 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -35,3 +35,7 @@ If applicable, add screenshots to help explain your problem. **Additional context** Add any other context about the problem here. + + \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index bbcbbe7d6..e80bc46c4 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -18,3 +18,7 @@ A clear and concise description of any alternative solutions or features you've **Additional context** Add any other context or screenshots about the feature request here. + + \ No newline at end of file diff --git a/.prettierignore b/.prettierignore index d7cf4d024..8941ed7db 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,2 +1,3 @@ packages/svelte2tsx/*.d.ts -packages/svelte2tsx/test/** \ No newline at end of file +packages/svelte2tsx/test/** +.github/** \ No newline at end of file diff --git a/README.md b/README.md index f3ccbcbe6..f81b25503 100644 --- a/README.md +++ b/README.md @@ -75,6 +75,8 @@ Converts a .svelte file into a legal TypeScript file. Built from [halfnelson/sve Pull requests are encouraged and always welcome. [Pick an issue](https://github.com/sveltejs/language-tools/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc) and help us out! +To get an overview of the internals, [read here](./docs/internal/overview.md). + To install and work on these tools locally: > Make sure to uninstall the extension from the marketplace to not have it clash with the local one. diff --git a/docs/README.md b/docs/README.md index d5e975e5b..ccbd03990 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](./internal/overview.md) diff --git a/docs/internal/overview.md b/docs/internal/overview.md new file mode 100644 index 000000000..d54b238b6 --- /dev/null +++ b/docs/internal/overview.md @@ -0,0 +1,109 @@ +# 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](/packages/language-server/src/plugins): + +- CSS: Provides intellisense for the things inside `