SpaceVim

A community-driven vim distribution


Home | About | Quick start guide | Documentation | Development | Community | Sponsors


Available Layers » lang#typescript

Description

This layer is for TypeScript development, includding code completion, syntax lint and doc generation.

Installation

To use this configuration layer, update custom configuration file with:

[[layers]]
  name = "lang#typescript"

To generate doc of typescript file, you need to install lehre

yarn add -D lehre

Layer options

Key bindings

Key Bindings Descriptions
SPC l d / K show documentation
SPC l e rename symbol
SPC l f code fix
SPC l g definition
SPC l i import
SPC l t type
SPC l g d generate doc
g d defintion preview
g D type definition

Code runner

To run TypeScript code in current buffer, you can press SPC l r. It will run without loss focus, and the result will be shown in a runner buffer.

Inferior REPL process

Start a ts-node -i inferior REPL process with SPC l s i.

Send code to inferior process commands:

Key Bindings Descriptions
SPC l s b send buffer and keep code buffer focused
SPC l s l send line and keep code buffer focused
SPC l s s send selection text and keep code buffer focused

Powered by Jekyll, Help improve this page