This repository was archived by the owner on Jan 25, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtscompletejob.txt
More file actions
222 lines (168 loc) · 10.3 KB
/
tscompletejob.txt
File metadata and controls
222 lines (168 loc) · 10.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
*tscompletejob.txt* Typescript code complete plugin for Vim
============================================================================
Author: runoshun<runoshun@gmail.com> *tscompletejob-author*
License: MIT (see |tscompletejob-license|)
============================================================================
CONTENTS *tscompletejob-contents*
|tscompletejob-introduction|....................................Intro
|tscompletejob-commands|........................................Commands
|tscompletejob-settings|........................................Settings
|tscompletejob-mappings|........................................Mappings
{Incompatible with Vi}
============================================================================
INTRODUCTION *tscompletejob*
*tscompletejob-introduction*
'tscompletejob' is make for the purpose of complete/behavior quickly by using
tsserver for Vim. Supported features are Code completion, Go to Definition,
Quick Info, Signature Help, Show Compile Errors, Symbol Rename and Show
References.
============================================================================
COMMANDS *tscompletejob-commands*
*TsCompleteJobRestart*
:TsCompleteJobRestart
Start a job executing tsserver wrapper. If job is already started,
it stop job and start new process.
*TsCompleteJobStatus*
:TsCompleteJobStatus
Show a job status. If job is already started, this command show
value of |job_status()|. Otherwise it show "not started".
*TsCompleteJobGotoDefinition*
:TsCompleteJobGotoDefinition
Move the cursor to definition of symbol under the cursor. If
the definition exists in another file, it open that file and
move the cursor to the position.
*TsCompleteJobGotoPrev*
:TsCompleteJobGotoPrev
Move the cursor to previous possition according to history
recorded by |TsCompleteJobGotoDefinition|. If you use this feature,
|tscompletejob_enable_tagstack| must be set to 1
*TsCompleteJobGotoNext*
:TsCompleteJobGotoNext
Move the cursor to next possition according to history
recorded by |TsCompleteJobGotoDefinition|. If you use this feature,
|tscompletejob_enable_tagstack| must be set to 1
*TsCompleteJobQuickInfo*
:TsCompleteJobQuickInfo
Show quick infomation of symbol under the cursor to command line.
*TsCompleteJobReferences*
:TsCompleteJobReferences
Show references of symbol under the cursor in |location-list|.
*TsCompleteJobRename*
:TsCompleteJobRename
Rename symbols include other references.
*TsCompleteJobFormat*
:[range]TsCompleteJobFormat
Format source codes. If no range passed, it format whole file.
*TsCompleteJobCodeFix*
:TsCompleteJobCodeFix
Perform codefix at current cursor position.
============================================================================
SETTINGS *tscompletejob-settings*
Descriptions of variables are writen in following format.
<var_name> = <default_value>
*g:tscompletejob_node_cmd*
g:tscompletejob_node_cmd = "node"
The node command when used launch job.
*g:tscompletejob_custom_tsserverlibrary*
g:tscompletejob_custom_tsserverlibrary = (undefined)
(deprecated)
If you want use typescript 2.3 or higher, use
|g:tscompletejob_custom_tsserver| instead.
The path of tsserverlibrary.js. If you need to use different
version of typescript shipped with this plugin, please set
this variable. tsserverlibrary.js is included in typescript 2.0
or higher, and it placed at
"<typescirpt_install_dir>/lib/tsserverlibrary.js".
*g:tscompletejob_custom_tsserver*
g:tscompletejob_custom_tsserver = (undefined)
The path of tsserver.js. If you need to use different version of
typescript shipped with this plugin, please set this variable.
tsserver.js is included typescript npm package, and it is placed
at "<typescirpt_install_dir>/lib/tsserver.js".
*g:tscompletejob_autoload_filetypes*
g:tscompletejob_autoload_filetypes = ["ts", "tsx"]
Extentions of to manage in tscompletejob. If a extention of file
is not exists in this list, tscompletejob may not work correctly.
*g:tscompletejob_mappings_disable_default*
g:tscompletejob_mappings_disable_default = 0
If it set to non 0, default key mappings are disabled.
*g:tscompletejob_complete_disable*
g:tscompletejob_complete_disable = 0
If it is set to non 0, 'omnifunc' is not set by default.
*g:tscompletejob_complete_disable_detail*
g:tscompletejob_complete_disable_detail = 0
If it is set to non 0, detail informations(documentation, type
etc.) are ommited. Please try it, if the behavior of completion
is slow.
*g:tscompletejob_complete_max_detail_count*
g:tscompletejob_complete_max_detail_count = 50
Max number of candidates to show detail infomation. If candidates
exceeds this value, all detail information are ommited.
*g:tscompletejob_enable_tagstack*
g:tscompletejob_enable_tagstack = 0
If it is set to non 0, |:TsCompleteJobGotoDefinition| records
history of cursor positions.
*g:tscompletejob_signature_help_disable*
g:tscompletejob_signature_help_disable = 0
If it is set to non 0, call signature help on 'CursorHoldI' event
is disabled.
*g:tscompletejob_signature_help_disable_docs*
g:tscompletejob_signature_help_disable_docs = 0
If it is set to non 0, documentations are ommited when signature
help is shown. Please try it, if signature help is slow.
*g:tscompletejob_format_options*
g:tscompletejob_format_options = { ... }
Please see *autoload/tscompletejob.vim* about default values.
Please refer following source about the description of each options.
https://github.com/Microsoft/TypeScript/blob/master/src/server/protocol.d.ts
*g:tscompletejob_codefix_comfirm*
g:tscompletejob_codefix_comfirm = 0
If it is set to non 0, show confirmation before code fix.
==============================================================================
MAPPINGS *tscompletejob-mappings*
Following mappings are defined as buffer local mapping. Please see
|tscompletejob-commands| about behavior of thease mappings.
Normal mode
<Plug>(TsCompleteJobGotoDefinition) :TsCompleteJobGotoDefinition<CR>
<Plug>(TsCompleteJobGotoNext) :TsCompleteJobGotoNext<CR>
<Plug>(TsCompleteJobGotoPrev) :TsCompleteJobGotoPrev<CR>
<Plug>(TsCompleteJobQuickInfo) :TsCompleteJobQuickInfo<CR>
<Plug>(TsCompleteJobReferences) :TsCompleteJobReferences<CR>
<Plug>(TsCompleteJobRename) :TsCompleteJobRename<CR>
<Plug>(TsCompleteJobFormat) :TsCompleteJobFormat<CR>
<Plug>(TsCompleteJobCodeFix) :TsCompleteJobCodeFix<CR>
Visual mode
<Plug>(TsCompleteJobFormat) :TsCompleteJobFormat<CR>
*tscompletejob-default-mappings*
If |g:tscompletejob_mappings_disable_default| is not set to non 0, following
key mappings are defined as buffer local mapping.
Normal mode
<C-]> <Plug>(TsCompleteJobGotoDefinition)
<C-t> <Plug>(TsCompleteJobGotoPrev)
<LocalLeader>i <Plug>(TsCompleteJobQuickInfo)
<LocalLeader>u <Plug>(TsCompleteJobReferences)
<LocalLeader>r <Plug>(TsCompleteJobRename)
<LocalLeader>f <Plug>(TsCompleteJobFormat)
<C-x> <Plug>(TsCompleteJobCodeFix)
Visual mode
<LocalLeader>f <Plug>(TsCompleteJobFormat)
============================================================================
LICENSE *tscompletejob-license*
The MIT License (MIT)
Copyright (c) 2017 <runoshun@gmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
vim:tw=78:ts=8:ft=help:norl: