Typescript code complete plugin for Vim : demo
日本語版READMEはこちら
- Fast complete/behavior using wrapper of tsserver for Vim
- Supported features are Go to Definition, Quick Info, Signature Help, Show Compile Errors, Symbol Rename and Show References.
- Using job, channel features of vim
- Use jobcontrol features of Neovim
- tscompletejob can't work in cygwin vim (due to file path differ between vim and tsserver). Please use windows native vim.
- +job/+channel Vim or jobcontrol Neovim
- nodejs (4.x, 6.x)
This plugin has no special install requirements, so you can install with your favorite package manager.
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"
omnifunc=tscompletejob#complete
is set by default in filetype:typescript
.
tscompletejob has no ftdetect, please use typescript-vim
etc. or define ftdetect by yourself.
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
.
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
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.
"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"]
- Symbol rename
:TsCompleteJobRename
- Code formatting
:TsCompleteJobFormat
- Show Occurrences
:TsCompleteJobReferences
- Quick code fix
:TsCompleteJobCodeFix
About default key mappings, see help.
:TsCompleteJobStatus
show status of job. If you need restart job, you can use TsCompleteJobRestart
.
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"
See help.
- Code complete
- Goto Definition
- Call signature help
- Install Vader
- Execute
:Vader test/tscompletejob.vader