2019-02-22 15:50:11 +00:00
|
|
|
" plugins: airline
|
|
|
|
let g:bufferline_echo = 0
|
|
|
|
let g:airline_powerline_fonts = 1
|
|
|
|
let g:airline#extensions#tabline#enabled = 1
|
|
|
|
|
|
|
|
" plugins: rust
|
|
|
|
let g:rustfmt_autosave = 1
|
|
|
|
|
|
|
|
" searching
|
|
|
|
let $FZF_DEFAULT_COMMAND = 'rg --files --no-messages "" .'
|
|
|
|
set grepprg=rg\ --vimgrep
|
|
|
|
let g:fzf_command_prefix = 'Fzf'
|
|
|
|
command! -bang -nargs=* Find call fzf#vim#grep('rg --column --line-number --no-heading --fixed-strings --ignore-case --no-ignore --hidden --follow --glob "!.git/*" --color "always" '.shellescape(<q-args>), 1, <bang>0)
|
2019-02-22 16:08:40 +00:00
|
|
|
let g:ctrlp_show_hidden = 1
|
2019-02-22 15:50:11 +00:00
|
|
|
|
2019-02-23 09:15:44 +00:00
|
|
|
" code smarts - completion, navigation
|
|
|
|
let g:asyncomplete_remove_duplicates = 1
|
|
|
|
let g:asyncomplete_smart_completion = 1
|
|
|
|
let g:asyncomplete_auto_popup = 1
|
|
|
|
|
|
|
|
au User lsp_setup call lsp#register_server({
|
|
|
|
\ 'name': 'rls',
|
|
|
|
\ 'cmd': {server_info->['rustup', 'run', 'stable', 'rls']},
|
|
|
|
\ 'whitelist': ['rust'],
|
|
|
|
\ })
|
2019-02-22 16:08:40 +00:00
|
|
|
|
2019-02-25 15:36:14 +00:00
|
|
|
if executable('typescript-language-server')
|
|
|
|
au User lsp_setup call lsp#register_server({
|
|
|
|
\ 'name': 'javascript support using typescript-language-server',
|
|
|
|
\ 'cmd': { server_info->[&shell, &shellcmdflag, 'typescript-language-server --stdio']},
|
|
|
|
\ 'root_uri': { server_info->lsp#utils#path_to_uri(lsp#utils#find_nearest_parent_directory(lsp#utils#get_buffer_path(), '.git/..'))},
|
|
|
|
\ 'whitelist': ['javascript', 'javascript.jsx', 'typescript', 'typescript.tsx'],
|
|
|
|
\ })
|
|
|
|
endif
|
|
|
|
|
2019-03-31 13:36:20 +01:00
|
|
|
if executable('gopls')
|
|
|
|
au User lsp_setup call lsp#register_server({
|
|
|
|
\ 'name': 'gopls',
|
|
|
|
\ 'cmd': {server_info->['gopls', '-mode', 'stdio']},
|
|
|
|
\ 'whitelist': ['go'],
|
|
|
|
\ })
|
|
|
|
endif
|
|
|
|
|
2019-03-01 10:13:37 +00:00
|
|
|
if executable('go-langserver')
|
|
|
|
au User lsp_setup call lsp#register_server({
|
|
|
|
\ 'name': 'go-langserver',
|
|
|
|
\ 'cmd': {server_info->['go-langserver', '-gocodecompletion']},
|
|
|
|
\ 'whitelist': ['go'],
|
|
|
|
\ })
|
|
|
|
endif
|
|
|
|
|
2019-02-24 12:20:00 +00:00
|
|
|
let g:lsp_signs_enabled = 1
|
|
|
|
let g:lsp_diagnostics_echo_cursor = 1
|
|
|
|
|
2019-02-22 16:08:40 +00:00
|
|
|
" nerdtree startup
|
|
|
|
autocmd StdinReadPre * let s:std_in=1
|
|
|
|
autocmd VimEnter * if argc() == 1 && isdirectory(argv()[0]) && !exists("s:std_in") | exe 'NERDTree' argv()[0] | wincmd p | ene | endif
|
2019-02-23 09:15:44 +00:00
|
|
|
|