let plug_install = 0 let autoload_plug_path = stdpath('config') . '/autoload/plug.vim' if !filereadable(autoload_plug_path) silent exe '!curl -fL --create-dirs -o ' . autoload_plug_path . \ ' https://raw.github.com/junegunn/vim-plug/master/plug.vim' execute 'source ' . fnameescape(autoload_plug_path) let plug_install = 1 endif unlet autoload_plug_path call plug#begin('~/.config/nvim/plugins') " Code development helpers {{{ Plug 'neovim/nvim-lspconfig' Plug 'glepnir/lspsaga.nvim' Plug 'SirVer/ultisnips' | Plug 'honza/vim-snippets' Plug 'wellle/context.vim' Plug 'dbeniamine/cheat.sh-vim' Plug 'puremourning/vimspector' Plug 'derekwyatt/vim-fswitch' Plug 'nvim-lua/completion-nvim' Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'} Plug 'tpope/vim-fugitive' " }}} " Files switch, jump and grep-like tools {{{ "Plug 'preservim/nerdtree' | Plug 'Xuyuanp/nerdtree-git-plugin' Plug 'Shougo/defx.nvim', { 'do': ':UpdateRemotePlugins' } "Plug 'junegunn/fzf' | Plug 'junegunn/fzf.vim' Plug 'nvim-lua/popup.nvim' Plug 'nvim-lua/plenary.nvim' Plug 'nvim-telescope/telescope.nvim' Plug 'fhill2/telescope-ultisnips.nvim' Plug 'liuchengxu/vista.vim' Plug 'inside/vim-search-pulse' Plug 'mhinz/vim-startify' Plug 'wellle/targets.vim' " }}} " Git integration {{{ Plug 'mhinz/vim-signify' " Mark edited lines - faster gitgutter " }}} " Syntax for random filetypes {{{ "Plug 'masukomi/vim-markdown-folding' "Plug 'weirongxu/plantuml-previewer.vim' | Plug 'aklt/plantuml-syntax' Plug 'iamcco/markdown-preview.nvim', { 'do': { -> mkdp#util#install() }, 'for': ['markdown', 'vim-plug']} " }}} " Other plugins (external tools, etc) {{{ Plug 'vimwiki/vimwiki' Plug 'MortenStabenau/matlab-vim' Plug 'junegunn/goyo.vim' Plug 'jez/vim-superman' "vman application Plug 'glacambre/firenvim' Plug 'JMcKiern/vim-shoot' " }}} " Filetype syntax {{{ "Plug 'plasticboy/vim-markdown' Plug 'kergoth/vim-bitbake' " Bitbake templates and syntax Plug 'pboettch/vim-cmake-syntax' Plug 'aklt/plantuml-syntax' " }}} " Colorschemes {{{ Plug 'jaredgorski/spacecamp' Plug 'lifepillar/vim-gruvbox8' Plug 'dylanaraps/wal' Plug 'vim-airline/vim-airline' | Plug 'vim-airline/vim-airline-themes' " }}} " call plug#end() if plug_install PlugInstall --sync endif unlet plug_install set number set clipboard+=unnamedplus set noshowmode set laststatus=2 set colorcolumn=80 set background=dark colorscheme wal highlight MatchParen ctermfg=yellow ctermbg=none cterm=NONE set listchars=tab:▸\ ,trail:¬ set list hi clear SpellBad hi SpellBad cterm=underline set tabstop=4 set shiftwidth=4 set softtabstop=4 set expandtab set ignorecase set smartcase set gdefault set textwidth=80 set formatoptions+=t set scrolloff=10 set inccommand="split" " space one line, home,end globally increase/decrease nnoremap zc nnoremap zo " TODO define cache dir and conf dir, use them everywhere " Ctags {{{ if isdirectory($HOME . '/.cache/nvim/tags') == 0 :silent !mkdir -p ~/.cache/nvim/tags > /dev/null 2>&1 endif let g:gutentags_cache_dir='~/.cache/nvim/tags' "let g:gutentags_ctags_extra_args=['--fields=+l'] if isdirectory($HOME . '/.cache/nvim/undo') == 0 :silent !mkdir -p ~/.cache/nvim/undo > /dev/null 2>&1 endif set undodir=~/.cache/nvim/undo/ set undofile let mapleader = "\\" inoremap jj inoremap jk inoremap :w :w " Reselect visual block after incrementing/decrementing vnoremap gv vnoremap gv nnoremap 2 :set tabstop=2 softtabstop=2 shiftwidth=2 nnoremap 4 :set tabstop=4 softtabstop=4 shiftwidth=4 nnoremap 8 :set tabstop=8 softtabstop=8 shiftwidth=8 nnoremap :nohlsearch " 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 set shortmess-=F " Always show the signcolumn, otherwise it would shift the text each time " diagnostics appear/become resolved. if has("patch-8.1.1564") " Recently vim can merge signcolumn and number column into one set signcolumn=number else set signcolumn=yes endif set wildmode=longest,list,full match Error /\s\+$\|DU\cPA/ setglobal virtualedit=block setglobal shiftround let g:vimwiki_list = [{'path': '~/vimwiki/', \ 'syntax': 'markdown', 'ext': '.md'}] packadd termdebug