mirror of
https://github.com/amix/vimrc
synced 2025-07-04 06:44:59 +08:00
google commit
This commit is contained in:
@ -267,7 +267,7 @@ au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g
|
||||
set laststatus=2
|
||||
|
||||
" Format the status line
|
||||
set statusline=\ %{HasPaste()}%F%m%r%h\ %w\ \ CWD:\ %r%{getcwd()}%h\ \ \ Line:\ %l\ \ Column:\ %c
|
||||
set statusline=\ %{HasPaste()}%F%m%r%h\ %w\ %p\ \ CWD:\ %r%{getcwd()}%h\ \ \ Line:\ %l\ Total:\ %L\ \ Column:\ %c
|
||||
|
||||
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
|
49
vimrcs/google.vim
Normal file
49
vimrcs/google.vim
Normal file
@ -0,0 +1,49 @@
|
||||
source /usr/share/vim/google/google.vim
|
||||
|
||||
|
||||
" Piper plugin mappings
|
||||
Glug piper plugin[mappings]
|
||||
|
||||
" g4 plugin
|
||||
Glug g4
|
||||
|
||||
Glug youcompleteme-google
|
||||
let g:ycm_always_populate_location_list = 1
|
||||
|
||||
" BlazeDeps
|
||||
" Use :BlazeDepsUpdate to update the BUILD file dependency
|
||||
Glug blazedeps
|
||||
|
||||
au User lsp_setup call lsp#register_server({
|
||||
\ 'name': 'CiderLSP',
|
||||
\ 'cmd': {server_info->[
|
||||
\ '/google/bin/releases/editor-devtools/ciderlsp',
|
||||
\ '--tooltag=vim-lsp',
|
||||
\ '--noforward_sync_responses',
|
||||
\ ]},
|
||||
\ 'whitelist': ['c', 'cpp', 'proto', 'textproto', 'go'],
|
||||
\})
|
||||
let g:asyncomplete_auto_popup = 0
|
||||
|
||||
|
||||
" Clang include fixer
|
||||
" Normal mode.
|
||||
function HeaderFix()
|
||||
let g:clang_include_fixer_query_mode=0
|
||||
pyf /usr/lib/clang-include-fixer/clang-include-fixer.py
|
||||
endfunction
|
||||
function HeaderQuery()
|
||||
let g:clang_include_fixer_query_mode=1
|
||||
pyf /usr/lib/clang-include-fixer/clang-include-fixer.py
|
||||
endfunction
|
||||
command Headerfix call HeaderFix()
|
||||
command Headerquery call HeaderQuery()
|
||||
|
||||
|
||||
let localleader=,
|
||||
nnoremap <localleader>hf :Headerfix<CR>
|
||||
nnoremap <localleader>hq :Headerquery<CR>
|
||||
|
||||
" Show diff of the current file in a new pane.
|
||||
nnoremap <localleader>d :SignifyDiff!<CR>
|
||||
|
@ -121,7 +121,7 @@ let g:lightline = {
|
||||
\ 'colorscheme': 'wombat',
|
||||
\ 'active': {
|
||||
\ 'left': [ ['mode', 'paste'],
|
||||
\ ['fugitive', 'readonly', 'filename', 'modified'] ],
|
||||
\ ['fugitive', 'readonly', 'absolutepath', 'filename', 'modified'] ],
|
||||
\ 'right': [ [ 'lineinfo' ], ['percent'] ]
|
||||
\ },
|
||||
\ 'component': {
|
||||
@ -177,3 +177,34 @@ let g:ale_lint_on_enter = 0
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
let g:gitgutter_enabled=0
|
||||
nnoremap <silent> <leader>d :GitGutterToggle<cr>
|
||||
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" => Template
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
let g:tmpl_author_email = 'xyharry@google.com'
|
||||
let g:tmpl_author_name = 'Xinyue Ou'
|
||||
let g:templates_use_licensee = 0
|
||||
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" => Vim-lsp + Async
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" vim-lsp
|
||||
nnoremap gd :LspDefinition<CR> " gd in Normal mode triggers gotodefinition
|
||||
nnoremap gr :LspReferences<CR> " gr in Normal mode shows all references
|
||||
|
||||
" Send async completion requests.
|
||||
" WARNING: Might interfere with other completion plugins.
|
||||
let g:lsp_async_completion = 1
|
||||
|
||||
" Enable UI for diagnostics
|
||||
let g:lsp_signs_enabled = 1 " enable diagnostics signs in the gutter
|
||||
let g:lsp_diagnostics_echo_cursor = 1 " enable echo under cursor when in normal mode
|
||||
|
||||
" Enabling fuzzy completion
|
||||
let g:asyncomplete_smart_completion = 1
|
||||
let g:asyncomplete_auto_popup = 1
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" => SuperTab
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" Start selection from the beginning of the list.
|
||||
let g:SuperTabDefaultCompletionType = "<c-n>"
|
||||
|
Reference in New Issue
Block a user