Skip to content
Browse files

Adding mappings for language client vim.

  • Loading branch information...
kieran-bamforth committed Jan 29, 2019
1 parent 7e55b27 commit 190b1b859f564271e4cfd62cd08fb6c8af137c93
Showing with 9 additions and 1 deletion.
  1. +9 −1 .vimrc
10 .vimrc
@@ -283,6 +283,14 @@ function! s:open_branch_fzf(line)
execute 'Git checkout ' . l:branch

function! LanguageClientMaps()
if has_key(g:LanguageClient_serverCommands, &filetype)
nnoremap <buffer> <silent> K :call LanguageClient#textDocument_hover()<cr>
nnoremap <buffer> <silent> gd :call LanguageClient#textDocument_definition()<CR>
nnoremap <buffer> <silent> <F2> :call LanguageClient#textDocument_rename()<CR>

command! -nargs=0 Gmypullrequests execute '!open'
" }}}
" Commands. {{{
@@ -304,7 +312,6 @@ augroup vimrc

" File types.

autocmd BufNewFile,BufRead *.conf setfiletype nginx
autocmd BufNewFile,BufRead *.hbs setfiletype html
autocmd BufNewFile,BufRead *.json.dist setfiletype json
@@ -322,6 +329,7 @@ augroup vimrc
autocmd BufNewFile,BufRead Jenkinsfile.* setfiletype groovy
autocmd BufNewFile,BufRead config setfiletype dosini
autocmd BufNewFile,BufRead hub setfiletype yaml
autocmd FileType * call LanguageClientMaps()

" Highlight whitespace.
autocmd InsertEnter * match ErrorMsg /\s\+\%#\@<!$/

0 comments on commit 190b1b8

Please sign in to comment.
You can’t perform that action at this time.