Outside of using Deno with your favorite IDE, this section also documents and environment variables.
There is broad support for Deno in editors/IDEs. The following sections provide information about how to use Deno with editors. Most editors integrate directly into Deno using the Language Server Protocol and the language server that is integrated into the Deno CLI.
If you are trying to write or support a community integration to the Deno language server, there is some located in the Deno CLI code repository, but also feel free to join the Discord community in the channel.
Visual Studio Code
There is an official extension for Visual Studio Code called . When installed, it will connect to the language server built into the Deno CLI.
Because most people work in mixed environments, the extension does not enable a
workspace as Deno enabled by default, and it requires that the "deno.enable"
flag to be set. You can change the settings yourself, or you can choose
Deno: Initialize Workspace Configuration
from the command palette to enable
your project.
More information can be found in the Using Visual Studio Code section of the manual.
JetBrains’ IntelliJ IDEA and WebStorm
Currently support for JetBrains IDEs is available through .
Once installed, replace the content of
External Libraries > Deno Library > lib > lib.deno.d.ts
with the output of
deno types
. This will ensure the typings for the extension match the current
version. You will have to do this every time you update the version of Deno. For
more information on how to set-up your JetBrains IDE for Deno, read
this comment
on YouTrack.
JetBrain’s is considering migrating to the Deno language server (see: ). If you are a user of JetBrains and Deno, voicing your support can continue help JetBrains prioritize support.
vim/Neovim
Deno is well supported on both and Neovim via and ALE. coc.nvim offers plugins to integrate to the Deno language server while ALE supports it out of the box. The in Neovim also supports Deno.
coc.nvim
Once you have
installed, you need to install the required plugins via
:CocInstall coc-tsserver coc-deno
.
Once the plugins are installed and you want to enable Deno for a workspace, run
the command :CocCommand deno.initializeWorkspace
and you should be able to
utilize commands like gd
(goto definition) and gr
(go/find references).
ALE
For more information on how to setup ALE (like key bindings) refer to the .
Emacs
lsp-mode
Emacs supports Deno via the Deno language server using lsp-mode. Once it should support Deno, which can be configured to support various settings.
eglot
You can also use built-in Deno language server by using
eglot
.
An example configuration for Deno via eglot:
Atom
The Atom editor supports integrating with the Deno language
server via the package.
atom-ide-deno
requires that the Deno CLI be installed and the
atom-ide-base package to be installed
as well.
Sublime Text
Sublime Text supports connecting to the Deno language server via the . You may also want to install the TypeScript package to get full syntax highlighting.
Once you have the LSP package installed, you will want to add configuration to
your .sublime-project
configuration like the below:
{
"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",
"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"
]
}
]
}
}
}
Nova
The Nova editor can integrate the Deno language server via the .
GitHub Codespaces
allows you develop fully online or remotely on your local machine without needing to configure or install Deno. It is currently in early access.
If a project is a Deno enabled project and contains the .devcontainer
configuration as part of the repository, opening the project in GitHub
Codespaces should just “work”. If you are starting a new project, or you want to
add Deno support to an existing code space, it can be added by selecting the
Codespaces: Add Development Container Configuration Files...
from the command
pallet and then selecting Show All Definitions...
and then searching for the
Deno
definition.
Once selected, you will need to rebuild your container so that the Deno CLI is added to the container. After the container is rebuilt, the code space will support Deno.
Kakoune
supports connecting to the Deno language server
via the kak-lsp client. Once
an
example of configuring it up to connect to the Deno language server is by adding
the following to your kak-lsp.toml
:
[language.deno]
filetypes = ["typescript", "javascript"]
roots = [".git"]
command = "deno"
args = ["lsp"]
[language.deno.initialization_options]
enable = true
- bash
- elvish
- fish
- powershell
- zsh
bash example
Output the completions and add them to the environment:
PowerShell example
Output the completions:
> deno completions powershell >> $profile
> .$profile
This will be create a Powershell profile at
$HOME\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1
, and it
will be run whenever you launch the PowerShell.
zsh example
You should have a directory where the completions can be saved:
> mkdir ~/.zsh
Then output the completions:
And ensure the completions get loaded in your ~/.zshrc
:
fpath=(~/.zsh $fpath)
autoload -Uz compinit
compinit -u
If after reloading your shell and completions are still not loading, you may
need to remove ~/.zcompdump/
to remove previously generated completions and
then compinit
to generate them again.
zsh example with ohmyzsh and antigen
ohmyzsh is a configuration framework for zsh and can make it easier to manage your shell configuration. is a plugin manager for zsh.
Create the directory to store the completions and output the completions:
> mkdir ~/.oh-my-zsh/custom/plugins/deno
> deno completions zsh > ~/.oh-my-zsh/custom/plugins/deno/_deno
Then your .zshrc
might look something like this:
fish example
Output the completions to a deno.fish
file into the completions directory in
the fish config folder:
deno completions fish > ~/.config/fish/completions/deno.fish
There are a couple environment variables which can impact the behavior of Deno:
DENO_AUTH_TOKENS
- a list of authorization tokens which can be used to allow Deno to access remote private code. See the section for more details.DENO_TLS_CA_STORE
- a list of certificate stores which will be used when establishing TLS connections. The available stores aremozilla
andsystem
. You can specify one, both or none. The order you specify the store determines the order in which certificate chains will be attempted to resolved. The default value ismozilla
. Themozilla
store will use the bundled mozilla certs provided bywebpki-roots
. Thesystem
store will use your platforms . The exact set of mozilla certs will depend the version of Deno you are using. If you specify no certificate stores, then no trust will be given to any TLS connection without also specifyingDENO_CERT
or--cert
or specifying a specific certificate per TLS connection.DENO_CERT
- load a certificate authority from a PEM encoded file. This “overrides” the--cert
option. See the Proxies section for more information.DENO_DIR
- this will set the directory where cached information from the CLI is stored. This includes items like cached remote modules, cached transpiled modules, language server cache information and persisted data from local storage. This defaults to the operating systems default cache location and then under thedeno
path.DENO_INSTALL_ROOT
- When usingdeno install
where the installed scripts are stored. This defaults to$HOME/.deno/bin
.DENO_WEBGPU_TRACE
- The directory to use for WebGPU traces.HTTP_PROXY
- The proxy address to use for HTTP requests. See the section for more information.HTTPS_PROXY
- The proxy address to use for HTTPS requests. See the Proxies section for more information.NO_COLOR
- If set, this will cause the Deno CLI to not send ASCII color codes when writing to stdout and stderr. See the website for more information on this de facto standard. The value of this flag can be accessed at runtime without permission to read the environment variables by checking the value ofDeno.noColor
.