浏览代码

auto push

Chris 5 年之前
父节点
当前提交
87a2859dfd
共有 8 个文件被更改,包括 14 次插入44 次删除
  1. 1 1
      README.md
  2. 1 3
      init.vim
  3. 2 0
      modules/airline.vim
  4. 3 31
      modules/coc.vim
  5. 2 3
      modules/general.vim
  6. 1 1
      modules/nerdtree.vim
  7. 1 1
      modules/plugins.vim
  8. 3 4
      modules/vim-which-key.vim

+ 1 - 1
README.md

@@ -60,7 +60,7 @@ let g:node_host_prog = expand("~/.nvm/versions/node/v12.16.1/bin/node")
 ## Set up plugin manager
 
 ```
-sh ~/.config/nvim/install/utils/installer.sh ~/.config/nvim/dein
+sh ~/.config/nvim/utils/installer.sh ~/.config/nvim/dein
 ```
 
 ## Install packages

+ 1 - 3
init.vim

@@ -3,9 +3,9 @@ source $HOME/.config/nvim/modules/pythonpath.vim
 source $HOME/.config/nvim/modules/nodepath.vim " Make sure to set version here
 source $HOME/.config/nvim/modules/plugins.vim
 source $HOME/.config/nvim/modules/theme.vim
+source $HOME/.config/nvim/modules/general.vim
 source $HOME/.config/nvim/modules/airline.vim
 source $HOME/.config/nvim/modules/startify.vim
-source $HOME/.config/nvim/modules/general.vim
 source $HOME/.config/nvim/modules/fzf.vim
 source $HOME/.config/nvim/modules/ranger.vim
 source $HOME/.config/nvim/modules/nerdtree.vim
@@ -23,8 +23,6 @@ source $HOME/.config/nvim/modules/polyglot.vim
 
 "source $HOME/.config/nvim/modules/gutentags_plus.vim " disabled until 141 error is fixed
 "source $HOME/.config/nvim/modules/ale.vim
-"source $HOME/.config/nvim/modules/pydocstring.vim
 "source $HOME/.config/nvim/modules/neosnippets.vim " I need to do my homework on snippets
 "source $HOME/.config/nvim/modules/vim_wiki.vim
-echo ">^.^<"
 

+ 2 - 0
modules/airline.vim

@@ -2,6 +2,8 @@
 let g:airline#extensions#tabline#enabled = 1
 " enable powerline fonts
 let g:airline_powerline_fonts = 1
+let g:airline_left_sep = ''
+let g:airline_right_sep = ''
 " Switch to your current theme
 let g:airline_theme = 'onedark'
 " Always show tabs 

+ 3 - 31
modules/coc.vim

@@ -73,13 +73,6 @@ endfunction
 " Highlight the symbol and its references when holding the cursor.
 autocmd CursorHold * silent call CocActionAsync('highlight')
 
-" Symbol renaming.
-nmap <leader>rn <Plug>(coc-rename)
-
-" Formatting selected code.
-xmap <leader>f  <Plug>(coc-format-selected)
-nmap <leader>f  <Plug>(coc-format-selected)
-
 augroup mygroup
   autocmd!
   " Setup formatexpr specified filetype(s).
@@ -88,29 +81,6 @@ augroup mygroup
   autocmd User CocJumpPlaceholder call CocActionAsync('showSignatureHelp')
 augroup end
 
-" Applying codeAction to the selected region.
-" Example: `<leader>aap` for current paragraph
-xmap <leader>a  <Plug>(coc-codeaction-selected)
-nmap <leader>a  <Plug>(coc-codeaction-selected)
-
-" Remap keys for applying codeAction to the current line.
-nmap <leader>ac  <Plug>(coc-codeaction)
-" Apply AutoFix to problem on the current line.
-nmap <leader>qf  <Plug>(coc-fix-current)
-
-" Introduce function text object
-" NOTE: Requires 'textDocument.documentSymbol' support from the language server.
-xmap if <Plug>(coc-funcobj-i)
-xmap af <Plug>(coc-funcobj-a)
-omap if <Plug>(coc-funcobj-i)
-omap af <Plug>(coc-funcobj-a)
-
-" Use <TAB> for selections ranges.
-" NOTE: Requires 'textDocument/selectionRange' support from the language server.
-" coc-tsserver, coc-python are the examples of servers that support it.
-"nmap <silent> <TAB> <Plug>(coc-range-select)
-"xmap <silent> <TAB> <Plug>(coc-range-select)
-
 " Add `:Format` command to format current buffer.
 command! -nargs=0 Format :call CocAction('format')
 
@@ -129,7 +99,7 @@ set statusline^=%{coc#status()}%{get(b:,'coc_current_function','')}
 " Show all diagnostics.
 nnoremap <silent> <space>a  :<C-u>CocList diagnostics<cr>
 " Manage extensions.
-nnoremap <silent> <space>e  :<C-u>CocList extensions<cr>
+nnoremap <silent> <space>x  :<C-u>CocList extensions<cr>
 " Show commands.
 nnoremap <silent> <space>c  :<C-u>CocList commands<cr>
 " Find symbol of current document.
@@ -142,3 +112,5 @@ nnoremap <silent> <space>j  :<C-u>CocNext<CR>
 nnoremap <silent> <space>k  :<C-u>CocPrev<CR>
 " Resume latest coc list.
 nnoremap <silent> <space>p  :<C-u>CocListResume<CR>
+
+nmap <silent> <C-_> <Plug>(pydocstring)

+ 2 - 3
modules/general.vim

@@ -9,7 +9,7 @@ let g:mapleader = "\<Space>"
 let g:maplocalleader = ','
 
 syntax enable                           " Enables syntax highlighing
-set hidden                              " Required for specific actions that require multiple buffers
+"set hidden                              " Required for specific actions that require multiple buffers
 set nowrap                              " display long lines as just one line
 set encoding=utf-8                      " The encoding displayed 
 set pumheight=10                        " Makes popup menu smaller
@@ -21,7 +21,7 @@ set mouse=a                             " Enable your mouse
 set splitbelow                          " Horizontal splits will automatically be below
 set splitright                          " Vertical splits will automatically be to the right
 set t_Co=256                            " Support 256 colors
-set autochdir                           " Your working directory will always be the same as your working directory
+"set autochdir                           " Your working directory will always be the same as your working directory
 set conceallevel=0                      " So that I can see `` in markdown files
 set tabstop=2                           " Insert 2 spaces for a tab
 set shiftwidth=2                        " Change the number of space characters inserted for indentation
@@ -114,5 +114,4 @@ set clipboard=unnamedplus
 vnoremap < <gv
 vnoremap > >gv
 
-set conceallevel=0
 cmap w!! w !sudo tee %

+ 1 - 1
modules/nerdtree.vim

@@ -1,5 +1,5 @@
 let NERDTreeShowHidden = 1              " show hidden files
-
+let g:NERDCreateDefaultMappings = 0
 " automatically close when you open a file"
 "let NERDTreeQuitOnOpen = 1
 

+ 1 - 1
modules/plugins.vim

@@ -83,7 +83,7 @@ if dein#load_state('~/.config/nvim/dein')
   "Colorizer "
   call dein#add('norcalli/nvim-colorizer.lua')
   " Python docstring "
-  call dein#add('heavenshell/vim-pydocstring')
+  "call dein#add('heavenshell/vim-pydocstring')
   
   if !has('nvim')
     call dein#add('roxma/nvim-yarp')

+ 3 - 4
modules/vim-which-key.vim

@@ -60,17 +60,16 @@ let g:which_key_map.t = {
 
 let g:which_key_map.l = {
       \ 'name' : '+lsp' ,
-      \ 'c' : ['LanguageClient_contextMenu()'                 , 'context_menu']     ,
-      \ 'f' : ['ALEFix'                                       , 'formatting']       ,
+      \ 'a' : ['<Plug>(coc-codeaction-selected)'              , 'rename symbol']     ,
+      \ 'r' : ['<Plug>(coc-rename)'                           , 'rename symbol']     ,
+      \ 'f' : ['<Plug>(coc-fix-current)'                      , 'fix']       ,
       \ 'i' : ['ALEInfo'                                      , 'info']             ,
       \ 'h' : ['<Plug>(ale_hover)'                            , 'hover']            ,
-      \ 'r' : ['LanguageClient#textDocument_references()'     , 'references']       ,
       \ 'R' : ['LanguageClient#textDocument_rename()'         , 'rename']           ,
       \ 's' : ['LanguageClient#textDocument_documentSymbol()' , 'document-symbol']  ,
       \ 'S' : ['LanguageClient#workspace_symbol()'            , 'workspace-symbol'] ,
       \ 'g' : {
       \ 'name': '+goto',
-      \ 'd' : ['LanguageClient#textDocument_definition()'     , 'definition']       ,
       \ 't' : ['LanguageClient#textDocument_typeDefinition()' , 'type-definition']  ,
       \ 'i' : ['LanguageClient#textDocument_implementation()'  , 'implementation']  ,
       \ },