summaryrefslogtreecommitdiff
path: root/docs/getting_started
diff options
context:
space:
mode:
authorSteven Guerrero <stephenguerrero43@gmail.com>2020-12-16 22:40:21 -0500
committerGitHub <noreply@github.com>2020-12-17 14:40:21 +1100
commit2e976080c77812008baa0c83e44a1032a97532f8 (patch)
tree06a92ee95cfaf1f519adc4aa357a84865b665dee /docs/getting_started
parent63e0ab99a1757f5dbae0a5ec4ea11a037a47a29b (diff)
docs(lsp): add Sublime Text integration documentation (#8797)
Diffstat (limited to 'docs/getting_started')
-rw-r--r--docs/getting_started/setup_your_environment.md67
1 files changed, 66 insertions, 1 deletions
diff --git a/docs/getting_started/setup_your_environment.md b/docs/getting_started/setup_your_environment.md
index b987e4e63..ed52f74ec 100644
--- a/docs/getting_started/setup_your_environment.md
+++ b/docs/getting_started/setup_your_environment.md
@@ -147,7 +147,7 @@ project (`npm init -y` as necessary), then add the following block to your
#### LSP clients
Deno has builtin support for the
-[Language server protocol](https://langserver.org).
+[Language server protocol](https://langserver.org) as of version 1.6.0 or later.
If your editor supports the LSP, you can use Deno as a language server for
TypeScript and JavaScript.
@@ -188,6 +188,71 @@ if executable("deno")
endif
```
+##### Example for Sublime Text
+
+- Install the [Sublime LSP package](https://packagecontrol.io/packages/LSP)
+- Install the
+ [TypeScript package](https://packagecontrol.io/packages/TypeScript) to get
+ syntax highlighting
+- Add the following `.sublime-project` file to your project folder
+
+```json
+{
+ "settings": {
+ "LSP": {
+ "deno": {
+ "command": [
+ "deno",
+ "lsp"
+ ],
+ "initializationOptions": {
+ // "config": "", // Sets the path for the config file in your project
+ "enable": true,
+ // "importMap": "", // Sets the path for the import-map in your project
+ "lint": true,
+ "unstable": false
+ },
+ "enabled": true,
+ "languages": [
+ {
+ "languageId": "javascript",
+ "scopes": ["source.js"],
+ "syntaxes": [
+ "Packages/Babel/JavaScript (Babel).sublime-syntax",
+ "Packages/JavaScript/JavaScript.sublime-syntax"
+ ]
+ },
+ {
+ "languageId": "javascriptreact",
+ "scopes": ["source.jsx"],
+ "syntaxes": [
+ "Packages/Babel/JavaScript (Babel).sublime-syntax",
+ "Packages/JavaScript/JavaScript.sublime-syntax"
+ ]
+ },
+ {
+ "languageId": "typescript",
+ "scopes": ["source.ts"],
+ "syntaxes": [
+ "Packages/TypeScript-TmLanguage/TypeScript.tmLanguage",
+ "Packages/TypeScript Syntax/TypeScript.tmLanguage"
+ ]
+ },
+ {
+ "languageId": "typescriptreact",
+ "scopes": ["source.tsx"],
+ "syntaxes": [
+ "Packages/TypeScript-TmLanguage/TypeScriptReact.tmLanguage",
+ "Packages/TypeScript Syntax/TypeScriptReact.tmLanguage"
+ ]
+ }
+ ]
+ }
+ }
+ }
+}
+```
+
If you don't see your favorite IDE on this list, maybe you can develop an
extension. Our [community Discord group](https://discord.gg/deno) can give you
some pointers on where to get started.