Chris 5 سال پیش
والد
کامیت
b98a4a0f6d
8فایلهای تغییر یافته به همراه46 افزوده شده و 28 حذف شده
  1. 5 0
      README.md
  2. 9 1
      coc-settings.json
  3. 1 1
      general/settings.vim
  4. 1 0
      init.vim
  5. 23 22
      plug-config/coc.vim
  6. 4 0
      plug-config/rnvimr.vim
  7. 0 2
      themes/lightline.vim
  8. 3 2
      vim-plug/plugins.vim

+ 5 - 0
README.md

@@ -61,3 +61,8 @@ let g:python3_host_prog = expand("~/.miniconda/envs/neovim/bin/python3.8") " <-
 let g:node_host_prog = expand("<path to node with neovim installed>")
 let g:node_host_prog = expand("~/.nvm/versions/node/v12.16.1/bin/node") " <- example 
 ```
+
+## List of programs you should install
+
+- ranger
+- ueberzug

+ 9 - 1
coc-settings.json

@@ -9,6 +9,14 @@
   [
     "UltiSnips",
     "~/.config/nvim/utils/snips"
-  ]
+  ],
 
+  // explorer
+  "explorer.width": 30,
+  "explorer.icon.enableNerdfont": true,
+  "explorer.previewAction.onHover": false,
+  "explorer.keyMappings": {
+    "<cr>": ["expandable?", "expand", "open"],
+    "v": "open:vsplit"
+  }
 }

+ 1 - 1
general/settings.vim

@@ -1,5 +1,5 @@
 " set leader key
-let g:mapleader = "\<Space>"
+map <Space> <Leader>
 
 syntax enable                           " Enables syntax highlighing
 set hidden                              " Required to keep multiple buffers open multiple buffers

+ 1 - 0
init.vim

@@ -6,3 +6,4 @@ source $HOME/.config/nvim/themes/syntax.vim
 source $HOME/.config/nvim/themes/onedark.vim
 source $HOME/.config/nvim/themes/airline.vim
 source $HOME/.config/nvim/plug-config/coc.vim
+source $HOME/.config/nvim/plug-config/rnvimr.vim

+ 23 - 22
plug-config/coc.vim

@@ -1,27 +1,5 @@
-" TextEdit might fail if hidden is not set.
-set hidden
-
-" Some servers have issues with backup files, see #649.
-set nobackup
-set nowritebackup
-
-" Give more space for displaying messages.
-set cmdheight=2
-
-" Having longer updatetime (default is 4000 ms = 4 s) leads to noticeable
-" delays and poor user experience.
-set updatetime=300
-
-" Don't pass messages to |ins-completion-menu|.
-set shortmess+=c
-
-" Always show the signcolumn, otherwise it would shift the text each time
-" diagnostics appear/become resolved.
-set signcolumn=yes
 
 " Use tab for trigger completion with characters ahead and navigate.
-" NOTE: Use command ':verbose imap <tab>' to make sure tab is not mapped by
-" other plugin before putting this into your config.
 inoremap <silent><expr> <TAB>
       \ pumvisible() ? "\<C-n>" :
       \ <SID>check_back_space() ? "\<TAB>" :
@@ -137,3 +115,26 @@ 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>
+
+" Explorer
+let g:coc_explorer_global_presets = {
+\   'floating': {
+\      'position': 'floating',
+\   },
+\   'floatingLeftside': {
+\      'position': 'floating',
+\      'floating-position': 'left-center',
+\      'floating-width': 50,
+\   },
+\   'floatingRightside': {
+\      'position': 'floating',
+\      'floating-position': 'left-center',
+\      'floating-width': 50,
+\   },
+\   'simplify': {
+\     'file.child.template': '[selection | clip | 1] [indent][icon | 1] [filename omitCenter 1]'
+\   }
+\ }
+nmap <space>e :CocCommand explorer<CR>
+nmap <space>f :CocCommand explorer --preset floating<CR>
+autocmd BufEnter * if (winnr("$") == 1 && &filetype == 'coc-explorer') | q | endif

+ 4 - 0
plug-config/rnvimr.vim

@@ -0,0 +1,4 @@
+" Make Ranger replace netrw and be the file explorer
+let g:rnvimr_ex_enable = 1
+
+nmap <space>r :RnvimrToggle<CR>

+ 0 - 2
themes/lightline.vim

@@ -1,2 +0,0 @@
-let g:lightline = { 'colorscheme': 'material_vim' }
-

+ 3 - 2
vim-plug/plugins.vim

@@ -10,8 +10,6 @@ call plug#begin('~/.config/nvim/autoload/plugged')
 
     " Better Syntax Support
     Plug 'sheerun/vim-polyglot'
-    " File Explorer
-    Plug 'scrooloose/NERDTree'
     " Auto pairs for '(' '[' '{' 
     Plug 'jiangmiao/auto-pairs'
     " Themes
@@ -22,6 +20,9 @@ call plug#begin('~/.config/nvim/autoload/plugged')
     " Status Line
     Plug 'vim-airline/vim-airline'
     Plug 'vim-airline/vim-airline-themes'
+    " Ranger
+    Plug 'kevinhwang91/rnvimr', {'do': 'make sync'}
+
 
 
 call plug#end()