diff options
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | init.vim | 4 | ||||
-rw-r--r-- | modules/airline.vim | 2 | ||||
-rw-r--r-- | modules/coc.vim | 34 | ||||
-rw-r--r-- | modules/general.vim | 5 | ||||
-rw-r--r-- | modules/nerdtree.vim | 2 | ||||
-rw-r--r-- | modules/plugins.vim | 2 | ||||
-rw-r--r-- | modules/vim-which-key.vim | 7 |
8 files changed, 14 insertions, 44 deletions
@@ -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 @@ -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 ">^.^<" diff --git a/modules/airline.vim b/modules/airline.vim index 9f376f76..84e866c5 100644 --- a/modules/airline.vim +++ b/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 diff --git a/modules/coc.vim b/modules/coc.vim index 12f553ac..54451731 100644 --- a/modules/coc.vim +++ b/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) diff --git a/modules/general.vim b/modules/general.vim index b7764572..178e19f3 100644 --- a/modules/general.vim +++ b/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 % diff --git a/modules/nerdtree.vim b/modules/nerdtree.vim index 973ac264..54f4a655 100644 --- a/modules/nerdtree.vim +++ b/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 diff --git a/modules/plugins.vim b/modules/plugins.vim index fbcc7738..1f87012f 100644 --- a/modules/plugins.vim +++ b/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') diff --git a/modules/vim-which-key.vim b/modules/vim-which-key.vim index 2a76c339..1341f596 100644 --- a/modules/vim-which-key.vim +++ b/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'] , \ }, |