call plug#begin("~/.nvim/bundle") " Other Plug 'bronson/vim-visual-star-search' Plug 'prabirshrestha/async.vim' Plug 'tweekmonster/startuptime.vim' " UI Plug 'airblade/vim-gitgutter' " A Vim plugin which shows a git diff in the sign column. Plug 'Asheq/close-buffers.vim' " This plug-in allows you to quickly bdelete several buffers at once. Plug 'ctrlpvim/ctrlp.vim' " Full path fuzzy file, buffer, mru, tag, ... finder for Vim. Plug 'haya14busa/incsearch.vim' " incsearch.vim incrementally highlights ALL pattern matches unlike default 'incsearch'. Plug 'mhinz/vim-startify' " This plugin provides a start screen for Vim and Neovim. Plug 'ryanoasis/vim-devicons' " Adds file type icons to Vim plugins Plug 'scrooloose/nerdtree' " A tree explorer plugin for vim. Plug 'nightsense/snow' Plug 'vim-airline/vim-airline' Plug 'vim-airline/vim-airline-themes' Plug 'Yggdroot/indentLine' " Programming helpers Plug 'Chiel92/vim-autoformat' Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' } Plug 'bkad/CamelCaseMotion' Plug 'ctrlpvim/ctrlp.vim' Plug 'dense-analysis/ale' Plug 'deoplete-plugins/deoplete-jedi' Plug 'easymotion/vim-easymotion' Plug 'godlygeek/tabular' Plug 'junegunn/vim-easy-align' Plug 'keith/swift.vim' Plug 'majutsushi/tagbar' Plug 'sebastianmarkow/deoplete-rust' Plug 'tpope/vim-commentary' Plug 'tpope/vim-eunuch' Plug 'tpope/vim-fugitive' Plug 'tpope/vim-git' Plug 'tpope/vim-sleuth' Plug 'tpope/vim-speeddating' Plug 'tpope/vim-surround' " Language support Plug 'artur-shaik/vim-javacomplete2' Plug 'cespare/vim-toml' Plug 'coc-extensions/coc-svelte' Plug 'cstrahan/vim-capnp' Plug 'digitaltoad/vim-pug' Plug 'evanleck/vim-svelte' Plug 'gryf/kickass-syntax-vim' Plug 'hiphish/jinja.vim' Plug 'hsanson/vim-android' Plug 'leafgarland/typescript-vim' Plug 'lervag/vimtex' Plug 'martinda/Jenkinsfile-vim-syntax' Plug 'MaxMEllon/vim-jsx-pretty' Plug 'othree/yajs.vim' Plug 'mitsuhiko/vim-jinja' Plug 'peitalin/vim-jsx-typescript' Plug 'plasticboy/vim-markdown' Plug 'posva/vim-vue' Plug 'rust-lang/rust.vim' Plug 'tikhomirov/vim-glsl' Plug 'udalov/kotlin-vim' Plug 'ziglang/zig.vim' Plug 'jceb/vim-orgmode' Plug 'fatih/vim-go' call plug#end() " Misc set mouse=a set wrap linebreak set shell=fish set scrolloff=5 set ruler set backspace=2 set cursorline set hidden set wildmenu set wildmode=longest:full set splitright set splitbelow set relativenumber let &colorcolumn="+".join(range(1, 255), ",+") set termguicolors nnoremap :buffers:buffer let maplocalleader="\" " Tagbar nmap :TagbarOpenAutoClose let g:tagbar_sort = 0 " Airline set laststatus=2 if !exists('g:airline_symbols') let g:airline_symbols = {} endif "let g:airline_theme = 'codedark' let g:airline_left_sep = '' let g:airline_left_alt_sep = '| ' let g:airline_right_sep = '' let g:airline_right_alt_sep = '|' let g:airline_symbols.branch = '' let g:airline_symbols.readonly = '' let g:airline_symbols.linenr = '' let g:airline_symbols.maxlinenr = '' let g:airline_symbols.whitespace = 'Ξ' let g:airline#extensions#tabline#enabled = 1 let g:airline#extensions#tabline#show_tab_nr = 0 let g:airline#extensions#tabline#show_tab_type = 0 let g:airline#extensions#ale#enabled = 1 " Syntax coloring syntax enable set synmaxcol=1024 set background=dark colorscheme snow hi WarningMsg ctermbg=0 " indentLine let g:indentLine_color_term = 20 let g:indentLine_char = '│' let g:indentLine_concealcursor = '' let g:indentLine_indentLevel = 25 let g:indentLine_fileType = ['vhdl', 'vim', 'tex', 'plaintex', 'cpp', 'cpp.jinja'] " Startify let g:startify_session_dir = $HOME . '/.nvim/sessions' let g:startify_session_autoload = 1 let g:startify_session_persistence = 1 let g:startify_change_to_dir = 0 let g:startify_change_to_vcs_root = 1 " Formatting set encoding=utf-8 set tabstop=4 set shiftwidth=4 set expandtab set autoindent set cino=:0 nnoremap :let _s=@/:%s/\s\+$//e:let @/=_s:nohl " Trim trailing spaces set list listchars=tab:\ \ ,trail:•,precedes:…,extends:… " Maximum line widths au FileType text,markdown setlocal textwidth=80 au FileType python setlocal textwidth=88 au FileType javascript setlocal textwidth=90 au FileType swift setlocal textwidth=120 au FileType tex setlocal textwidth=90 au FileType cpp,cpp.jinja setlocal textwidth=90 " Formatters au FileType javascript setlocal formatprg=prettier au FileType javascript.jsx setlocal formatprg=prettier " Line numbering set number " Search map / (incsearch-forward) map ? (incsearch-backward) map g/ (incsearch-stay) set hlsearch let g:incsearch#auto_nohlsearch = 1 map n (incsearch-nohl-n) map N (incsearch-nohl-N) map * (incsearch-nohl-*) map # (incsearch-nohl-#) map g* (incsearch-nohl-g*) map g# (incsearch-nohl-g#) " Undos set undofile set undodir=~/.nvim/undo set undolevels=1000 set undoreload=10000 " Completion set completeopt=menu,menuone,longest,noselect " Open files at where they were closed. if has("autocmd") au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$") \| exe "normal! g'\"" | endif endif """ Shortcuts map :set invpaste if has("nvim") tnoremap h tnoremap j tnoremap k tnoremap l endif nnoremap h nnoremap j nnoremap k nnoremap l nnoremap :tabnew nnoremap :tabnext nnoremap :tabprevious nnoremap """ Cache set backupdir=~/.nvim/backup set directory=~/.nvim/backup """ Vimpager if exists("vimpager") au BufRead * set scrolloff=0 set noruler set nocursorline set colorcolumn= set nonumber au BufRead * set laststatus=0 let g:airline#extensions#tabline#enabled = 0 endif let vimpager_disable_ansiesc = 1 """ vim-markdown let g:vim_markdown_folding_disabled = 1 """ NerdTree map :NERDTreeToggle autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif """ Deoplete let g:deoplete#enable_at_startup = 1 call deoplete#custom#option('omni_patterns', { 'go': '[^. *\t]\.\w*' }) """ ale let g:ale_linters = { 'python': ['flake8', 'mypy'], 'go': ['gopls'], 'cpp': ['clangcheck'] } let g:ale_fixers = { \ 'python': ['black'], \ 'cpp': ['clang-format'], \ 'javascript': ['eslint', 'prettier'], \ 'yaml': ['prettier'], \ 'go': ['gofmt', 'goimports'], \ } let g:ale_python_flake8_options='--max-line-length=88' let g:ale_python_mypy_options='--ignore-missing-imports' let g:ale_c_parse_compile_commands = 1 let g:ale_c_build_dir_names = ['build', 'bin', '.'] "let g:ale_completion_enabled = 1 set omnifunc=ale#completion#OmniFunc " Python if executable('pyls') " pip install python-language-server au User lsp_setup call lsp#register_server({ \ 'name': 'pyls', \ 'cmd': {server_info->['pyls']}, \ 'whitelist': ['python'], \ }) endif """ vim-javacomplete2 autocmd FileType java setlocal omnifunc=javacomplete#Complete """ rust.vim let g:rustfmt_autosave = 1 """ jinja.vim autocmd! BufRead,BufNewFile *.cpp,*.html call jinja#AdjustFiletype() " command! Workman set langmap=LO,OL,JN,NJ,KE,EK,HY,YH,lo,ol,jn,nj,ke,ek,hy,yh " command! Qwerty set langmap= """ Snippets au FileType tex,plaintex nnoremap ,fig :-1read ~sijmen/.config/nvim/snippets/figure.texj/[{:]} au FileType tex,plaintex nnoremap ,lst :-1read ~sijmen/.config/nvim/snippets/listing.texj/([=:](,$){}^$) """ CamelCaseMotion map w CamelCaseMotion_w map b CamelCaseMotion_b map e CamelCaseMotion_e map ge CamelCaseMotion_ge sunmap w sunmap b sunmap e sunmap ge """ latex let g:tex_conceal = 'adgms' set path=$PWD/** set wrap linebreak showbreak=↳\ " keep whitespace set breakindent breakindentopt=shift:4 let g:ctrlp_map = '' """ vim-easy-align xmap ga (EasyAlign) nmap ga (EasyAlign) """ vim-go let g:go_imports_autosave = 1 let g:go_auto_type_info = 1