From bfa93528251ceb21cd18bebf0fa6cef84184e653 Mon Sep 17 00:00:00 2001 From: Yasuhiro Matsumoto Date: Thu, 13 Feb 2020 02:19:41 +0900 Subject: Prefer 'Document' contains --- settings/clangd.vim | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'settings') 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 switch_source_header() - nnoremap (lsp-switch-source-header) :call switch_source_header() + command! LspDocumentSwitchSourceHeader call document_switch_source_header() + nnoremap (lsp-switch-source-header) :call document_switch_source_header() endfunction augroup lsp_install_clangd -- cgit v1.2.3-54-g00ecf