]> git.madduck.net Git - etc/vim.git/blob - .vim/bundle/vim-lsp/doc/vim-lsp.txt

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Merge commit 'a39f715c13be3352193ffd9c5b7536b8786eff64' as '.vim/bundle/vim-lsp'
[etc/vim.git] / .vim / bundle / vim-lsp / doc / vim-lsp.txt
1 *vim-lsp.txt*  Async Language Server Protocol (LSP) for Vim 8 and Neovim.
2 *vim-lsp*
3
4 ==============================================================================
5 CONTENTS                                                  *vim-lsp-contents*
6
7     Introduction                          |vim-lsp-introduction|
8     Install                               |vim-lsp-install|
9     Performance                           |vim-lsp-performance|
10     Language Servers                      |vim-lsp-language-servers|
11       Configure                             |vim-lsp-configure|
12       vim-lsp-settings                      |vim-lsp-settings_plugin|
13       Wiki                                  |vim-lsp-configure-wiki|
14       Health Check                          |vim-lsp-healthcheck|
15     Options                               |vim-lsp-options|
16       g:lsp_auto_enable                     |g:lsp_auto_enable|
17       g:lsp_use_native_client               |g:lsp_use_native_client|
18       g:lsp_preview_keep_focus              |g:lsp_preview_keep_focus|
19       g:lsp_preview_float                   |g:lsp_preview_float|
20       g:lsp_preview_autoclose               |g:lsp_preview_autoclose|
21       g:lsp_preview_doubletap               |g:lsp_preview_doubletap|
22       g:lsp_insert_text_enabled             |g:lsp_insert_text_enabled|
23       g:lsp_text_edit_enabled               |g:lsp_text_edit_enabled|
24       g:lsp_completion_documentation_enabled
25                                         |g:lsp_completion_documentation_enabled|
26       g:lsp_completion_documentation_delay
27                                         |g:lsp_completion_documentation_delay|
28       g:lsp_diagnostics_enabled             |g:lsp_diagnostics_enabled|
29       g:lsp_diagnostics_echo_cursor         |g:lsp_diagnostics_echo_cursor|
30       g:lsp_diagnostics_echo_delay          |g:lsp_diagnostics_echo_delay|
31       g:lsp_diagnostics_float_cursor        |g:lsp_diagnostics_float_cursor|
32       g:lsp_diagnostics_float_delay         |g:lsp_diagnostics_float_delay|
33       g:lsp_diagnostics_float_insert_mode_enabled
34                                   |g:lsp_diagnostics_float_insert_mode_enabled|
35       g:lsp_diagnostics_highlights_enabled
36                              |g:lsp_diagnostics_highlights_enabled|
37       g:lsp_diagnostics_highlights_insert_mode_enabled
38                              |g:lsp_diagnostics_highlights_insert_mode_enabled|
39       g:lsp_diagnostics_highlights_delay
40                              |g:lsp_diagnostics_highlights_delay|
41       g:lsp_diagnostics_signs_enabled       |g:lsp_diagnostics_signs_enabled|
42       g:lsp_diagnostics_signs_insert_mode_enabled
43                              |g:lsp_diagnostics_signs_insert_mode_enabled|
44       g:lsp_diagnostics_signs_delay         |g:lsp_diagnostics_signs_delay|
45       g:lsp_diagnostics_signs_priority      |g:lsp_diagnostics_signs_priority|
46       g:lsp_diagnostics_signs_priority_map
47                              |g:lsp_diagnostics_signs_priority_map|
48       g:lsp_diagnostics_virtual_text_enabled
49                              |g:lsp_diagnostics_virtual_text_enabled|
50       g:lsp_diagnostics_virtual_text_insert_mode_enabled
51                              |g:lsp_diagnostics_virtual_text_insert_mode_enabled|
52       g:lsp_diagnostics_virtual_text_delay
53                              |g:lsp_diagnostics_virtual_text_delay|
54       g:lsp_diagnostics_virtual_text_align
55                              |g:lsp_diagnostics_virtual_text_align|
56       g:lsp_diagnostics_virtual_text_padding_left
57                              |g:lsp_diagnostics_virtual_text_padding_left|
58       g:lsp_diagnostics_virtual_text_wrap
59                              |g:lsp_diagnostics_virtual_text_wrap|
60       g:lsp_document_code_action_signs_enabled
61                              |g:lsp_document_code_action_signs_enabled|
62       g:lsp_document_code_action_signs_delay
63                              |g:lsp_document_code_action_signs_delay|
64       g:lsp_inlay_hints_enabled
65                              |g:lsp_inlay_hints_enabled|
66       g:lsp_inlay_hints_delay
67                              |g:lsp_inlay_hints_delay|
68       g:lsp_inlay_hints_mode
69                              |g:lsp_inlay_hints_mode|
70       g:lsp_tree_incoming_prefix            |g:lsp_tree_incoming_prefix|
71       g:lsp_format_sync_timeout             |g:lsp_format_sync_timeout|
72       g:lsp_use_event_queue                 |g:lsp_use_event_queue|
73       g:lsp_max_buffer_size                 |g:lsp_max_buffer_size|
74       g:lsp_document_highlight_enabled      |g:lsp_document_highlight_enabled|
75       g:lsp_document_highlight_delay        |g:lsp_document_highlight_delay|
76       g:lsp_get_supported_capabilities      |g:lsp_get_supported_capabilities|
77       g:lsp_document_symbol_detail          |g:lsp_document_symbol_detail|
78       g:lsp_peek_alignment                  |g:lsp_peek_alignment|
79       g:lsp_preview_max_width               |g:lsp_preview_max_width|
80       g:lsp_preview_max_height              |g:lsp_preview_max_height|
81       g:lsp_preview_fixup_conceal           |g:lsp_preview_fixup_conceal|
82       g:lsp_float_max_width                 |g:lsp_float_max_width|
83       g:lsp_signature_help_enabled          |g:lsp_signature_help_enabled|
84       g:lsp_fold_enabled                    |g:lsp_fold_enabled|
85       g:lsp_hover_conceal                   |g:lsp_hover_conceal|
86       g:lsp_hover_ui                        |g:lsp_hover_ui|
87       g:lsp_ignorecase                      |g:lsp_ignorecase|
88       g:lsp_log_file                        |g:lsp_log_file|
89       g:lsp_log_verbose                     |g:lsp_log_verbose|
90       g:lsp_semantic_enabled                |g:lsp_semantic_enabled|
91       g:lsp_semantic_delay                  |g:lsp_semantic_delay|
92       g:lsp_text_document_did_save_delay    |g:lsp_text_document_did_save_delay|
93       g:lsp_snippet_expand                  |g:lsp_snippet_expand|
94       g:lsp_completion_resolve_timeout      |g:lsp_completion_resolve_timeout|
95       g:lsp_tagfunc_source_methods          |g:lsp_tagfunc_source_methods|
96       g:lsp_show_message_request_enabled    |g:lsp_show_message_request_enabled|
97       g:lsp_work_done_progress_enabled      |g:lsp_work_done_progress_enabled|
98       g:lsp_show_message_log_level          |g:lsp_show_message_log_level|
99       g:lsp_untitled_buffer_enabled          |g:lsp_untitled_buffer_enabled|
100     Functions                             |vim-lsp-functions|
101       lsp#enable                            |lsp#enable()|
102       lsp#disable                           |lsp#disable()|
103       lsp#register_server                   |lsp#register_server()|
104       lsp#register_command                  |lsp#register_command()|
105       lsp#stream                            |lsp#stream()|
106       lsp#stop_server                       |lsp#stop_server()|
107       lsp#utils#find_nearest_parent_file_directory()
108                               |lsp#utils#find_nearest_parent_file_directory()|
109       lsp#enable_diagnostics_for_buffer() |lsp#enable_diagnostics_for_buffer()|
110       lsp#disable_diagnostics_for_buffer()|lsp#disable_diagnostics_for_buffer()|
111       lsp#get_buffer_diagnostics_counts() |lsp#get_buffer_diagnostics_counts()|
112       lsp#get_buffer_first_error_line()   |lsp#get_buffer_first_error_line()|
113       lsp#get_progress()                  |lsp#get_progress()|
114       lsp#document_hover_preview_winid()  |lsp#document_hover_preview_winid()|
115     Commands                              |vim-lsp-commands|
116       LspAddTreeCallHierarchyIncoming       |:LspAddTreeCallHierarchyIncoming|
117       LspAddTreeReferences                  |:LspAddTreeReferences|
118       LspCallHierarchyIncoming              |:LspCallHierarchyIncoming|
119       LspCallHierarchyOutgoing              |:LspCallHierarchyOutgoing|
120       LspCodeAction                         |:LspCodeAction|
121       LspCodeActionSync                     |:LspCodeActionSync|
122       LspCodeLens                           |:LspCodeLens|
123       LspDocumentDiagnostics                |:LspDocumentDiagnostics|
124       LspDeclaration                        |:LspDeclaration|
125       LspDefinition                         |:LspDefinition|
126       LspDocumentFold                       |:LspDocumentFold|
127       LspDocumentFoldSync                   |:LspDocumentFoldSync|
128       LspDocumentFormat                     |:LspDocumentFormat|
129       LspDocumentFormatSync                 |:LspDocumentFormatSync|
130       LspDocumentRangeFormat                |:LspDocumentRangeFormat|
131       LspDocumentRangeFormatSync            |:LspDocumentRangeFormatSync|
132       LspDocumentSymbol                     |:LspDocumentSymbol|
133       LspDocumentSymbolSearch               |:LspDocumentSymbolSearch|
134       LspHover                              |:LspHover|
135       LspNextDiagnostic                     |:LspNextDiagnostic|
136       LspNextError                          |:LspNextError|
137       LspNextReference                      |:LspNextReference|
138       LspNextWarning                        |:LspNextWarning|
139       LspPeekDeclaration                    |:LspPeekDeclaration|
140       LspPeekDefinition                     |:LspPeekDefinition|
141       LspPeekImplementation                 |:LspPeekImplementation|
142       LspPeekTypeDefinition                 |:LspPeekTypeDefinition|
143       LspPreviousDiagnostic                 |:LspPreviousDiagnostic|
144       LspPreviousError                      |:LspPreviousError|
145       LspPreviousReference                  |:LspPreviousReference|
146       LspPreviousWarning                    |:LspPreviousWarning|
147       LspImplementation                     |:LspImplementation|
148       LspReferences                         |:LspReferences|
149       LspRename                             |:LspRename|
150       LspSemanticHighlightGroups            |:LspSemanticHighlightGroups|
151       LspTypeDefinition                     |:LspTypeDefinition|
152       LspTypeHierarchy                      |:LspTypeHierarchy|
153       LspWorkspaceSymbol                    |:LspWorkspaceSymbol|
154       LspWorkspaceSymbolSearch              |:LspWorkspaceSymbolSearch|
155       LspStatus                             |:LspStatus|
156       LspStopServer                         |:LspStopServer|
157     Autocommands                          |vim-lsp-autocommands|
158       lsp_setup                             |lsp_setup|
159       lsp_complete_done                     |lsp_complete_done|
160       lsp_float_opened                      |lsp_float_opened|
161       lsp_float_closed                      |lsp_float_closed|
162       lsp_float_focused                     |lsp_float_focused|
163       lsp_register_server                   |lsp_register_server|
164       lsp_unregister_server                 |lsp_unregister_server|
165       lsp_server_init                       |lsp_server_init|
166       lsp_server_exit                       |lsp_server_exit|
167       lsp_buffer_enabled                    |lsp_buffer_enabled|
168       lsp_diagnostics_updated               |lsp_diagnostics_updated|
169       lsp_progress_updated                  |lsp_progress_updated|
170     Mappings                              |vim-lsp-mappings|
171        <plug>(lsp-preview-close)            |<plug>(lsp-preview-close)|
172        <plug>(lsp-preview-focus)            |<plug>(lsp-preview-focus)|
173     Autocomplete                          |vim-lsp-autocomplete|
174       omnifunc                              |vim-lsp-omnifunc|
175       asyncomplete.vim                      |vim-lsp-asyncomplete|
176     Tagfunc                               |vim-lsp-tagfunc|
177     Snippets                              |vim-lsp-snippets|
178     Folding                               |vim-lsp-folding|
179     Semantic highlighting                 |vim-lsp-semantic|
180     Popup Formatting                      |vim-lsp-popup-format|
181     Workspace Folders                     |vim-lsp-workspace-folders|
182     License                               |vim-lsp-license|
183     Maintainers                           |vim-lsp-maintainers|
184
185
186 ==============================================================================
187 INTRODUCTION                                          *vim-lsp-introduction*
188
189 Async Language Server Protocol (LSP) for Vim 8 and Neovim.
190
191 For more information on LSP refer to the official website at
192 https://microsoft.github.io/language-server-protocol/
193
194 ==============================================================================
195 INSTALL                                                    *vim-lsp-install*
196
197 Install vim-lsp plugin. Below is a sample using plug.vim
198 >
199     Plug 'prabirshrestha/vim-lsp'
200
201 ==============================================================================
202 PERFORMANCE                                          *vim-lsp-performance*
203
204 While Vim script is very portable it has performance implications. If you would
205 like to improve performance make sure you have vim/neovim with lua support.
206 Currently only diff algorithm uses lua internally if available.
207 Following is the default value used to detect lua.
208 >
209     let g:lsp_use_lua = has('nvim-0.4.0') || (has('lua') && has('patch-8.2.0775'))
210
211 Windows users can download the binaries from the following url and place
212 lua53.dll in the `PATH` or besides `vim.exe` or `gvim.exe` executables.
213
214 32 bit:
215 http://downloads.sourceforge.net/luabinaries/lua-5.3.2_Win32_dllw4_lib.zip
216
217 64bit:
218 http://downloads.sourceforge.net/luabinaries/lua-5.3.2_Win64_dllw4_lib.zip
219
220 If you are using vim set `let g:lsp_use_native_client = 1` and make sure you
221 are running vim 8.2.4780+.
222
223 Set |g:lsp_semantic_enabled| to 0.
224
225 Set |g:lsp_format_sync_timeout| to a reasonable value such as `1000`.
226
227 ==============================================================================
228 LANGUAGE SERVERS                                 *vim-lsp-language-servers*
229
230 CONFIGURE                                               *vim-lsp-configure*
231 vim-lsp doesn't ship with any language servers. The user is responsible for
232 configuring the language servers correctly.
233
234 Here is an example of configuring the python language server protocol based
235 on pylsp (https://github.com/python-lsp/python-lsp-server)
236
237 1. Make sure the language server is available locally in the machine.
238    For python, pip package manager can be used to install the language server.
239 >
240         pip install python-lsp-server
241
242 2. Register the language server in your .vimrc
243 >
244         if (executable('pylsp'))
245             au User lsp_setup call lsp#register_server({
246                 \ 'name': 'pylsp',
247                 \ 'cmd': {server_info->['pylsp']},
248                 \ 'allowlist': ['python']
249                 \ })
250         endif
251 <
252     For more details refer to |lsp#register_server()|.
253
254 3. Configure your settings for the buffer
255    Use |lsp_buffer_enabled| autocommand to configure the buffer.
256 >
257         function! s:on_lsp_buffer_enabled() abort
258             setlocal omnifunc=lsp#complete
259             setlocal signcolumn=yes
260             nmap <buffer> gd <plug>(lsp-definition)
261             nmap <buffer> <f2> <plug>(lsp-rename)
262        endfunction
263
264        augroup lsp_install
265             au!
266             autocmd User lsp_buffer_enabled call s:on_lsp_buffer_enabled()
267        augroup END
268 <
269 TCP SERVERS                                             *vim-lsp-tcp*
270 You can use tcp to connect to LSP servers that don't support stdio. Set host
271 and port to tcp. The Godot game engine uses 6008 as its LSP port and godot
272 ftplugins define gdscript or gdscript3 filetype: >
273
274         au User lsp_setup
275             \ call lsp#register_server({
276             \     'name': 'godot',
277             \     'tcp': "localhost:6008",
278             \     'allowlist': ['gdscript3', 'gdscript']
279             \ })
280 >
281 VIM-LSP-SETTINGS                                         *vim-lsp-settings_plugin*
282 Refer to [vim-lsp-settings](https://github.com/mattn/vim-lsp-settings) on how
283 to automatically register various language servers.
284 >
285         Plug 'prabirshrestha/vim-lsp'
286         Plug 'mattn/vim-lsp-settings'
287
288 HEALTH CHECK                                            *vim-lsp-healthcheck*
289 vim-lsp supports the |:CheckHealth| command which can be useful when debugging
290 lsp configuration issues.
291
292 This command is implemented in vim with the
293 [vim-healthcheck](https://github.com/rhysd/vim-healthcheck) plugin.
294
295 WIKI                                               *vim-lsp-configure-wiki*
296 For documentation on how to configure other language servers refer
297 to https://github.com/prabirshrestha/vim-lsp/wiki/Servers
298
299 ==============================================================================
300 Options                                                   *vim-lsp-options*
301
302 g:lsp_auto_enable                                       *g:lsp_auto_enable*
303     Type: |Number|
304     Default: `1`
305
306     Auto enable vim-lsp plugin during startup. Set to `0` to disable auto
307     enabling vim-lsp during startup.
308
309     Example: >
310         let g:lsp_auto_enable = 1
311         let g:lsp_auto_enable = 0
312
313 g:lsp_use_native_client                             *g:lsp_use_native_client*
314     Type: |Number|
315     Default: `0`
316
317     Enable native lsp client support for vim 8.2.4780+. No impact for neovim.
318     TCP language servers are not supported and should be set to 0 if one is
319     used.
320
321     Example: >
322         let g:lsp_use_native_client = 1
323         let g:lsp_use_native_client = 0
324
325 g:lsp_preview_keep_focus                         *g:lsp_preview_keep_focus*
326     Type: |Number|
327     Default: `1`
328
329     Indicates whether to keep the focus on current window or move the focus
330     to the |preview-window| when a |preview-window| is opened by vim-lsp.
331     Certain commands such as |:LspHover| opens the result in a
332     |preview-window|.
333
334     Example: >
335         " Keep the focus in current window
336         let g:lsp_preview_keep_focus = 1
337
338         " Do not keep the focus in current window.
339         " Move the focus to |preview-window|.
340         let g:lsp_preview_keep_focus = 0
341 <
342     * |preview-window| can be closed using the default vim mapping - `<c-w><c-z>`.
343     * |preview-window| can be also automatically closed after completion with
344     the following auto command: >
345         autocmd! CompleteDone * if pumvisible() == 0 | pclose | endif
346 <    * |preview-window| can be suppressed with: >
347         set completeopt-=preview
348 <
349 g:lsp_preview_float                         *g:lsp_preview_float*
350     Type: |Number|
351     Default: `1`
352
353     If set and nvim_win_open() or popup_create is available, hover information
354     are shown in a floating window as |preview-window| at the cursor position.
355     The |preview-window| is closed automatically on cursor moves, unless it is
356     focused. While focused it may be closed with <C-c>.
357
358     This feature requires neovim 0.4.0 (current master) or
359     Vim8.1 with has('patch-8.1.1517').
360
361     Example: >
362         " Opens preview windows as floating
363         let g:lsp_preview_float = 1
364
365         " Opens preview windows as normal windows
366         let g:lsp_preview_float = 0
367 <
368     After opening an autocmd User event lsp_float_opened is issued, as well as
369     and lsp_float_closed upon closing. This can be used to alter the preview
370     window (using |lsp#document_hover_preview_winid()| to get the window id),
371     setup custom bindings while a preview is open, or change the highlighting
372     of the window.
373
374     Example of custom keybindings: >
375         " Close preview window with <C-c>
376         autocmd User lsp_float_opened nmap <buffer> <silent> <C-c>
377                       \ <Plug>(lsp-preview-close)
378         autocmd User lsp_float_closed nunmap <buffer> <C-c>
379 <
380
381     Example of customising the highlighting: >
382         highlight PopupWindow ctermbg=lightblue guibg=lightblue
383
384         augroup lsp_float_colours
385             autocmd!
386             if !has('nvim')
387                 autocmd User lsp_float_opened
388                     \ call setwinvar(lsp#document_hover_preview_winid(),
389                     \                  '&wincolor', 'PopupWindow')
390             else
391                 autocmd User lsp_float_opened
392                     \ call nvim_win_set_option(
393                     \   lsp#document_hover_preview_winid(),
394                     \   'winhighlight', 'Normal:PopupWindow')
395             endif
396         augroup end
397 <
398
399 g:lsp_preview_autoclose                         *g:lsp_preview_autoclose*
400     Type: |Number|
401     Default: `1`
402
403     Indicates if an opened floating preview shall be automatically closed upon
404     movement of the cursor. If set to 1, the window will close automatically
405     if the cursor is moved and the preview is not focused. If set to 0, it
406     will remain open until explicitly closed (e.g. with
407     |<plug>(lsp-preview-close)|, or <ESC> when focused).
408
409     Example: >
410         " Preview closes on cursor move
411         let g:lsp_preview_autoclose = 1
412
413         " Preview remains open and waits for an explicit call
414         let g:lsp_preview_autoclose = 0
415
416 g:lsp_preview_doubletap                         *g:lsp_preview_doubletap*
417     Type: |List|
418     Default: `[function('lsp#ui#vim#output#focuspreview')]`
419
420     When preview is called twice with the same data while the preview is still
421     open, the function in `lsp_preview_doubletap` is called instead. To
422     disable this and just "refresh" the preview, set to ´0´.
423
424     Example: >
425         " Focus preview on repeated preview (does not work for vim8.1 popups)
426         let g:lsp_preview_doubletap = [function('lsp#ui#vim#output#focuspreview')]
427
428         " Closes the preview window on the second call to preview
429         let g:lsp_preview_doubletap = [function('lsp#ui#vim#output#closepreview')]
430
431         " Disables double tap feature; refreshes the preview on consecutive taps
432         let g:lsp_preview_doubletap = 0
433
434 g:lsp_insert_text_enabled                       *g:lsp_insert_text_enabled*
435     Type: |Number|
436     Default: `1`
437
438     Enable support for completion insertText property. Set to `0` to disable
439     using insertText.
440
441     Example: >
442         let g:lsp_insert_text_enabled = 1
443         let g:lsp_insert_text_enabled = 0
444
445 g:lsp_text_edit_enabled                           *g:lsp_text_edit_enabled*
446     Type: |Number|
447     Default: `1`
448
449     Enable support for completion textEdit property. Set to `0` to disable
450     using textEdit.
451
452     Example: >
453         let g:lsp_text_edit_enabled = 1
454         let g:lsp_text_edit_enabled = 0
455
456 g:lsp_completion_documentation_enabled   *g:lsp_completion_documentation_enabled*
457     Type: |Number|
458     Default: `1`
459
460     Enables floating window documentation for complete items.
461
462     Example: >
463         let g:lsp_completion_documentation_enabled = 1
464         let g:lsp_completion_documentation_enabled = 0
465
466 g:lsp_completion_documentation_delay       *g:lsp_completion_documentation_delay*
467     Type: |Number|
468     Default: `80`
469
470     Time in milliseconds to delay the completion documentation popup. Might
471     help with performance. Set this to `0` to disable debouncing.
472
473     Example: >
474         let g:lsp_completion_documentation_delay = 120
475         let g:lsp_completion_documentation_delay = 0
476
477 g:lsp_diagnostics_enabled                           *g:lsp_diagnostics_enabled*
478     Type: |Number|
479     Default: `1`
480
481     Enable support for document diagnostics like warnings and error messages.
482     enabling vim-lsp during startup.
483     Refer to |g:lsp_diagnostics_signs_enabled| to enable signs column.
484     Refer to |g:lsp_diagnostics_virtual_text_enabled| to enable virtual text.
485
486     Example: >
487         let g:lsp_diagnostics_enabled = 1
488         let g:lsp_diagnostics_enabled = 0
489 <
490 g:lsp_diagnostics_echo_cursor                *g:lsp_diagnostics_echo_cursor*
491     Type: |Number|
492     Default: `0`
493
494     Enables echo of diagnostic error for the current line to status. Requires
495     |g:lsp_diagnostics_enabled| set to 1.
496
497     Example: >
498         let g:lsp_diagnostics_echo_cursor = 1
499         let g:lsp_diagnostics_echo_cursor = 0
500
501 g:lsp_diagnostics_echo_delay                *g:lsp_diagnostics_echo_delay*
502     Type: |Number|
503     Default: `500`
504
505     Delay milliseconds to echo diagnostic error for the current line to status.
506     Requires |g:lsp_diagnostics_enabled| and |g:lsp_diagnostics_echo_cursor| set
507     to 1.
508
509     Example: >
510         let g:lsp_diagnostics_echo_delay = 200
511         let g:lsp_diagnostics_echo_delay = 1000
512
513 g:lsp_diagnostics_float_cursor                *g:lsp_diagnostics_float_cursor*
514     Type: |Number|
515     Default: `0`
516
517     Enables a floating window of diagnostic error for the current line to
518     status. Requires nvim_win_open() or popup_create is available, and
519     |g:lsp_diagnostics_enabled| set to 1.
520
521     Example: >
522         let g:lsp_diagnostics_float_cursor = 1
523         let g:lsp_diagnostics_float_cursor = 0
524
525 g:lsp_diagnostics_float_delay                *g:lsp_diagnostics_float_delay*
526     Type: |Number|
527     Default: `500`
528
529     Delay milliseconds to show diagnostic error for the current line to status
530     in a float window. Requires Enables float of diagnostic error for the
531     current line to status. Requires |g:lsp_diagnostics_enabled| and
532     |g:lsp_diagnostics_float_cursor| set to 1.
533
534     Example: >
535         let g:lsp_diagnostics_float_delay = 200
536         let g:lsp_diagnostics_float_delay = 1000
537
538 g:lsp_diagnostics_float_insert_mode_enabled
539                                  *g:lsp_diagnostics_float_insert_mode_enabled*
540     Type: |Boolean|
541     Default: `1`
542
543     Indicates whether to enable float of diagnostic error for the current line
544     to status when in |insertmode|. Requires |g:lsp_diagnostics_enabled| and
545     |g:lsp_diagnostics_float_cursor| set to 1.
546
547     Example: >
548         let g:lsp_diagnostics_float_insert_mode_enabled = 0
549
550 g:lsp_format_sync_timeout                           *g:lsp_format_sync_timeout*
551     Type: |Number|
552     Default: `-1`
553
554     Timeout milliseconds to abort `:LspDocumentFormatSync` or
555     `:LspDocumentRangeFormatSync`. Set to `-1` to disable timeout. Using
556     `BufWritePre` to execute sync commands may cause vim to hang when using
557     some language servers as starting the language server may be slow. Set the
558     timeout value to cancel sync format.
559
560     Example: >
561         let g:lsp_format_sync_timeout = -1
562         let g:lsp_format_sync_timeout = 1000
563
564 g:lsp_diagnostics_highlights_enabled    *g:lsp_diagnostics_highlights_enabled*
565     Type: |Number|
566     Default: `1` for neovim 0.3+ and vim with patch-8.1.1035
567
568     Enables highlighting of diagnostics. Requires NeoVim with version 0.3 or
569     Vim 8.1.1035 or newer.
570
571     Example: >
572         let g:lsp_diagnostics_highlights_enabled = 1
573         let g:lsp_diagnostics_highlights_enabled = 0
574 <
575     To change the style of the highlighting, you can set or link
576     `LspErrorHighlight`, `LspWarningHighlight`, `LspInformationHighlight` and
577     `LspHintHighlight` highlight groups.
578
579     Example: >
580         highlight link LspErrorHighlight Error
581
582 g:lsp_diagnostics_highlights_insert_mode_enabled
583                              *g:lsp_diagnostics_highlights_insert_mode_enabled*
584     Type: |Number|
585     Default: `1`
586
587     Indicates whether to enable diagnostics highlighting when in |insertmode|.
588     Requires |g:lsp_diagnostics_highlights_enabled|.
589
590     Example: >
591         let g:lsp_diagnostics_highlights_insert_mode_enabled = 1
592         let g:lsp_diagnostics_highlights_insert_mode_enabled = 0
593
594 g:lsp_diagnostics_highlights_delay         *g:lsp_diagnostics_highlights_delay*
595     Type: |Number|
596     Default: `500`
597
598     Delay milliseconds to update diagnostics highlights. Requires
599     |g:lsp_diagnostics_highlights_enabled|.
600
601     Example: >
602         let g:lsp_diagnostics_highlights_delay = 200
603         let g:lsp_diagnostics_highlights_delay = 1000
604
605 g:lsp_diagnostics_signs_enabled
606                                               *g:lsp_diagnostics_signs_enabled*
607     Type: |Number|
608     Default: `1` for vim/neovim with patch 8.1.0772
609
610     Enables signs for diagnostics. Requires NeoVim with |sign_define| or Vim
611     with |sign_define| and patch 8.1.0772 or newer and
612     |g:lsp_diagnostics_enabled| set to `1`.
613
614     Example: >
615         let g:lsp_diagnostics_signs_enabled = 1
616         let g:lsp_diagnostics_signs_enabled = 0
617 <
618     Four groups of signs are defined and used:
619     `LspError`, `LspWarning`, `LspInformation`, `LspHint`.
620
621     It is possible to set custom text or icon that will be used for each sign
622     (note that icons are only available in GUI).
623
624     `LspError` defaults to `E>`.
625     `LspHint` defaults to `H>`.
626     `LspInformation` defaults to `I>`.
627     `LspWarning` defaults to `W>`.
628
629     To do this, set some of the following globals:
630     `g:lsp_diagnostics_signs_error`, `g:lsp_diagnostics_signs_warning`,
631     `g:lsp_diagnostics_signs_information`, `g:lsp_diagnostics_signs_hint`.
632
633     They should be set to a dict, that contains either text that will be used
634     as sign in terminal, or icon that will be used for GUI, or both.
635
636     Example: >
637         let g:lsp_diagnostics_signs_error = {'text': '✗'}
638         let g:lsp_diagnostics_signs_warning = {'text': '‼', 'icon': '/path/to/some/icon'} " icons require GUI
639         let g:lsp_diagnostics_signs_hint = {'icon': '/path/to/some/other/icon'} " icons require GUI
640
641 g:lsp_diagnostics_signs_insert_mode_enabled
642                                   *g:lsp_diagnostics_signs_insert_mode_enabled*
643     Type: |Number|
644     Default: `1`
645
646     Indicates whether to enable diagnostics signs column when in |insertmode|.
647     Requires |g:lsp_diagnostics_signs_enabled|.
648
649     Example: >
650         let g:lsp_diagnostics_signs_insert_mode_enabled = 1
651         let g:lsp_diagnostics_signs_insert_mode_enabled = 0
652
653 g:lsp_diagnostics_signs_delay                   *g:lsp_diagnostics_signs_delay*
654     Type: |Number|
655     Default: `500`
656
657     Delay milliseconds to update diagnostics signs column. Requires
658     |g:lsp_diagnostics_signs_enabled|.
659
660     Example: >
661         let g:lsp_diagnostics_signs_delay = 200
662         let g:lsp_diagnostics_signs_delay = 1000
663
664 g:lsp_diagnostics_signs_priority             *g:lsp_diagnostics_signs_priority*
665     Type: |Number|
666     Default: `10`
667
668     Configures the |sign-priority| for placed signs. Signs placed by other
669     plugins have a priority of 10 by default. Requires
670     |g:lsp_diagnostics_signs_enabled| set to 1.
671
672     Example: >
673         let g:lsp_diagnostics_signs_priority = 11
674         let g:lsp_diagnostics_signs_priority = 9
675
676 g:lsp_diagnostics_signs_priority_map     *g:lsp_diagnostics_signs_priority_map*
677     Type: |Dict|
678     Default: `{}`
679
680     Overrides |g:lsp_diagnostics_signs_priority| per severity level or per server
681     name and severity level. Requires |g:lsp_diagnostics_signs_enabled| set to 1.
682
683     Example: >
684         let g:lsp_diagnostics_signs_priority_map = {
685                 \'LspError': 11,
686                 \'LspWarning': 7,
687                 \'clangd_LspWarning': 11,
688                 \'clangd_LspInformation': 11
689                 \}
690
691 g:lsp_diagnostics_virtual_text_enabled
692                                         *g:lsp_diagnostics_virtual_text_enabled*
693     Type: |Number|
694     Default: `1` for neovim 0.3+
695
696     Enables virtual text to be shown next to diagnostic errors. Requires
697     NeoVim with version 0.3 or newer or Vim with |virtual-text| and
698     patch 9.0.0178, and |g:lsp_diagnostics_enabled| set to `1`.
699     Virtual text uses the same highlight groups used for signs (eg LspErrorText),
700     but can be uniquely defined if you want to have different highlight groups
701     for signs and virtual text. To set unique virtual text highlighting, you
702     can set or link `LspErrorVirtualText`, `LspWarningVirtualText`,
703     `LspInformationVirtualText` and `LspHintVirtualText` highlight groups.
704
705     Example: >
706         let g:lsp_diagnostics_virtual_text_enabled = 1
707         let g:lsp_diagnostics_virtual_text_enabled = 0
708
709 g:lsp_diagnostics_virtual_text_insert_mode_enabled
710                         *g:lsp_diagnostics_virtual_text_insert_mode_enabled*
711     Type: |Number|
712     Default: `0`
713
714     Indicates whether to enable diagnostics virtual text when in |insertmode|.
715     Requires |g:lsp_diagnostics_virtual_text_enabled|.
716
717     Example: >
718         let g:lsp_diagnostics_virtual_text_insert_mode_enabled = 1
719         let g:lsp_diagnostics_virtual_text_insert_mode_enabled = 0
720
721 g:lsp_diagnostics_virtual_text_delay   *g:lsp_diagnostics_virtual_text_delay*
722     Type: |Number|
723     Default: `500`
724
725     Delay milliseconds to update diagnostics virtual text. Requires
726     |g:lsp_diagnostics_virtual_text_enabled|.
727
728     Example: >
729         let g:lsp_diagnostics_virtual_text_delay = 200
730         let g:lsp_diagnostics_virtual_text_delay = 1000
731
732 g:lsp_diagnostics_virtual_text_prefix   *g:lsp_diagnostics_virtual_text_prefix*
733     Type: |String|
734     Default: `""`
735
736     Adds the prefix to the diagnostics to be shown as virtual text. Requires
737     |g:lsp_diagnostics_virtual_text_enabled|.
738
739     Example: >
740         let g:lsp_diagnostics_virtual_text_prefix = "> "
741         let g:lsp_diagnostics_virtual_text_prefix = " ‣ "
742
743 g:lsp_diagnostics_virtual_text_align    *g:lsp_diagnostics_virtual_text_align*
744     Type: |String|
745     Default: `"below"`
746
747     Determines the align of the diagnostics virtual text. Requires
748     |g:lsp_diagnostics_virtual_text_enabled|.
749
750     Possible values are:
751
752        after   after the end of the line
753        right   right aligned in the window (unless the text wraps to the next
754                screen line)
755        below   in the next screen line
756        above   just above the line
757
758     Only one "right" property can fit in each line, if there are two or more
759     these will go in a separate line (still right aligned).
760
761     This value is passed as the "text_align" property in a |prop_add()| call.
762
763     Example: >
764         let g:lsp_diagnostics_virtual_text_align = "right"
765
766 g:lsp_diagnostics_virtual_text_padding_left
767                                   *g:lsp_diagnostics_virtual_text_padding_left*
768     Type: |Number|
769     Default: `1`
770
771     Determines the left padding of the diagnostics virtual text. Requires
772     |g:lsp_diagnostics_virtual_text_enabled|.
773
774     Example: >
775         let g:lsp_diagnostics_virtual_text_padding_left = 2
776
777 g:lsp_diagnostics_virtual_text_wrap       *g:lsp_diagnostics_virtual_text_wrap*
778     Type: |String|
779     Default: `"wrap"`
780
781     Determines whether or not to wrap the diagnostics virtual text. Possible
782     values are one of `'wrap'`, `'truncate'`. Requires
783     |g:lsp_diagnostics_virtual_text_enabled|.
784
785     Example: >
786         let g:lsp_diagnostics_virtual_text_wrap = "truncate"
787
788 g:lsp_document_code_action_signs_enabled
789                                       *g:lsp_document_code_action_signs_enabled*
790     Type: |Number|
791     Default: `1`
792
793     Enables signs for code actions. Requires NeoVim with |sign_define| or Vim
794     with |sign_define| and patch 8.1.0772 or newer.
795
796     Example: >
797         let g:lsp_document_code_action_signs_enabled = 1
798         let g:lsp_document_code_action_signs_enabled = 0
799 <
800     `LspCodeActionText` sign is defined and used.
801
802     It is possible to set custom text or icon that will be used for sign
803     (note that icons are only available in GUI).
804
805     `LspCodeActionText` defaults to `A>`.
806
807     To do this, set the following globals:
808     `g:lsp_document_code_action_signs_hint`.
809     They should be set to a dict, that contains either text that will be used
810     as sign in terminal, or icon that will be used for GUI, or both.
811
812     Example: >
813         let g:lsp_document_code_action_signs_hint = {'text': 'A>'}
814         let g:lsp_document_code_action_signs_hint = {'text': '‼', 'icon': '/path/to/some/icon'} " icons require GUI
815         let g:lsp_document_code_action_signs_hint = {'icon': '/path/to/some/other/icon'} " icons require GUI
816
817 g:lsp_document_code_action_signs_delay
818                                         *g:lsp_document_code_action_signs_delay*
819     Type: |Number|
820     Default: `500`
821
822     Delay milliseconds to update code action signs. Requires
823     |g:lsp_document_code_action_signs_enabled|.
824
825     Example: >
826         let g:lsp_document_code_action_signs_delay = 200
827         let g:lsp_document_code_action_signs_delay = 1000
828 >
829 g:lsp_inlay_hints_enabled
830                                       *g:lsp_inlay_hints_enabled*
831     Type: |Number|
832     Default: `0`
833
834     Enables inlay-hints. Requires Vim9 with |virtual-text|.
835     patch 9.0.0167 or newer.
836
837     Example: >
838         let g:lsp_inlay_hints_enabled = 1
839         let g:lsp_inlay_hints_enabled = 0
840 <
841     To change the style of the inlay-hints, you can set or link the
842     `lspInlayHintsType` and `lspInlayHintsParameter` highlight group.
843
844     Example: >
845     highlight lspInlayHintsType ctermfg=red guifg=red
846     \ ctermbg=green guibg=green
847     highlight lspInlayHintsParameter ctermfg=red guifg=red
848     \ ctermbg=green guibg=green
849
850 g:lsp_inlay_hints_delay
851                                         *g:lsp_inlay_hints_delay*
852     Type: |Number|
853     Default: `350`
854
855     Delay milliseconds to update inlay-hints. Requires
856     |g:lsp_inlay_hints_enabled|.
857
858     Example: >
859         let g:lsp_inlay_hints_delay = 200
860         let g:lsp_inlay_hints_delay = 1000
861 >
862 g:lsp_inlay_hints_mode
863                                         *g:lsp_inlay_hints_mode*
864     Type: |Dict|
865     Default: `{}`
866
867     This mode currently only include "curline" and "!curline".
868
869     Example: >
870         let g:lsp_inlay_hints_mode = {
871         \  'normal': ['curline'],
872         \}
873 <
874     "curline" show hint only for current line. "!curline" show hints except
875     current line. Default show all hints.
876 >
877 g:lsp_tree_incoming_prefix                          *g:lsp_tree_incoming_prefix*
878     Type: |String|
879     Default: `"<= "`
880
881     Specifies the prefix of items added by following commands.
882         * |LspAddTreeCallHierarchyIncoming|
883         * |LspAddTreeReferences|
884
885     Example: >
886         let g:lsp_tree_incoming_prefix = "← "
887         let g:lsp_tree_incoming_prefix = "⬅️  "
888
889 g:lsp_use_event_queue                               *g:lsp_use_event_queue*
890     Type: |Number|
891     Default: `1` for neovim or vim with patch-8.1.0889
892
893     Enable event queue which improves performance by reducing the
894     communication between client and server.
895
896     Example: >
897         let g:lsp_use_event_queue = 1
898         let g:lsp_use_event_queue = 0
899
900 g:lsp_max_buffer_size                               *g:lsp_max_buffer_size*
901     Type: |Number|
902     Default: `5000000`
903
904     To improve performance, if a buffer is larger than
905     `g:lsp_max_buffer_size` (measured in bytes), the following features
906     are disabled:
907     * Semantic highlighting
908
909     This functionality can be disabled by setting `g:lsp_max_buffer_size`
910     to a negative value.
911
912     Example: >
913         let g:lsp_max_buffer_size = 10000000
914         let g:lsp_max_buffer_size = -1
915
916 g:lsp_document_highlight_enabled      *g:lsp_document_highlight_enabled*
917     Type: |Number|
918     Default: `1` for neovim or vim with patch-8.1.1035
919
920     Enables highlighting of the references to the symbol under the cursor.
921     Requires NeoVim with version 0.3 or Vim 8.1.1035 or newer.
922
923     Example: >
924     let g:lsp_document_highlight_enabled = 1
925     let g:lsp_document_highlight_enabled = 0
926 <
927
928     To change the style of the highlighting, you can set or link the
929     `lspReference` highlight group.
930
931     Example: >
932     highlight lspReference ctermfg=red guifg=red ctermbg=green guibg=green
933
934 g:lsp_document_highlight_delay            *g:lsp_document_highlight_delay*
935     Type: |Number|
936     Default: `350`
937
938     Delay milliseconds to highlight references. Requires
939     |g:lsp_document_highlight_enabled| set to 1.
940
941     Example: >
942         let g:lsp_document_highlight_delay = 200
943         let g:lsp_document_highlight_delay = 1000
944
945 g:lsp_get_supported_capabilities         *g:lsp_get_supported_capabilities*
946     Type: |List|
947     Default: `[function('lsp#default_get_supported_capabilities')]`
948
949     A |List| containing one element of type |Funcref|. This element is a
950     reference to the function that vim-lsp should use to obtain the supported
951     LSP capabilities. Changing this variable allows customizing which
952     capabilities vim-lsp sends to a language server.
953
954     Note: You can obtain the default supported capabilities of vim-lsp by
955     calling `lsp#default_get_supported_capabilities` from within your
956     function.
957
958 g:lsp_document_symbol_detail                 *g:lsp_document_symbol_detail*
959     Type: |Number|
960     Default: `0`
961
962     Determines whether document symbol shows details or not. Set to `1` to
963     show details.
964
965     Note: showing details needs to turn on setting below: >
966       \ 'capabilities': {
967       \     'textDocument': {
968       \         'documentSymbol': {
969       \             'hierarchicalDocumentSymbolSupport': v:true,
970       \         },
971       \     },
972       \ },
973
974 g:lsp_peek_alignment                                 *g:lsp_peek_alignment*
975     Type: |String|
976     Default: `"center"`
977
978     Determines how to align the location of interest for e.g.
979     |:LspPeekDefinition|. Three values are possible: `"top"`, `"center"` and
980     `"bottom"`, which place the location of interest at the first, middle and
981     last lines of the preview/popup/floating window, respectively.
982
983 g:lsp_preview_max_width                           *g:lsp_preview_max_width*
984     Type: |Number|
985     Default: `-1`
986
987     If positive, determines the maximum width of the preview window in
988     characters. Lines longer than `g:lsp_preview_max_width` will be wrapped to
989     fit in the preview window. Use a value of `-1` to disable setting a
990     maximum width.
991
992 g:lsp_preview_max_height                         *g:lsp_preview_max_height*
993     Type: |Number|
994     Default: `-1`
995
996     If positive, determines the maximum height of the preview window in
997     characters. Use a value of `-1` to disable setting a maximum height.
998
999 g:lsp_preview_fixup_conceal                   *g:lsp_preview_fixup_conceal*
1000     Type: |Number|
1001     Default: `0`
1002
1003     If negative, all markdown documents are not converted as compact format.
1004     That's useful in vim. vim's popup doesn't shrink correctly if the
1005     buffer content uses conceals.
1006
1007 g:lsp_float_max_width                           *g:lsp_float_max_width*
1008     Type: |Number|
1009     Default: `-1`
1010
1011     If positive, determines the maximum width of the float windows in
1012     characters. Lines longer than `g:lsp_float_max_width` will be wrapped to fit
1013     in the float window.
1014     If set to 0, float windows can stretch to the width of the screen.
1015     Otherwise, the maximum width of the floating windows is set to 40% of the
1016     screen.
1017
1018 g:lsp_signature_help_enabled                *g:lsp_signature_help_enabled*
1019     Type: |Number|
1020     Default: `1`
1021
1022     Enable support for signature help. Set to `0` to disable.
1023
1024     Example: >
1025         let g:lsp_signature_help_enabled = 1
1026         let g:lsp_signature_help_enabled = 0
1027
1028 g:lsp_signature_help_delay                         *g:lsp_signature_help_delay*
1029     Type: |Number|
1030     Default: `200`
1031
1032     The waiting time in milliseconds before sending textDocument/signatureHelp
1033     to LSP servers.
1034
1035     Example: >
1036         let g:lsp_signature_help_delay = 100
1037         let g:lsp_signature_help_delay = 500
1038
1039 g:lsp_show_workspace_edits                     *g:lsp_show_workspace_edits*
1040     Type: |Boolean|
1041     Default: `0`
1042
1043     Enable showing changes made in a workspace edit in the |location-list|.
1044     Set to `0` to disable.
1045
1046     Example: >
1047         let g:lsp_show_workspace_edits = 1
1048         let g:lsp_show_workspace_edits = 0
1049
1050 g:lsp_fold_enabled                                    *g:lsp_fold_enabled*
1051     Type: |Number|
1052     Default: `1`
1053
1054     Determines whether or not folding is enabled globally. Set to `0` to
1055     disable sending requests.
1056
1057 g:lsp_hover_conceal                                   *g:lsp_hover_conceal*
1058     Type: |Boolean|
1059     Default: `1`
1060
1061     If `true` (`1`), 'conceallevel' is set to `2` for hover windows. This
1062     means that, for example, asterisks in markdown hovers are hidden, but the
1063     text is still displayed bold. You may want to disable this if the filetype
1064     of the popup has custom conceals which you don't want to use, or if
1065     you're using Vim in a terminal.
1066
1067     To override this setting per server, see
1068     |vim-lsp-server_info-hover_conceal|.
1069
1070 g:lsp_hover_ui                                                *g:lsp_hover_ui*
1071     Type: |String|
1072     Default: `''`
1073
1074     Controls default UI behavior for |LspHover|.
1075     If empty string, defaults to `float` if popup is supported in vim or
1076     floating window is supported in neovim else uses |preview-window|.
1077
1078     Example: >
1079         let g:lsp_hover_ui = ''
1080         let g:lsp_hover_ui = 'float'
1081         let g:lsp_hover_ui = 'preview'
1082
1083 g:lsp_ignorecase                                         *g:lsp_ignorecase*
1084     Type: |Boolean|
1085     Default: the value of 'ignorecase'
1086
1087     Determines whether or not case should be ignored when filtering or sorting
1088     completion items.
1089     See |vim-lsp-completion-filter| or |vim-lsp-completion-sort|.
1090     By default, the value of 'ignorecase' is used.
1091
1092 g:lsp_log_file                                           *g:lsp_log_file*
1093     Type: |String|
1094     Default: `''`
1095
1096     Determines whether or not logging should be written to a file.
1097     To disable log use empty string.
1098
1099     Example: >
1100         let g:lsp_log_file = ''
1101         let g:lsp_log_file = expand('~/vim-lsp.log')
1102
1103 g:lsp_log_verbose                                           *g:lsp_log_verbose*
1104     Type: |Number|
1105     Default: `'1'`
1106
1107     Determines whether or not verbose logging should be enabled. This usually
1108     includes logging the entire request and response from the LSP servers and
1109     clients which can have significant performance impact. Requires
1110     |g:lsp_log_file| to be set else there is no impact on enabling or
1111     disabling this flag.
1112
1113     Example: >
1114         let g:lsp_log_verbose = 1
1115         let g:lsp_log_verbose = 0
1116
1117 g:lsp_semantic_enabled                             *g:lsp_semantic_enabled*
1118     Type: |Boolean|
1119     Default: `0`
1120
1121     Determines whether or not semantic highlighting is enabled globally. Set
1122     to `1` to enable sending requests.
1123
1124 g:lsp_semantic_delay                                      *g:lsp_semantic_delay*
1125     Type: |Number|
1126     Default: `500`
1127
1128     Modifications which occur within |g:lsp_semantic_delay| of one another are
1129     lumped into a single `semanticTokens` request. Sets the maximum rate at
1130     which the semantic highlighting can update.
1131
1132 g:lsp_text_document_did_save_delay   *g:lsp_text_document_did_save_delay*
1133     Type: |Number|
1134     Default: `-1`
1135
1136     The waiting time in milliseconds before sending textDocument/didSave to
1137     LSP servers, -1 by default means no delay. If >= 0, will delay using
1138     |timer_start()| with {time} is the number.
1139
1140 g:lsp_snippet_expand                                 *g:lsp_snippet_expand*
1141     Type: |List|
1142
1143     The integration point to other snippet plugin.
1144     vim-lsp may invoke the first item of this value when it needs snippet
1145     expansion.
1146
1147 g:lsp_completion_resolve_timeout         *g:lsp_completion_resolve_timeout*
1148     Type: |Number|
1149     Default: `200`
1150
1151     The `completionItem/resolve` request's timeout value.
1152     If your vim freeze at `CompleteDone`, you can set this value to 0.
1153
1154 g:lsp_tagfunc_source_methods                 *g:lsp_tagfunc_source_methods*
1155     Type: |List|
1156     Default: `['definition', 'declaration', 'implementation', 'typeDefinition']`
1157
1158     The LSP methods to call to get symbols for tag lookup. See
1159     |vim-lsp-tagfunc|.
1160
1161 g:lsp_show_message_request_enabled         *g:lsp_show_message_request_enabled*
1162     Type: |Number|
1163     Default: `1`
1164
1165     Determines whether or not `window/showMessageRequest` should show message to
1166     the user or if it should be ignored. Set to `1` to enable.
1167
1168 g:lsp_work_done_progress_enabled         *g:lsp_work_done_progress_enabled*
1169     Type: |Number|
1170     Default: `0`
1171
1172     Determines whether or not to ask the server to send `$/progress`
1173     notifications. This can be intercepted by listening to |lsp#stream()|.
1174     Set to `1` to enable.
1175
1176 g:lsp_show_message_log_level                *g:lsp_show_message_log_level*
1177     Type: |String|
1178     Default: `'warning'`
1179
1180     Determines log level of messages sent from LSP servers. Possible values
1181     are one of `'none'`, `'error'`, `'warning'`, `'info'`, `'log'`. Messages
1182     are filtered by the value set to this variable. For example, when
1183     `'warning'` is set, `'error'` level and `'warning'` level messages are
1184     shown but `'info'` level and `'log'` level messages are not shown. Setting
1185     `'none'` disables to show messages completely.
1186
1187 g:lsp_untitled_buffer_enabled                *g:lsp_untitled_buffer_enabled*
1188     Type: |Number|
1189     Default: `1`
1190
1191     Determines whether or not vim-lsp plugin is enabled for untitled buffer.
1192     Set to `0` to disable for untitled buffer.
1193
1194 ==============================================================================
1195 FUNCTIONS                                               *vim-lsp-functions*
1196
1197 lsp#enable()                                                 *lsp#enable()*
1198
1199 Enables vim-lsp plugin.
1200
1201     Example: >
1202         :call lsp#enable()
1203
1204 lsp#disable()                                               *lsp#disable()*
1205
1206 Disables vim-lsp plugin.
1207
1208     Example: >
1209         :call lsp#disable()
1210
1211 lsp#register_server({server-info})                  *lsp#register_server()*
1212
1213 Used to register the language server with vim-lsp. This method takes
1214 one parameter which is a vim |dict| and is referred to as |vim-lsp-server_info|
1215
1216     Example: >
1217         if (executable('pylsp'))
1218             au User lsp_setup call lsp#register_server({
1219                 \ 'name': 'name-of-server',
1220                 \ 'cmd': {server_info->['server-exectuable']},
1221                 \ 'allowlist': ['filetype to allowlist'],
1222                 \ 'blocklist': ['filetype to blocklist'],
1223                 \ 'config': {},
1224                 \ 'workspace_config': {'param': {'enabled': v:true}},
1225                 \ 'languageId': {server_info->'python'},
1226                 \ })
1227         endif
1228 <
1229     Note:
1230         * checking for executable is optional but can be used to avoid
1231           unnecessary server registration.
1232         * au User lsp_setup is optional and used to delay registering the
1233           language server after .vimrc has been loaded. It is recommended
1234           to use it if possible.
1235
1236 server_info                                           *vim-lsp-server_info*
1237 The vim |dict| containing information about the server.
1238 >
1239     {
1240         'name': 'name of the server',
1241         'cmd': {server_info->['server_executable']},
1242         'allowlist': ['filetype'],
1243         'blocklist': ['filetype'],
1244         'config': {},
1245         'workspace_config': {},
1246         'languageId': {server_info->'filetype'},
1247     }
1248 <
1249  * name:
1250     required
1251     Name of the language server. Needs to be unique.
1252
1253  * cmd:
1254     required
1255     Function or array which represents command line to start the language
1256     server.
1257
1258     When function, it takes |vim-lsp-server_info| as parameter and returns the
1259     language server executable to run along with the appropriate arguments
1260     when the appropriate filetype is loaded. This function will only be
1261     called when the server has not started.
1262     Return empty array to ignore starting the server.
1263
1264     When array, the first element is the language server executable and
1265     the rest are the appropriate arguments. It is useful when the command line
1266     can be determined statically and |vim-lsp-server_info| is not necessary.
1267
1268     Example: >
1269         'cmd': ['pylsp']
1270 <
1271     Function can be complex based on custom requirements.
1272     For example:
1273         - Use binary from local node_modules folder instead of a global
1274           node_modules folder.
1275         - Use different executable based on custom config.
1276         - Return empty array to ignore starting server due to missing
1277           config value required by the server (ex: missing package.json)
1278         - Instead of checking for server executable before calling
1279           register_server it can also be checked here.
1280
1281     Cross-platform compatibility notes:
1282     It is recommended to use &shell with &shellcmdflag when running script
1283     files that can be executed specially on windows where *.bat and *.cmd
1284     files cannot be started without running the shell first. This is common
1285     for executable installed by npm for nodejs.
1286
1287     Example: >
1288         'cmd': {server_info->
1289             \ [&shell, &shellcmdflag, 'typescript-language-server --stdio']}
1290 <
1291  * allowlist:
1292     optional
1293     String array of filetypes to run the language server.
1294
1295     Example: >
1296         'allowlist': ['javascript', 'typescript']
1297 <
1298     '*' is treated as any filetype.
1299
1300  * blocklist:
1301     optional
1302     String array of filetypes not to run the language server.
1303
1304     Example: >
1305         'blocklist': ['javascript', 'typescript']
1306 <
1307     '*' is treated as any filetype.
1308
1309     allowlist and blocklist can be used together. The following example
1310     says to run the language server for all filetypes except javascript
1311     and typescript. blocklist always takes higher priority over allowlist.
1312 >
1313         'allowlist': ['*']
1314         'blocklist': ['javascript', 'typescript']
1315 <
1316   * workspace_config:
1317     optional
1318     vim |dict| or a function returning a vim |dict|
1319     Used to pass workspace configuration to the server after
1320     initialization. Configuration settings are language-server specific.
1321
1322     Example: >
1323         'workspace_config': {'pylsp': {'plugins': \
1324                 {'pydocstyle': {'enabled': v:true}}}}
1325 <
1326   * languageId:
1327     optional function returning |string|
1328     By default the languageId is the current filetype. If you're using a sub
1329     filetype like 'ios.swift' your language server may not return anything
1330     because it does not know this language.
1331     In this case you might want to overwrite the languageId with this key.
1332
1333     Example: >
1334         'languageId': {server_info->'typescript'}
1335 <
1336   * config:
1337     optional vim |dict|
1338     Used to pass additional custom config.
1339
1340     For example: >
1341         'config': { 'prefer_local': 1 }
1342 <
1343     This can then be used by cmd function.
1344 >
1345         function! s:myserver_cmd(server_info) abort
1346             let l:config = get(a:server_info, 'config', {})
1347             let l:prefer_local = get(l:config, 'prefer_local', 1)
1348             if (l:prefer_local)
1349                 return ['./local-executable']
1350             else
1351                 return ['/bin/global-exectuable']
1352             endif
1353         endfunction
1354
1355         'cmd': function('s:myserver_cmd')
1356 <
1357     Using the `config` key, you can also specify a custom 'typed word
1358     pattern', or a custom filter for completion items, see
1359     |vim-lsp-completion-filter|.
1360
1361     The following per-server configuration options are supported by vim-lsp.
1362
1363         * hover_conceal                 *vim-lsp-server_info-hover_conceal*
1364             Type: |Boolean|
1365             Default: |g:lsp_hover_conceal|
1366
1367             This takes precedence over the value of |g:lsp_hover_conceal|, to
1368             allow overriding this setting per server.
1369
1370             Example: >
1371                 'config': { 'hover_conceal': 1 }
1372 <
1373         * symbol_kinds
1374             Type: |Dict|
1375             Default: |{}|
1376
1377             This allows overriding the default text mappings for symbol kinds
1378             (e.g., "module", "method") per server. Useful for abbreviating or
1379             removing the kind text.
1380
1381             Example: >
1382                 'config': { 'symbol_kinds': {'26': 'type' } }
1383 <
1384         * completion_item_kinds
1385             Type: |Dict|
1386             Default: |{}|
1387
1388             This allows overriding the default text mappings for completion
1389             item kinds (e.g., "module", "method") per server. Useful for
1390             abbreviating or removing the kind text.
1391
1392             Example: >
1393                 'config': { 'completion_item_kinds': {'26': 'type' } }
1394 <
1395         * diagnostics
1396             Type: |Boolean|
1397             Default: |v:true|
1398
1399             This allows disablingdiagnostics per server. Useful when dealing
1400             with multiple servers (One for diagnostic only)
1401
1402             Example: >
1403                 'config': { 'diagnostics': v:false }
1404 <
1405   * env:
1406     optional vim |dict|
1407     Used to pass environment variables to the cmd.
1408     Example: >
1409         'env': { 'GOFLAGS': '-tags=wireinject' }
1410 <
1411
1412 refresh_pattern                                    *vim-lsp-refresh_pattern*
1413     Type: |String| (|pattern|)
1414     Default: `'\k*$'`
1415
1416 Vim-lsp will automatically detect start column of completion so far when
1417 invoking completion. It does this by checking the textEdit's range of each
1418 completion item.
1419
1420 You can use a |regexp| to determine what you want to start completion with
1421 matched text so far. The pattern is matched against the current line, from
1422 column 0 up until the cursor's position. Thus, |/$| means "current cursor
1423 position" in this context.
1424
1425 For example: >
1426         'config': { 'refresh_pattern': '\k*$' }
1427 <
1428 This uses all characters in `'iskeyword'` in front of the cursor as typed
1429 word.
1430
1431 This key is also used to align the completion menu: the completion menu is
1432 placed so its left border is at the column that matches the start of the
1433 `refresh_pattern`.
1434
1435 filter                                           *vim-lsp-completion-filter*
1436
1437 You can filter the completion items returned from the server by specifying a
1438 completion filter using the `filter` key in the server info's `config` |dict|.
1439 The value of the `filter` key is itself a |dict| containing at least a key
1440 `name`, which specifies which filter to use.
1441
1442 The case (in)sensitivity of the matching is determined by |g:lsp_ignorecase|.
1443
1444     Example: >
1445         'config': { 'filter': { 'name': 'none' } }
1446 <
1447     Available filters are:
1448         - `none` (default)
1449           Do not filter completion items, use all items returned from the
1450           language server.
1451
1452         - `prefix`
1453           Only allow completion items that are a prefix of the already typed
1454           word.
1455
1456         - `contains`
1457           Only allow completion items that contain the already typed word.
1458
1459 Note: After triggering completion with |i_CTRL-X_CTRL-O|, further filtering is
1460 only possible by adding to the already typed prefix (even if you're using the
1461 `contains` filter). If you'd like to retrigger the filtering, you will have to
1462 press CTRL-X CTRL-O again.
1463
1464 sort                                              *vim-lsp-completion-sort*
1465
1466 You can sort the completion items returned from the server by using the `sort`
1467 key in the server info's `config` |dict|.
1468 The value of the `sort` key is itself a |dict| containing at least a key
1469 `max`, which specifies max number of completion items count before giving up
1470 sorting for performance reason.
1471
1472 The case (in)sensitivity of the matching is determined by |g:lsp_ignorecase|.
1473
1474     Example: >
1475         'config': { 'sort': { 'max': 100 } }
1476
1477 lsp#register_command({command-name}, {callback})     *lsp#register_command()*
1478
1479 Some language server expects handling custom command in the client.
1480 You can use this function to add custom command handler.
1481
1482 {command-name} is unique id to specify command.
1483 {callback} is funcref that accepts below argument.
1484 >
1485   callback({
1486       'command': {
1487           'command': string,
1488           'arguments':  [...]
1489       }
1490   })
1491 <
1492
1493 For example, the rust-analyzer expects the client handles some custom command
1494 as below example.
1495 >
1496   function! s:rust_analyzer_apply_source_change(context)
1497       let l:command = get(a:context, 'command', {})
1498
1499       let l:workspace_edit = get(l:command['arguments'][0], 'workspaceEdit', {})
1500       if !empty(l:workspace_edit)
1501           call lsp#utils#workspace_edit#apply_workspace_edit(l:workspace_edit)
1502       endif
1503
1504       let l:cursor_position = get(l:command['arguments'][0], 'cursorPosition', {})
1505       if !empty(l:cursor_position)
1506           call cursor(lsp#utils#position#lsp_to_vim('%', l:cursor_position))
1507       endif
1508   endfunction
1509   call lsp#register_command('rust-analyzer.applySourceChange', function('s:rust_analyzer_apply_source_change'))
1510 <
1511 lsp#stream()                                            *lsp#stream()*
1512
1513 Stream api to listen to responses and notifications from language server or
1514 vim-lsp. Always verify the existence of request, response and server before
1515 accessing. Subscribing to stream should never throw an error.
1516 >
1517   function! s:on_textDocumentDiagnostics(x) abort
1518       echom 'Diagnostics for ' . a:x['server'] . ' ' . json_encode(a:x['response'])
1519   endfunction
1520
1521   au User lsp_setup call lsp#callbag#pipe(
1522       \ lsp#stream(),
1523       \ lsp#callbag#filter({x-> has_key(x, 'response') && !has_key(x['response'], 'error') && get(x['response'], 'method', '') == 'textDocument/publishDiagnostics'}),
1524       \ lsp#callbag#subscribe({ 'next':{x->s:on_textDocumentDiagnostics(x)} }),
1525       \ )
1526 <
1527 Custom vim-lsp notifications streams:
1528 vimp-lsp events mimic lsp server notifications.
1529 * `server` is always `$vimlsp`.
1530 * `response` `method` is always prefixed with ``$/vimlsp/`
1531
1532
1533 |$/vimlsp/lsp_server_exit|
1534     This is similar to |lsp_server_exit| autocommand.
1535
1536     Example: >
1537         {
1538           "server": "$vimlsp",
1539           "response": {
1540             "method": "$/vimlsp/lsp_server_exit",
1541             "params": { "server": "$vimlsp" }
1542           }
1543         }
1544 <
1545 lsp#stop_server({name-of-server})                        *lsp#stop_server()*
1546
1547 Used to stop the server.
1548
1549     Example: >
1550         call lsp#stop_server('name-of-server')
1551 <
1552     Note:
1553         * If the server is not running or is not registered it is a noop.
1554         * The server is forcefully stopped without sending shutdown request.
1555
1556 lsp#get_server_status({name-of-server})            *lsp#get_server_status()*
1557
1558 Get the status of a server.
1559
1560     Example: >
1561   call lsp#get_server_status('name-of-server')
1562 <
1563     Returns one of "unknown server", " "exited", "starting", "failed",
1564     "running", "not running".
1565
1566
1567 lsp#utils#position#lsp_to_vim({expr}, {position})  *lsp#utils#position#lsp_to_vim()*
1568
1569 Convert LSP's position to vim's pos ([lnum, col]).
1570
1571 {expr} is same of bufname argument.
1572 {position} is LSP's position params.
1573
1574
1575 lsp#utils#position#vim_to_lsp({expr}, {pos})       *lsp#utils#position#vim_to_lsp()*
1576
1577 Convert vim's pos to LSP's position ({ 'line': ..., 'character': ... }).
1578
1579 {expr} is same of bufname argument.
1580 {pos} is vim's position params.
1581
1582                             *lsp#utils#find_nearest_parent_file_directory()*
1583 lsp#utils#find_nearest_parent_file_directory({path}, {filename})
1584
1585 Find the nearest parent directory which contains the specific files or
1586 diretories. The method has two parameters. The first is the path where
1587 searching starts. The second is the files or directories names which
1588 you want to find. The return value is the directory path which is found
1589 the most times.
1590 This method is mainly used to generate 'root_uri' when registering server.
1591
1592     Example: >
1593         if executable('ccls')
1594             au User lsp_setup call lsp#register_server({
1595                 \ 'name': 'ccls',
1596                 \ 'cmd': {server_info->['ccls']},
1597                 \ 'root_uri':{server_info->lsp#utils#path_to_uri(
1598                 \       lsp#utils#find_nearest_parent_file_directory(
1599                 \               lsp#utils#get_buffer_path(),
1600                 \               ['.ccls', 'compile_commands.json', '.git/']
1601                 \       ))},
1602                 \ 'initialization_options': {},
1603                 \ 'allowlist': ['c', 'cpp', 'objc', 'objcpp', 'cc'],
1604                 \ })
1605         endif
1606 <
1607     Note:
1608         * The second parameter can be a |String| or a string |List|.
1609         * For the second parameter, the string ends with '/' or '\' will
1610           be regarded as a directory name, otherwise as a file name.
1611         * If there is not directory with the specific files or diretories
1612           found, the method will return an empty string.
1613
1614 lsp#enable_diagnostics_for_buffer()          *lsp#enable_diagnostic_for_buffer()*
1615
1616 Re-enable diagnostics for the specified buffer. By default diagnostics are
1617 enabled for all buffers.
1618
1619     Example: >
1620         :call lsp#enable_diagnostics_for_buffer()
1621         :call lsp#enable_diagnostics_for_buffer(bufnr('%'))
1622
1623 lsp#disable_diagnostics_for_buffer()       *lsp#disable_diagnostics_for_buffer()*
1624
1625 Diable diagnostics for the specified buffer. By default diagnostics are
1626 enabled for all buffers.
1627
1628     Example: >
1629         :call lsp#enable_diagnostics_for_buffer()
1630         :call lsp#enable_diagnostics_for_buffer(bufnr('%'))
1631
1632 Diagnostics can be disabled for buffer to temporarily avoid conflicts with
1633 other plugins.
1634
1635     Example: >
1636         augroup LspEasyMotion
1637             autocmd!
1638             autocmd User EasyMotionPromptBegin call lsp#disable_diagnostics_for_buffer()<CR>
1639             autocmd User EasyMotionPromptEnd call lsp#enable_diagnostics_for_buffer()<CR>
1640         augroup END
1641
1642 lsp#get_buffer_diagnostics_counts()    *lsp#get_buffer_diagnostics_counts()*
1643
1644 Get dict with diagnostic counts for current buffer. Useful e.g. for display
1645 in status line.
1646
1647     Returns dictionary with keys "error", "warning", "information", "hint".
1648
1649 lsp#get_buffer_first_error_line()        *lsp#get_buffer_first_error_line()*
1650
1651 Get line number of first error in current buffer.
1652
1653     Returns |Number| or |v:null| if there are no errors.
1654
1655 lsp#get_progress()                       *lsp#get_progress()*
1656
1657     Return UI |List| of |Dict| with window/workDoneProgress
1658     The |List| is most recently update order.
1659     The |Dict| has keys as follows.
1660     * server
1661         Type: |String|
1662     * token
1663         Type: |String|
1664     * title
1665         Type: |String|
1666     * messages
1667         Type: |String|
1668     * percentage
1669         Type: |Number|
1670         0 - 100 or not exist
1671
1672 lsp#document_hover_preview_winid()      *lsp#document_hover_preview_winid()*
1673
1674     Returns |windowid| of the current hover preview window or |v:null| if it does not
1675     exist.
1676
1677 lsp#scroll(count)                                             *lsp#scroll()*
1678
1679     Scroll current displayed floating/popup window with specified count.
1680
1681     Example: >
1682         nnoremap <buffer> <expr><c-f> lsp#scroll(+4)
1683         nnoremap <buffer> <expr><c-d> lsp#scroll(-4)
1684
1685 ==============================================================================
1686 Commands                                                  *vim-lsp-commands*
1687
1688 LspAddTreeCallHierarchyIncoming           *:LspAddTreeCallHierarchyIncoming*
1689
1690 Just like |LspCallHierarchyIncoming| , but instead of making a new list the
1691 result is appended to the current list.
1692
1693 LspAddTreeReferences                                 *:LspAddTreeReferences*
1694
1695 Just like |LspReferences| , but instead of making a new list the result is
1696 appended to the current list.
1697
1698 LspCallHierarchyIncoming                         *:LspCallHierarchyIncoming*
1699
1700 Find incoming call hierarchy for the symbol under cursor.
1701
1702 LspCallHierarchyOutgoing                         *:LspCallHierarchyOutgoing*
1703
1704 Find outgoing call hierarchy for the symbol under cursor.
1705
1706 LspCodeAction [--ui=float|preview] [{CodeActionKind}]       *:LspCodeAction*
1707
1708 Gets a list of possible commands that can be applied to a file so it can be
1709 fixed (quick fix).
1710
1711 If the optional {CodeActionKind} specified, will invoke code action
1712 immediately when matched code action is one only.
1713
1714 LspCodeActionSync [--ui=float|preview] [{CodeActionKind}] *:LspCodeActionSync*
1715
1716 Same as |:LspCodeAction| but synchronous. Useful when running |:autocmd|
1717 commands such as organize imports before save.
1718
1719     Example: >
1720         autocmd BufWritePre <buffer>
1721                 \ call execute('LspCodeActionSync source.organizeImports')
1722
1723 LspCodeLens                                                   *:LspCodeLens*
1724
1725 Gets a list of possible commands that can be executed on the current document.
1726
1727 LspDocumentDiagnostics                             *:LspDocumentDiagnostics*
1728
1729 Gets the document diagnostics and opens in |location-list|. By default
1730 diagnostics are filtered for current buffer.
1731
1732 Arguments:
1733
1734     --buffers   Defaults to empty string, i.e. shows diagnostics for current
1735                 buffer. To show diagnostic for all buffers use `--buffers=*`.
1736
1737     Example: >
1738         :LspDocumentDiagnostics
1739         :LspDocumentDiagnostics --buffers=*
1740
1741 LspDeclaration                                             *:LspDeclaration*
1742
1743 Go to declaration. Useful for languages such as C/C++ where there is a clear
1744 distinction between declaration and definition.
1745 This accepts |<mods>|.
1746
1747 Also see |:LspPeekDeclaration|.
1748
1749 LspDefinition                                               *:LspDefinition*
1750
1751 Go to definition.
1752 This accepts |<mods>|.
1753
1754 Also see |:LspPeekDefinition|.
1755
1756 LspDocumentFold                                           *:LspDocumentFold*
1757
1758 Recalculate folds for the current buffer.
1759
1760 LspDocumentFoldSync                                   *:LspDocumentFoldSync*
1761
1762 Same as |:LspDocumentFold|, but synchronous.
1763
1764 LspDocumentFormat                                       *:LspDocumentFormat*
1765
1766 Format the entire document.
1767
1768 LspDocumentFormatSync                               *:LspDocumentFormatSync*
1769
1770 Same as |:LspDocumentFormat| but synchronous. Useful when running |:autocmd|
1771 commands such as formatting before save. Set |g:lsp_format_sync_timeout| to
1772 configure timeouts.
1773
1774     Example: >
1775         autocmd BufWritePre <buffer> LspDocumentFormatSync
1776
1777 Note that this may slow down vim.
1778
1779 LspDocumentRangeFormat                             *:LspDocumentRangeFormat*
1780
1781 Format the current document selection.
1782
1783 LspDocumentRangeFormatSync                     *:LspDocumentRangeFormatSync*
1784
1785 Same as |:LspDocumentRangeFormat| but synchronous. Useful when running :autocmd
1786 commands. Set |g:lsp_format_sync_timeout| to configure timeouts.
1787
1788 Note that this may slow down vim.
1789
1790 LspDocumentSymbol                                       *:LspDocumentSymbol*
1791
1792 Gets the symbols for the current document.
1793
1794 LspDocumentSymbolSearch                             *:LspDocumentSymbolSearch*
1795
1796 Search the symbols for the current document and navigate.
1797
1798 LspHover [--ui=float|preview]                                      *:LspHover*
1799
1800 Gets the hover information and displays it in the |preview-window|.
1801
1802  * |preview-window| can be closed using the default vim mapping - `<c-w><c-z>`.
1803  * To control the default focus of |preview-window| for |:LspHover|
1804    configure |g:lsp_preview_keep_focus|.
1805  * If using neovim with nvim_win_open() available, |g:lsp_preview_float| can
1806    be set to enable a floating preview at the cursor which is closed
1807    automatically on cursormove if not focused and can be closed with <C-c> if
1808    focused.
1809
1810     Example: >
1811         :LspHover
1812         :LspHover --ui=float
1813         :LspHover --ui=preview
1814
1815 LspNextDiagnostic [-wrap=0]                              *:LspNextDiagnostic*
1816
1817 Jump to Next diagnostics including error, warning, information, hint.
1818 With '-wrap=0', stop wrapping around the end of file.
1819
1820 LspNextError [-wrap=0]                                 *:LspNextError*
1821
1822 Jump to Next err diagnostics
1823 With '-wrap=0', stop wrapping around the end of file.
1824
1825 LspNextReference                                         *:LspNextReference*
1826
1827 Jump to the next reference of the symbol under cursor.
1828
1829 LspNextWarning [-wrap=0]                              *:LspNextWarning*
1830
1831 Jump to Next warning diagnostics
1832 With '-wrap=0', stop wrapping around the end of file.
1833
1834 LspPeekDeclaration                                     *:LspPeekDeclaration*
1835
1836 Like |:LspDeclaration|, but opens the declaration in the |preview-window|
1837 instead of the current window.
1838
1839 Also see |g:lsp_peek_alignment| and |g:lsp_preview_float|.
1840
1841 LspPeekDefinition                                       *:LspPeekDefinition*
1842
1843 Like |:LspDefinition|, but opens the definition in the |preview-window|
1844 instead of the current window.
1845
1846 Also see |g:lsp_peek_alignment| and |g:lsp_preview_float|.
1847
1848 LspPeekImplementation                               *:LspPeekImplementation*
1849
1850 Like |:LspImplementation|, but opens the implementation in the
1851 |preview-window| instead of the current window.
1852
1853 Also see |g:lsp_peek_alignment| and |g:lsp_preview_float|.
1854
1855 LspPeekTypeDefinition                               *:LspPeekTypeDefinition*
1856
1857 Like |:LspTypeDefinition|, but opens the type definition in the
1858 |preview-window| instead of the current window.
1859
1860 Also see |g:lsp_peek_alignment| and |g:lsp_preview_float|.
1861
1862 LspPreviousDiagnostic [-wrap=0]               *:LspPreviousDiagnostic*
1863
1864 Jump to Previous diagnostics including error, warning, information, hint.
1865 With '-wrap=0', stop wrapping around the top of file.
1866
1867 LspPreviousError [-wrap=0]                         *:LspPreviousError*
1868
1869 Jump to Previous err diagnostics
1870 With '-wrap=0', stop wrapping around the top of file.
1871
1872 LspPreviousReference                                 *:LspPreviousReference*
1873
1874 Jump to the previous reference of the symbol under cursor.
1875
1876 LspPreviousWarning [-wrap=0]                     *:LspPreviousWarning*
1877
1878 Jump to Previous warning diagnostics
1879 With '-wrap=0', stop wrapping around the top of file.
1880
1881 LspImplementation                                       *:LspImplementation*
1882
1883 Find all implementation of interface.
1884 This accepts |<mods>|.
1885
1886 Also see |:LspPeekImplementation|.
1887
1888 LspReferences                                               *:LspReferences*
1889
1890 Find all references.
1891
1892 LspRename                                                       *:LspRename*
1893
1894 Rename the symbol.
1895
1896 LspSemanticHighlightGroups                     *:LspSemanticHighlightGroups*
1897
1898 List the highlight groups provided by the current semantic tokens server.
1899
1900 LspTypeDefinition                                       *:LspTypeDefinition*
1901
1902 Go to the type definition.
1903 This accepts |<mods>|.
1904
1905 LspTypeHierarchy                                       *:LspTypeHierarchy*
1906
1907 View type hierarchy for the symbol under cursor.
1908
1909 Also see |:LspPeekTypeDefinition|.
1910
1911 LspWorkspaceSymbol                                     *:LspWorkspaceSymbol*
1912
1913 Search and show workspace symbols in quickfix.
1914 Servers may choose to return empty results if the search query is empty.
1915
1916 LspWorkspaceSymbolSearch                            *:LspWorkspaceSymbolSearch*
1917
1918 Search the workspace symbols for all servers and navigate using quickpick.
1919 Servers may choose to return empty results if the search query is empty.
1920
1921 LspStatus                                                       *:LspStatus*
1922
1923 Prints the status of all registered servers. Use `:verbose LspStatus` to
1924 additionally show each server's workspace_config.
1925 See also |vim-lsp-healthcheck|.
1926
1927 LspStopServer[!] [name]                                      *:LspStopServer*
1928
1929 :LspStopServer
1930
1931 Stops all active servers that handle files matching the current buffer type.
1932 This is often what you want.  For example, if you have multiple files of
1933 different types open, `LspStopServer` will only stop the server for the
1934 current buffer.  Shows an error if there are no active LSP servers for the
1935 current buffer.
1936
1937 :LspStopServer!
1938
1939 Stops all active servers, regardless of the current buffer type.  Shows a
1940 message for every stopped server.
1941
1942 :LspStopServer name
1943
1944 Stops a server named 'name', comparing the provided ID with the value of the
1945 the 'name' property in the |lsp#register_server()| call.  Shows an error if
1946 'name' does not match a defined and currently running server.
1947
1948 Completion should list only currently running servers for the 'name' argument.
1949
1950 ==============================================================================
1951 Autocommands                                          *vim-lsp-autocommands*
1952
1953 lsp_setup                                                        *lsp_setup*
1954
1955 This autocommand is run once after vim-lsp is enabled. The server should be
1956 registered when this event is triggered.
1957
1958 lsp_complete_done                                        *lsp_complete_done*
1959
1960 This autocommand is run after Insert mode completion is done, similar to
1961 |CompleteDone|. However, the difference is that |lsp_complete_done| is run
1962 only after vim-lsp has finished executing its internal |CompleteDone|
1963 autocommands (e.g. applying text edits). It is thus ideal to use for snippet
1964 expansion, or custom post processing of completed items. Just like
1965 |CompleteDone|, the Vim variable |v:completed_item| contains information about
1966 the completed item. It is guaranteed that vim-lsp does not change the content
1967 of this variable during its |CompleteDone| autocommands.
1968
1969 lsp_float_opened                                          *lsp_float_opened*
1970
1971 This autocommand is run after the floating window is shown for preview.
1972 See also |preview-window|
1973
1974 lsp_float_closed                                          *lsp_float_closed*
1975
1976 This autocommand is run after the floating window is closed.
1977 See also |preview-window|
1978
1979 lsp_float_focused                                          *lsp_float_focused*
1980
1981 This autocommand is run after the floating window is focused. Only supported in
1982 neovim.
1983
1984 You can map `<Plug>(lsp-float-close)` to close the floating window.
1985
1986 lsp_register_server                                    *lsp_register_server*
1987
1988 This autocommand is run after the server is registered.
1989
1990 lsp_unregister_server                                *lsp_unregister_server*
1991
1992 This autocommand is run after the server is unregistered.
1993
1994 lsp_server_init                                            *lsp_server_init*
1995
1996 This autocommand is run after the server is initialized.
1997
1998 lsp_server_exit                                            *lsp_server_exit*
1999
2000 This autocommand is run after the server is exited.
2001
2002 lsp_buffer_enabled                                      *lsp_buffer_enabled*
2003
2004 This autocommand is run after vim-lsp is enabled for the buffer. This event is
2005 triggered immediately when the buffer is currently active. If the buffer is not
2006 current active, the event will be triggered when the buffer will be active.
2007
2008 lsp_diagnostics_updated                            *lsp_diagnostics_updated*
2009
2010 This autocommand us run after every time after new diagnostics received and
2011 processed by vim-lsp.
2012 >
2013   function! DoSomething
2014     echo lsp#get_buffer_diagnostics_counts()
2015   endfunction
2016
2017   augroup OnLSP
2018     autocmd!
2019     autocmd User lsp_diagnostics_updated call DoSomething()
2020   augroup END
2021 <
2022 lsp_progress_updated                                  *lsp_progress_updated*
2023
2024 This autocommand is run after every time after progress updated and
2025 processed by vim-lsp. Used for statusline plugins.
2026
2027 ==============================================================================
2028 Mappings                                                  *vim-lsp-mappings*
2029
2030 To map keys to the feature of vim-lsp, use <plug> mappings:
2031 >
2032   autocmd FileType python,go nmap gd <plug>(lsp-definition)
2033 <
2034 Available plug mappings are following:
2035
2036   nnoremap <plug>(lsp-call-hierarchy-incoming)
2037   nnoremap <plug>(lsp-call-hierarchy-outgoing)
2038   nnoremap <plug>(lsp-code-action)
2039   nnoremap <plug>(lsp-code-action-float)
2040   nnoremap <plug>(lsp-code-action-preview)
2041   nnoremap <plug>(lsp-code-lens)
2042   nnoremap <plug>(lsp-declaration)
2043   nnoremap <plug>(lsp-peek-declaration)
2044   nnoremap <plug>(lsp-definition)
2045   nnoremap <plug>(lsp-peek-definition)
2046   nnoremap <plug>(lsp-document-symbol)
2047   nnoremap <plug>(lsp-document-symbol-search)
2048   nnoremap <plug>(lsp-document-diagnostics)
2049   nnoremap <plug>(lsp-hover)
2050   nnoremap <plug>(lsp-hover-float)
2051   nnoremap <plug>(lsp-hover-preview)
2052   nnoremap <plug>(lsp-next-diagnostic)
2053   nnoremap <plug>(lsp-next-diagnostic-nowrap)
2054   nnoremap <plug>(lsp-next-error)
2055   nnoremap <plug>(lsp-next-error-nowrap)
2056   nnoremap <plug>(lsp-next-reference)
2057   nnoremap <plug>(lsp-next-warning)
2058   nnoremap <plug>(lsp-next-warning-nowrap)
2059   nnoremap <plug>(lsp-preview-close)
2060   nnoremap <plug>(lsp-preview-focus)
2061   nnoremap <plug>(lsp-previous-diagnostic)
2062   nnoremap <plug>(lsp-previous-diagnostic-nowrap)
2063   nnoremap <plug>(lsp-previous-error)
2064   nnoremap <plug>(lsp-previous-error-nowrap)
2065   nnoremap <plug>(lsp-previous-reference)
2066   nnoremap <plug>(lsp-previous-warning)
2067   nnoremap <plug>(lsp-previous-warning-nowrap)
2068   nnoremap <plug>(lsp-references)
2069   nnoremap <plug>(lsp-rename)
2070   nnoremap <plug>(lsp-workspace-symbol)
2071   nnoremap <plug>(lsp-workspace-symbol-search)
2072   nnoremap <plug>(lsp-document-format)
2073   vnoremap <plug>(lsp-document-format)
2074   nnoremap <plug>(lsp-document-range-format)
2075   xnoremap <plug>(lsp-document-range-format)
2076   nnoremap <plug>(lsp-implementation)
2077   nnoremap <plug>(lsp-peek-implementation)
2078   nnoremap <plug>(lsp-type-definition)
2079   nnoremap <plug>(lsp-peek-type-definition)
2080   nnoremap <plug>(lsp-type-hierarchy)
2081   nnoremap <plug>(lsp-status)
2082   nnoremap <plug>(lsp-signature-help)
2083
2084 See also |vim-lsp-commands|
2085
2086 <plug>(lsp-preview-close)                        *<plug>(lsp-preview-close)*
2087
2088 Closes an opened preview window
2089
2090 <plug>(lsp-preview-focus)                        *<plug>(lsp-preview-focus)*
2091
2092 Transfers focus to an opened preview window or back to the previous window if
2093 focus is already on the preview window.
2094
2095
2096 ==============================================================================
2097 Autocomplete                                          *vim-lsp-autocomplete*
2098
2099 omnifunc                                                  *vim-lsp-omnifunc*
2100
2101 vim-lsp by default only provides basic omnifunc support for autocomplete.
2102
2103 Completion can be made asynchronous by setting g:lsp_async_completion.
2104 Note that this may cause unexpected behavior in some plugins such as
2105 MUcomplete.
2106
2107 If you would like to have more advanced features please use asyncomplete.vim
2108 as described below.
2109
2110     Example: >
2111         autocmd FileType typescript setlocal omnifunc=lsp#complete
2112
2113 asyncomplete.vim                                      *vim-lsp-asyncomplete*
2114
2115 asyncomplete.vim is a async auto complete plugin for vim8 and neovim written
2116 in pure vim script. https://github.com/prabirshrestha/asyncomplete.vim
2117
2118 Example: >
2119     Plug 'prabirshrestha/vim-lsp'
2120     Plug 'prabirshrestha/asyncomplete.vim'
2121     Plug 'prabirshrestha/asyncomplete-lsp.vim'
2122
2123 For additional configuration refer to asyncomplete.vim docs.
2124
2125 ==============================================================================
2126 Tagfunc                                                    *vim-lsp-tagfunc*
2127
2128 vim-lsp can integrate with vim's native tag functionality for navigating code
2129 using the |'tagfunc'| option (requires vim/neovim with patch-8.1.1228).
2130
2131     Example: >
2132         autocmd FileType typescript setlocal tagfunc=lsp#tagfunc
2133
2134 ==============================================================================
2135 Snippets                                                  *vim-lsp-snippets*
2136
2137 To integrate snippets in vim-lsp, you will first have to install a third-party
2138 snippet plugin, and a plugin that integrates it in vim-lsp. At the moment,
2139 you have two options:
2140
2141 1. vim-vsnip
2142 https://github.com/hrsh7th/vim-vsnip
2143 https://github.com/hrsh7th/vim-vsnip-integ
2144
2145 2. UltiSnips and vim-lsp-ultisnips
2146 https://github.com/SirVer/ultisnips
2147 https://github.com/thomasfaingnaert/vim-lsp-ultisnips
2148
2149 3. neosnippet.vim and vim-lsp-neosnippet
2150 https://github.com/Shougo/neosnippet.vim
2151 https://github.com/thomasfaingnaert/vim-lsp-neosnippet
2152
2153 Refer to the readme and docs of vim-vsnip, vim-lsp-ultisnips and
2154 vim-lsp-neosnippet for more information and configuration options.
2155
2156 ==============================================================================
2157 Folding                                                    *vim-lsp-folding*
2158
2159 You can also let the language server handle folding for you. To enable this
2160 feature, you will have to set 'foldmethod', 'foldexpr' and 'foldtext' (the
2161 latter is optional) correctly:
2162 >
2163     set foldmethod=expr
2164       \ foldexpr=lsp#ui#vim#folding#foldexpr()
2165       \ foldtext=lsp#ui#vim#folding#foldtext()
2166
2167 Also, make sure you have not disabled folding globally, see
2168 |g:lsp_fold_enabled|.
2169
2170 You may want to enable this only for certain filetypes, e.g. for Javascript
2171 only:
2172 >
2173     augroup lsp_folding
2174         autocmd!
2175         autocmd FileType javascript setlocal
2176             \ foldmethod=expr
2177             \ foldexpr=lsp#ui#vim#folding#foldexpr()
2178             \ foldtext=lsp#ui#vim#folding#foldtext()
2179     augroup end
2180
2181 To display open and closed folds at the side of the window, see
2182 'foldcolumn'.
2183 If you want to remove the dashes at the end of the folds, you can change
2184 the fold item of 'fillchars'.
2185
2186 ==============================================================================
2187 Semantic highlighting                                      *vim-lsp-semantic*
2188
2189 To use semantic highlighting, you need Neovim highlights, or Vim with the
2190 |textprop| feature enabled at compile time.
2191
2192 To enable semantic highlighting, |g:lsp_semantic_enabled| should be set to `1`
2193 (it is `0` by default). You can check if semantic highlighting is enabled
2194 by running: >
2195     echo lsp#internal#semantic#is_enabled()
2196
2197 vim-lsp provides |highlight| groups for each of the token types supported by
2198 the current LSP server. This includes highlight groups for each of the
2199 standard set of token types:
2200 * `LspSemanticType`
2201 * `LspSemanticClass`
2202 * `LspSemanticEnum`
2203 * `LspSemanticInterface`
2204 * `LspSemanticStruct`
2205 * `LspSemanticTypeParameter`
2206 * `LspSemanticParameter`
2207 * `LspSemanticVariable`
2208 * `LspSemanticProperty`
2209 * `LspSemanticEnumMember`
2210 * `LspSemanticEvents`
2211 * `LspSemanticFunction`
2212 * `LspSemanticMethod`
2213 * `LspSemanticKeyword`
2214 * `LspSemanticModifier`
2215 * `LspSemanticComment`
2216 * `LspSemanticString`
2217 * `LspSemanticNumber`
2218 * `LspSemanticRegexp`
2219 * `LspSemanticOperator`
2220 as well as additional highlight groups for any further types supported by the
2221 server. For example, clangd provides `LspNamespace`.
2222
2223 The standard set of token types have sensible defaults provided, however
2224 any other types require manual configuration. The types provided by the
2225 current buffer's semantic tokens server can be found by running
2226 |:LspSemanticTokenTypes|.
2227
2228 LSP servers may also provide modifiers for each of the tokens. The standard
2229 set is:
2230 * `Declaration`
2231 * `Definition`
2232 * `Readonly`
2233 * `Static`
2234 * `Deprecated`
2235 * `Abstract`
2236 * `Async`
2237 * `Modification`
2238 * `Documentation`
2239 * `DefaultLibrary`
2240 Servers may also provide their own modifiers. The full set of types provided
2241 by the current buffer's semantic tokens server can be found by running
2242 |:LspSemanticTokenModifiers|.
2243
2244 If modifiers are applied to a token, the name of the |highlight| group will
2245 be prepended with each of the modifier names, for example a static default
2246 library function will use the highlight group
2247 `LspSemanticStaticDefaultLibraryFunction`. By default, any modified highlight
2248 groups are linked to their unmodified equivalent.
2249
2250 ==============================================================================
2251 Popup Formatting                                      *vim-lsp-popup-format*
2252
2253 Popup windows use the |gq| operator for formatting content to the window.
2254
2255 For customization, see
2256 |formatprg|.
2257
2258 ==============================================================================
2259 Workspace Folders                                  *vim-lsp-workspace-folders*
2260
2261 Workspace folders is an experimental feature of vim-lsp. To enable workspace
2262 folders set `let g:lsp_experimental_workspace_folders = 1`. In the future this
2263 flag will be removed and workspace folders will be enabled by default.
2264
2265 When a new buffer is opened, if the server supports workspace folder, it will
2266 call `root_uri` function to detect the workspace folder. If the folder is not
2267 part of workspace folder, it will automatically notify the server to add the
2268 workspace folder.
2269
2270 =============================================================================
2271 License                                                    *vim-lsp-license*
2272
2273 The MIT License (MIT)
2274
2275 Full license text: https://github.com/prabirshrestha/vim-lsp/blob/master/LICENSE
2276
2277 ==============================================================================
2278 Maintainers                                             *vim-lsp-maintainers*
2279
2280 * Prabir Shrestha (author, maintainer): https://github.com/prabirshrestha
2281 * mattn (maintainer): https://github.com/mattn
2282 * hrsh7th (maintainer): https://github.com/hrsh7th
2283 * Thomas Faingnaert (maintainer): https://github.com/thomasfaingnaert
2284 * rhysd (maintainer): https://github.com/rhysd
2285
2286 vim:tw=78:ts=8:ft=help:norl:noet:fen:noet: