mirror of
https://github.com/denoland/deno.git
synced 2024-11-22 15:06:54 -05:00
docs(lsp): add Sublime Text integration documentation (#8797)
This commit is contained in:
parent
63e0ab99a1
commit
2e976080c7
1 changed files with 66 additions and 1 deletions
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue