Home

Awesome

This repository is no longer maintained.

Build Status

tscompletejob-vim

Typescript code complete plugin for Vim : demo

日本語版READMEはこちら

Features

Limitations

Requirements

Install

This plugin has no special install requirements, so you can install with your favorite package manager.

Setting of node command

Nodejs is required to execute tsserver wrapper. node is used by default. If you need to change it, please set g:tscompletejob_node_cmd.

let g:tscompletejob_node_cmd = "/path/to/node"

Basic Functions and Usage

Code Complete

omnifunc=tscompletejob#complete is set by default in filetype:typescript. tscompletejob has no ftdetect, please use typescript-vim etc. or define ftdetect by yourself.

Goto Definition

It jump to difinition of variable or type. Move cursor to symbol which you want to find difinition, and execute :TsCompleteJobGotoDefinition. By default, the command is mapped to C-]. And you can use simple tagstack like feature by setting g:tscompletejob_enable_tagstack to 1. If tagstack is enabled, tscompletejob record history of cursor position when executing :TsCompleteJobGotoDefinition, and you can follow history using :TsCompleteJobGotoPrev (mapped to C-t), :TsCompleteJobGotoNext.

Quick info

It show symbol's quick infomation to command line. Move cursor to symbol which you want to show info, and execute :TsCompleteJobQuickInfo. By default, it is mapped to <LocalLeader>i

Call signature help

It show call signature infomations in popup menu using complete(). A bodies('word') of item in popup menu are empty, so no input on selection. If completeopt has preview, signature/parameter documentations are shown in preview window. By default, signature help is shown at CursorHold event, If help exists at current cursor position.

Show compile error

"tscompletejob" provides syntastic checker named tscompletejob. If you use it, please add this checker to g:syntastic_typescript_checkers. For example,

let g:syntastic_typescript_checkers = ["tscompletejob"]

Other features

Debugging

:TsCompleteJobStatus show status of job. If you need restart job, you can use TsCompleteJobRestart.

Use another typescript version

The typescript version bundled this plugin is currently 2.7.1. If you want use another typescript version, please set g:tscompletejob_custom_tsserver.

let g:tscompletejob_custom_tsserver = "/path/to/tsserver.js"

Settings and Customization

See help.

Demo

complete demo

goto_definition demo

signature_help demo

Running tests

  1. Install Vader
  2. Execute :Vader test/tscompletejob.vader