add lsp_signature_help_delay to allow users to configure and default to 200 (#1106)

This commit is contained in:
Prabir Shrestha
2021-03-15 22:47:30 -07:00
committed by GitHub
parent 5fc5e26f5f
commit 24533c28ae
3 changed files with 13 additions and 1 deletions

View File

@@ -115,7 +115,7 @@ endfunction
function! s:on_cursor_moved() abort function! s:on_cursor_moved() abort
let l:bufnr = bufnr('%') let l:bufnr = bufnr('%')
call timer_stop(s:debounce_timer_id) call timer_stop(s:debounce_timer_id)
let s:debounce_timer_id = timer_start(500, function('s:on_text_changed_after', [l:bufnr]), { 'repeat': 1 }) let s:debounce_timer_id = timer_start(g:lsp_signature_help_delay, function('s:on_text_changed_after', [l:bufnr]), { 'repeat': 1 })
endfunction endfunction
function! s:on_text_changed_after(bufnr, timer) abort function! s:on_text_changed_after(bufnr, timer) abort

View File

@@ -802,6 +802,17 @@ g:lsp_signature_help_enabled *g:lsp_signature_help_enabled*
let g:lsp_signature_help_enabled = 1 let g:lsp_signature_help_enabled = 1
let g:lsp_signature_help_enabled = 0 let g:lsp_signature_help_enabled = 0
g:lsp_signature_help_delay *g:lsp_signature_help_delay*
Type: |Number|
Default: `200`
The waiting time in milliseconds before sending textDocument/signatureHelp
to LSP servers.
Example: >
let g:lsp_signature_help_delay = 100
let g:lsp_signature_help_delay = 500
g:lsp_show_workspace_edits *g:lsp_show_workspace_edits* g:lsp_show_workspace_edits *g:lsp_show_workspace_edits*
Type: |Boolean| Type: |Boolean|
Default: `0` Default: `0`

View File

@@ -54,6 +54,7 @@ let g:lsp_peek_alignment = get(g:, 'lsp_peek_alignment', 'center')
let g:lsp_preview_max_width = get(g:, 'lsp_preview_max_width', -1) let g:lsp_preview_max_width = get(g:, 'lsp_preview_max_width', -1)
let g:lsp_preview_max_height = get(g:, 'lsp_preview_max_height', -1) let g:lsp_preview_max_height = get(g:, 'lsp_preview_max_height', -1)
let g:lsp_signature_help_enabled = get(g:, 'lsp_signature_help_enabled', 1) let g:lsp_signature_help_enabled = get(g:, 'lsp_signature_help_enabled', 1)
let g:lsp_signature_help_delay = get(g:, 'lsp_signature_help_delay', 200)
let g:lsp_show_workspace_edits = get(g:, 'lsp_show_workspace_edits', 0) let g:lsp_show_workspace_edits = get(g:, 'lsp_show_workspace_edits', 0)
let g:lsp_fold_enabled = get(g:, 'lsp_fold_enabled', 1) let g:lsp_fold_enabled = get(g:, 'lsp_fold_enabled', 1)
let g:lsp_hover_conceal = get(g:, 'lsp_hover_conceal', 1) let g:lsp_hover_conceal = get(g:, 'lsp_hover_conceal', 1)