From b98a4a0f6dbf0e4c1340653708dec2b91953e4e0 Mon Sep 17 00:00:00 2001 From: Chris Date: Sun, 26 Apr 2020 14:17:15 -0400 Subject: auto push --- README.md | 5 +++++ coc-settings.json | 10 +++++++++- general/settings.vim | 2 +- init.vim | 1 + plug-config/coc.vim | 45 +++++++++++++++++++++++---------------------- plug-config/rnvimr.vim | 4 ++++ themes/lightline.vim | 2 -- vim-plug/plugins.vim | 5 +++-- 8 files changed, 46 insertions(+), 28 deletions(-) create mode 100644 plug-config/rnvimr.vim delete mode 100644 themes/lightline.vim diff --git a/README.md b/README.md index 151e1140..a17baac0 100644 --- a/README.md +++ b/README.md @@ -61,3 +61,8 @@ let g:python3_host_prog = expand("~/.miniconda/envs/neovim/bin/python3.8") " <- let g:node_host_prog = expand("") let g:node_host_prog = expand("~/.nvm/versions/node/v12.16.1/bin/node") " <- example ``` + +## List of programs you should install + +- ranger +- ueberzug diff --git a/coc-settings.json b/coc-settings.json index f7b2799c..8599d4ca 100644 --- a/coc-settings.json +++ b/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": { + "": ["expandable?", "expand", "open"], + "v": "open:vsplit" + } } diff --git a/general/settings.vim b/general/settings.vim index 3ca089d6..3d11d259 100644 --- a/general/settings.vim +++ b/general/settings.vim @@ -1,5 +1,5 @@ " set leader key -let g:mapleader = "\" +map syntax enable " Enables syntax highlighing set hidden " Required to keep multiple buffers open multiple buffers diff --git a/init.vim b/init.vim index 224ec43d..a225c892 100644 --- a/init.vim +++ b/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 diff --git a/plug-config/coc.vim b/plug-config/coc.vim index d9818de4..74999202 100644 --- a/plug-config/coc.vim +++ b/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 ' to make sure tab is not mapped by -" other plugin before putting this into your config. inoremap \ pumvisible() ? "\" : \ check_back_space() ? "\" : @@ -137,3 +115,26 @@ nnoremap j :CocNext nnoremap k :CocPrev " Resume latest coc list. nnoremap p :CocListResume + +" 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 e :CocCommand explorer +nmap f :CocCommand explorer --preset floating +autocmd BufEnter * if (winnr("$") == 1 && &filetype == 'coc-explorer') | q | endif diff --git a/plug-config/rnvimr.vim b/plug-config/rnvimr.vim new file mode 100644 index 00000000..b5912b05 --- /dev/null +++ b/plug-config/rnvimr.vim @@ -0,0 +1,4 @@ +" Make Ranger replace netrw and be the file explorer +let g:rnvimr_ex_enable = 1 + +nmap r :RnvimrToggle diff --git a/themes/lightline.vim b/themes/lightline.vim deleted file mode 100644 index 6d371a7a..00000000 --- a/themes/lightline.vim +++ /dev/null @@ -1,2 +0,0 @@ -let g:lightline = { 'colorscheme': 'material_vim' } - diff --git a/vim-plug/plugins.vim b/vim-plug/plugins.vim index 0ec61f48..d03b7fb4 100644 --- a/vim-plug/plugins.vim +++ b/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() -- cgit v1.2.3