Set Up Your Environment
The Deno CLI contains a lot of the tools that are commonly needed for developing applications, including a full language server to help power your IDE of choice. Installing is all you need to do to make these tools available to you.
Using an editor/IDE
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
Visual Studio Code
Because most people work in mixed environments, the extension does not enable a
workspace as Deno enabled by default, and it requires that the
flag to be set. You can change the settings yourself, or you can choose
Deno: Initialize Workspace Configuration from the command palette to enable
More information can be found in the Using Visual Studio Code section of the manual.
You can get support for Deno in WebStorm and other JetBrains IDEs, including PhpStorm, IntelliJ IDEA Ultimate, and PyCharm Professional. For this, install the official Deno plugin from Preferences / Settings | Plugins - Marketplace.
Check out this blog post to learn more about how to get started with Deno.
Vim/Neovim via plugins
Neovim 0.6+ using the built-in language server
Note that if you also have
tsserver as an LSP client, you may run into issues
denols are attached to your current buffer. To
resolve this, make sure to set some unique
root_dir for both
denols. You may also need to set
tsserver to prevent it from running in
single file mode. Here is an example
of such a configuration:
local nvim_lsp = require('lspconfig')
on_attach = on_attach,
root_dir = nvim_lsp.util.root_pattern("deno.json", "deno.jsonc"),
on_attach = on_attach,
root_dir = nvim_lsp.util.root_pattern("package.json"),
single_file_support = false
For Deno, the example above assumes a
deno.jsonc file exists at
the root of the project.
Once the plugin is installed, and you want to enable Deno for a workspace, run
:CocCommand deno.initializeWorkspace and you should be able to
utilize commands like
gd (goto definition) and
gr (go/find references).
ALE supports Deno via the Deno language server out of the box and in many uses
cases doesn't require additional configuration. Once you have
ALE installed you can
perform the command
to get information on the configuration options available.
For more information on how to setup ALE (like key bindings) refer to the official documentation.
Vim-EasyComplete supports Deno without any other configuration. Once you have
you need install deno via
:InstallLspServer deno if you haven't installed
deno. You can get more information from
You can also use built-in Deno language server by using
An example configuration for Deno via eglot:
(add-to-list 'eglot-server-programs '((js-mode typescript-mode) . (eglot-deno "deno" "lsp")))
(defclass eglot-deno (eglot-lsp-server) ()
:documentation "A custom class for deno lsp.")
(cl-defmethod eglot-initialization-options ((server eglot-deno))
"Passes through required deno initialization options"
(list :enable t
The Pulsar editor, formerly known as Atom supports
integrating with the Deno language server via the
atom-ide-deno requires that the Deno CLI be installed and the
atom-ide-base package to
be installed as well.
Once you have the LSP package installed, you will want to add configuration to
.sublime-project configuration like the below:
"command": ["deno", "lsp"],
// "config": "", // Sets the path for the config file in your project
// "importMap": "", // Sets the path for the import-map in your project
GitHub Codespaces allows you to 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
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
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
kak-lsp is installed an
example of configuring it up to connect to the Deno language server is by adding
the following to your
roots = [".git"]
command = "deno"
args = ["lsp"]
enable = true
lint = true
Built into the Deno CLI is support to generate shell completion information for
the CLI itself. By using
deno completions <shell>, the Deno CLI will output to
stdout the completions. Current shells that are supported:
Output the completions and add them to the environment:
> deno completions bash > /usr/local/etc/bash_completion.d/deno.bash
> source /usr/local/etc/bash_completion.d/deno.bash
Output the completions:
> deno completions powershell >> $profile
This will create a Powershell profile at
$HOME\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1, and it
will be run whenever you launch the PowerShell.
You should have a directory where the completions can be saved:
> mkdir ~/.zsh
Then output the completions:
> deno completions zsh > ~/.zsh/_deno
And ensure the completions get loaded in your
autoload -Uz compinit
If after reloading your shell and completions are still not loading, you may
need to remove
~/.zcompdump/ to remove previously generated completions and
compinit to generate them again.
zsh example with ohmyzsh and antigen
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
.zshrc might look something like this:
# Load the oh-my-zsh's library.
antigen use oh-my-zsh
antigen bundle deno
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 several 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 Private modules and repositories section for more details.
DENO_TLS_CA_STORE- a list of certificate stores which will be used when establishing TLS connections. The available stores are
system. You can specify one, both or none. Certificate chains attempt to resolve in the same order in which you specify them. The default value is
mozillastore will use the bundled Mozilla certs provided by
systemstore will use your platform's native certificate store. The exact set of Mozilla certs will depend on 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 specifying
--certor specifying a specific certificate per TLS connection.
DENO_CERT- load a certificate authority from a PEM encoded file. This "overrides" the
--certoption. 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 system's default cache location and then under the
DENO_INSTALL_ROOT- When using
deno installwhere the installed scripts are stored. This defaults to
DENO_NO_PACKAGE_JSON- Set to disable auto-resolution of package.json files.
DENO_NO_PROMPT- Set to disable permission prompts on access (alternative to passing
DENO_NO_UPDATE_CHECK- Set to disable checking if a newer Deno version is available.
DENO_WEBGPU_TRACE- The directory to use for WebGPU traces.
HTTP_PROXY- The proxy address to use for HTTP requests. See the Proxies 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 prevent the Deno CLI from sending ANSI color codes when writing to stdout and stderr. See the website https://no-color.org/ 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 of
NO_PROXY- Indicates hosts which should bypass the proxy set in the other environment variables. See the Proxies section for more information.
NPM_CONFIG_REGISTRY- The npm registry to use when loading modules via npm specifiers