From 826955894ab308adc1890210b99bf51764685d4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jesper=20Fussing=20M=C3=B8rk?= Date: Mon, 4 Nov 2019 15:53:33 +0100 Subject: [PATCH] NeoVim plugin cleanups and tweaks --- neovim/.config/nvim/init.vim | 29 ++++++----------------------- 1 file changed, 6 insertions(+), 23 deletions(-) diff --git a/neovim/.config/nvim/init.vim b/neovim/.config/nvim/init.vim index 00bf748..09efd19 100644 --- a/neovim/.config/nvim/init.vim +++ b/neovim/.config/nvim/init.vim @@ -1,8 +1,8 @@ syntax on filetype indent on -let base16colorspace=256 let mapleader="½" + set encoding=utf-8 set clipboard=unnamed set clipboard+=unnamedplus @@ -10,7 +10,6 @@ set smartindent set shiftwidth=2 set tabstop=2 set expandtab -set number set autoread set hidden set termguicolors @@ -21,22 +20,19 @@ set undofile set colorcolumn=80 set foldmethod=syntax set foldlevelstart=20 +set number set relativenumber "Plugins call plug#begin('~/.local/share/nvim/plugged') " Colorschemes -Plug 'chriskempson/base16-vim' Plug 'arcticicestudio/nord-vim' " Pretty Status Lines Plug 'vim-airline/vim-airline' Plug 'vim-airline/vim-airline-themes' -" Buffers -Plug 'jlanzarotta/bufexplorer' - " Completion Plug 'honza/vim-snippets' Plug 'epilande/vim-react-snippets' @@ -46,7 +42,6 @@ Plug 'neoclide/coc.nvim', {'branch': 'release'} Plug 'luochen1990/rainbow' " File handling -Plug 'Shougo/defx.nvim', { 'do': ':UpdateRemotePlugins' } Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' } Plug 'junegunn/fzf.vim' @@ -117,25 +112,13 @@ let g:html_indent_style1 = "inc" " Black autocmd BufWritePre *.py execute ':Black' -" Defx -map :Defx -toggle -split=vertical -winwidth=40 -autocmd FileType defx call s:defx_my_settings() -function! s:defx_my_settings() abort - nnoremap - \ defx#is_directory() ? defx#do_action('open') : - \ defx#do_action('multi', ['drop', 'quit']) - nnoremap - \ defx#do_action('cd', '..') - nnoremap - \ defx#do_action('toggle_ignored_files') -endfunction - " FZF let $FZF_DEFAULT_COMMAND = 'ag --ignore .git --ignore-dir Customers/RP --ignore *.jar -g ""' command! -bang -nargs=? -complete=dir HFiles \ call fzf#vim#files(, {'source': 'ag --hidden --ignore .git --ignore-dir Customers/RP --ignore *.jar -g ""'}, 0) -map :Files -map :HFiles +map :Files +map :HFiles +map :Buffers " Mappings :vmap r "_dP @@ -146,13 +129,13 @@ nnoremap nnoremap nnoremap nnoremap +nmap gs :GFiles? nmap gn (GitGutterNextHunk) " git next nmap gp (GitGutterPrevHunk) " git previous nmap ga (GitGutterStageHunk) " git add (chunk) nmap gu (GitGutterUndoHunk) " git undo (chunk) "AutoCommands -au BufWinEnter * set number au FileType json setlocal equalprg=jq\ . au FileType xml setlocal equalprg=xmllint\ --format\ --recover\ -\ 2>/dev/null autocmd FileType python setlocal completeopt-=preview