diff options
author | Yasuhiro Matsumoto <mattn.jp@gmail.com> | 2020-02-13 02:19:41 +0900 |
---|---|---|
committer | Yasuhiro Matsumoto <mattn.jp@gmail.com> | 2020-02-13 02:19:41 +0900 |
commit | bfa93528251ceb21cd18bebf0fa6cef84184e653 (patch) | |
tree | 256f4361036e0e31408d1cf11bb16cceda13f22e /settings | |
parent | 9d8dcb25d85fa75b4944d76ea61d5fff42760cb5 (diff) | |
download | vim-lsp-settings-bfa93528251ceb21cd18bebf0fa6cef84184e653.tar.gz vim-lsp-settings-bfa93528251ceb21cd18bebf0fa6cef84184e653.tar.bz2 vim-lsp-settings-bfa93528251ceb21cd18bebf0fa6cef84184e653.zip |
Prefer 'Document' contains
Diffstat (limited to 'settings')
-rw-r--r-- | settings/clangd.vim | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/settings/clangd.vim b/settings/clangd.vim index 3b8674a..4a48686 100644 --- a/settings/clangd.vim +++ b/settings/clangd.vim @@ -12,7 +12,7 @@ augroup vimlsp_settings_clangd \ } augroup END -function! s:handle_switch_source_header(ctx, server, type, has_extension, data) abort "ctx = {counter, list, last_command_id} +function! s:handle_document_switch_source_header(ctx, server, type, has_extension, data) abort "ctx = {counter, list, last_command_id} if a:ctx['last_command_id'] != lsp#_last_command() return endif @@ -45,7 +45,7 @@ function! s:handle_switch_source_header(ctx, server, type, has_extension, data) endif endfunction -function! s:switch_source_header() abort +function! s:document_switch_source_header() abort let l:servers = lsp#get_whitelisted_servers() let l:has_extension = 0 @@ -74,7 +74,7 @@ function! s:switch_source_header() abort \ 'params': { \ 'uri': lsp#utils#get_buffer_uri(), \ }, - \ 'on_notification': function('s:handle_switch_source_header', [l:ctx, l:server, 'header/source', l:has_extension]), + \ 'on_notification': function('s:handle_document_switch_source_header', [l:ctx, l:server, 'header/source', l:has_extension]), \ }) endfor @@ -82,8 +82,8 @@ function! s:switch_source_header() abort endfunction function! s:on_lsp_buffer_enabled() abort - command! LspSwitchSourceHeader call <SID>switch_source_header() - nnoremap <plug>(lsp-switch-source-header) :<c-u>call <SID>switch_source_header()<cr> + command! LspDocumentSwitchSourceHeader call <SID>document_switch_source_header() + nnoremap <plug>(lsp-switch-source-header) :<c-u>call <SID>document_switch_source_header()<cr> endfunction augroup lsp_install_clangd |