From 38cc653598ef0a33846a4b375d146658b1c207c4 Mon Sep 17 00:00:00 2001 From: Michael Mandl Date: Tue, 22 Oct 2019 17:19:35 +0200 Subject: [PATCH] Ported vimrc to nvim --- nvim/init.vim | 89 +++++++++++++++++++++++++++++++++++++++++++++++++ nvim/install.sh | 5 +++ 2 files changed, 94 insertions(+) create mode 100644 nvim/init.vim create mode 100755 nvim/install.sh diff --git a/nvim/init.vim b/nvim/init.vim new file mode 100644 index 0000000..c1a0332 --- /dev/null +++ b/nvim/init.vim @@ -0,0 +1,89 @@ +call plug#begin(stdpath('data') . '/plugged') + +Plug 'altercation/vim-colors-solarized' +Plug 'itchyny/lightline.vim' + +Plug 'rhysd/vim-clang-format' +Plug 'derekwyatt/vim-fswitch' + +Plug 'tpope/vim-obsession' +Plug 'dhruvasagar/vim-prosession' + +Plug 'airblade/vim-gitgutter' +Plug 'tpope/vim-fugitive' + +Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' } +Plug 'junegunn/fzf.vim' + +Plug 'christoomey/vim-tmux-navigator' + +Plug 'mandlm/vim-split-open' + +Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' } + +Plug 'autozimu/LanguageClient-neovim', { + \ 'branch': 'next', + \ 'do': 'bash install.sh', + \ } + +call plug#end() + +" tabwidth +set tabstop=4 +set shiftwidth=4 + +" solarized dark theme +colorscheme solarized +set background=dark + +" line numbers +set number + +" ctags config +set tags=./tags; +nnoremap + +" lightline config +let g:lightline = { 'colorscheme': 'solarized' } + +" clang-format +let g:clang_format#auto_format = 1 +let g:clang_format#enable_fallback_style = 0 + +" vim-fswitch +nmap o :FSHere + +" prosession +let g:prosession_tmux_title = 1 +let g:prosession_per_branch = 1 + +" fzf.vim +nmap :Files +nmap :Rg \b\b +nmap :Tags + +" deoplete +let g:deoplete#enable_at_startup = 1 +autocmd CompleteDone * silent! pclose! +call deoplete#custom#source('_', 'matchers', ['matcher_full_fuzzy']) + +inoremap pumvisible() ? "\" : "\" +inoremap pumvisible() ? "\" : "\" + +" LanguageClient-neovim +set hidden +nnoremap :call LanguageClient_contextMenu() +nnoremap :call LanguageClient#textDocument_definition() +let g:LanguageClient_serverCommands = { + \ 'python': ['pyls'], + \ 'cpp': ['/usr/lib/llvm-7/bin/clangd'], + \ } + +" autoread/checktime timer {{{ +set autoread +function! CheckTime(timer) + checktime +endfunction +let timerChecktime = timer_start(4000, 'CheckTime', {'repeat': -1}) +" }}} + diff --git a/nvim/install.sh b/nvim/install.sh new file mode 100755 index 0000000..d11b392 --- /dev/null +++ b/nvim/install.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env sh + +mkdir --parents ~/.config/nvim +ln -svrf init.vim ~/.config/nvim/init.vim +