Browse Source

增强了Python、Golang、Elixir的代码提示和代码自动补全能力

master
Kevin 3 months ago
parent
commit
e9680d7751
5 changed files with 61 additions and 0 deletions
  1. +3
    -0
      configs/filetypes.vim
  2. +6
    -0
      configs/mapkeys.vim
  3. +33
    -0
      configs/plugins.vim
  4. +12
    -0
      del_plugin.sh
  5. +7
    -0
      update.sh

+ 3
- 0
configs/filetypes.vim View File

@ -2,6 +2,9 @@ autocmd BufNewFile,BufRead *.go set st=4 ts=4
autocmd FileType ruby compiler ruby
let g:completor_filetype_map = {}
let g:completor_filetype_map.go = {'ft': 'lsp', 'cmd': 'gopls'}
""""""""""""""""""""""""""""""
" => Python section
""""""""""""""""""""""""""""""


+ 6
- 0
configs/mapkeys.vim View File

@ -56,3 +56,9 @@ endif
autocmd FileType ruby map <buffer> <CR> <C-R>=RubyEndToken()<CR>
autocmd FileType go map <C-n> :cnext<CR>
autocmd FileType go map <C-m> :cprevious<CR>
autocmd FileType go nmap <leader>a :cclose<CR>
autocmd FileType go nmap <leader>b <Plug>(go-build)
autocmd FileType go nmap <leader>r <Plug>(go-run)

+ 33
- 0
configs/plugins.vim View File

@ -4,6 +4,39 @@ autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif
autocmd VimEnter * if argc() == 1 && isdirectory(argv()[0]) && !exists("s:std_in") | exe 'NERDTree' argv()[0] | wincmd p | ene | exe 'cd '.argv()[0] | endif
autocmd BufEnter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
let g:mix_format_on_save = 1
let g:mix_format_silent_errors = 1
" ==> vim-go
let g:go_def_mode='gopls'
let g:go_info_mode='gopls'
let g:go_fmt_command = "goimports"
let g:go_metalinter_autosave = 1
let g:go_auto_type_info = 1
" ==> Python Mode
let g:pymode = 1
let g:pymode_warnings = 1
let g:pymode_virtualenv = 1
let g:pymode_trim_whitespaces = 1
let g:pymode_options = 1
let g:pymode_indent = 1
let g:pymode_doc = 1
let g:pymode_run = 1
let g:pymode_breakpoint = 1
let g:pymode_run_bind = '<leader>r'
let g:pymode_breakpoint_bind = '<leader>b'
let g:pymode_lint = 1
let g:pymode_lint_on_write = 1
let g:pymode_lint_on_fly = 0
let g:pymode_lint_message = 1
let g:pymode_rope_autoimport = 1
let g:pymode_rope_goto_definition_bind = '<C-c>g'
let g:pymode_rope_rename_bind = '<C-c>rr'
let g:pymode_rope_organize_imports_bind = '<C-c>ro'
let g:pymode_rope_use_function_bind = '<C-c>ru'
" ==> Airline
let g:airline_theme = 'wombat'
let g:airline#extensions#tabline#enabled = 1


+ 12
- 0
del_plugin.sh View File

@ -2,9 +2,21 @@
bundle="$1"
if [ -z $bundle ]; then
echo "please input module path which you would delete"
exit 1
fi
if [[ ! -d $bundle ]]; then
echo "please input right module path"
exit 1
fi
git submodule deinit -f "$bundle"
git rm -rf "$bundle"
rm -rf .git/modules/$bundle
git status

+ 7
- 0
update.sh View File

@ -5,3 +5,10 @@ git submodule sync --recursive
git fetch --all --recurse-submodules
python3 -m pip install --upgrade jedi rope pylint autopep8
if which go; then
go get -u golang.org/x/tools/...
go get -u golang.org/x/tools/gopls
fi

Loading…
Cancel
Save