set nocompatible " be iMproved, required filetype on " required set timeoutlen=1000 set ttimeoutlen=5 " set the runtime path to include Vundle and initialize set rtp+=~/.vim/bundle/Vundle.vim call vundle#begin() Plugin 'VundleVim/Vundle.vim' " Keep Plugin commands between vundle#begin/end. " Coding Plugin 'dense-analysis/ale' " Plugin 'jiangmiao/auto-pairs' Plugin 'Shougo/deoplete.nvim' Plugin 'preservim/nerdcommenter' Plugin 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'} Plugin 'nvim-lua/plenary.nvim' Plugin 'nvim-telescope/telescope.nvim' Plugin 'tpope/vim-surround' Plugin 'puremourning/vimspector' Plugin 'ilyachur/cmake4vim' " File types Plugin 'rust-lang/rust.vim' Plugin 'neovimhaskell/haskell-vim' Plugin 'peterhoeg/vim-qml' Plugin 'lervag/vimtex' " Utilities Plugin 'kyazdani42/nvim-web-devicons' Plugin 'kyazdani42/nvim-tree.lua' Plugin 'reedes/vim-pencil' Plugin 'thaerkh/vim-workspace' " Appearance Plugin 'vim-airline/vim-airline' Plugin 'vim-airline/vim-airline-themes' " Music Plugin 'azadkuh/vim-cmus' " Fun Plugin 'Eandrju/cellular-automaton.nvim' Plugin 'tamton-aquib/duck.nvim' " All of your Plugins must be added before the following line call vundle#end() " required filetype plugin indent on " required " Brief help " :PluginList - lists configured plugins " :PluginInstall - installs plugins; append `!` to update or just :PluginUpdate " :PluginSearch foo - searches for foo; append `!` to refresh local cache " :PluginClean - confirms removal of unused plugins; append `!` to auto-approve removal " " see :h vundle for more details or wiki for FAQ " Put your non-Plugin stuff after this line syntax on set encoding=utf-8 fileformat=unix set number set mouse=nvi set splitright splitbelow set foldmethod=indent foldlevel=99 autocmd BufRead,BufNewFile *.qml setfiletype qml set tabstop=8 softtabstop=8 shiftwidth=8 noexpandtab autocmd FileType json,toml,yaml set ts=2 sw=2 sts=2 expandtab autocmd FileType html,htmldjango set ts=2 sw=2 sts=2 expandtab autocmd FileType css set ts=2 sw=2 sts=2 expandtab autocmd FileType ocaml set ts=2 sw=2 sts=2 expandtab autocmd FileType python set ts=4 sw=4 sts=4 expandtab autocmd FileType markdown set ts=4 sw=4 sts=4 expandtab autocmd FileType tex set ts=4 sw=4 sts=4 expandtab autocmd FileType haskell set ts=4 sw=4 sts=4 expandtab autocmd FileType rust set ts=4 sw=4 sts=4 expandtab autocmd FileType qml set ts=4 sw=4 sts=4 expandtab autocmd FileType c,cpp,asm set ts=8 sw=8 sts=8 noexpandtab autocmd FileType javascript set ts=8 sw=8 sts=8 noexpandtab set autoindent smartindent " Force 2 spaces, 4 spaces or 1 tab nnoremap 2 :set ts=2 sw=2 sts=2 expandtab nnoremap 4 :set ts=4 sw=4 sts=4 expandtab nnoremap 8 :set ts=8 sw=8 sts=8 noexpandtab set background=dark colorscheme vim let g:airline_theme='onedark' " Popup menu colors set termguicolors highlight Pmenu guibg=#282C34 highlight PmenuSel guibg=#61AFEF " Generic shortcuts inoremap :wa nnoremap \ :noh " Autoformat autocmd FileType python nnoremap b :!black %:e autocmd FileType c,cpp nnoremap b :pyf /usr/share/clang/clang-format.py autocmd FileType rust nnoremap b :!rustfmt %:e " ale nnoremap a :ALEToggle nnoremap :ALEGoToDefinition let g:ale_lint_on_text_changed = 'normal' let g:ale_lint_on_insert_leave = 1 let g:ale_virtualtext_cursor = 'disabled' " telescope nnoremap f :Telescope find_files nnoremap g :Telescope live_grep nnoremap fb :Telescope buffers nnoremap fh :Telescope help_tags " deoplete let g:deoplete#enable_at_startup = 1 nnoremap d :call deoplete#toggle() " NERDCommenter let g:NERDCreateDefaultMappings = 1 let g:NERDSpaceDelims = 1 let g:NERDCompactSexyComs = 1 let g:NERDCustomDelimiters = { 'c': { 'left': '/*','right': '*/' } } let g:NERDCommentEmptyLines = 1 let g:NERDTrimTrailingWhitespace = 1 let g:NERDToggleCheckAllLines = 1 " Vimspector nmap VimspectorToggleBreakpoint nmap VimspectorStop nmap VimspectorRestart nmap VimspectorContinue nmap VimspectorPause nmap VimspectorUpFrame nmap VimspectorDownFrame nmap VimspectorStepOver nmap VimspectorStepInto nmap VimspectorStepOut nmap di VimspectorBalloonEval xmap di VimspectorBalloonEval nmap B VimspectorBreakpoints nmap D VimspectorDisassemble " vimtex let g:vimtex_view_general_viewer = 'okular' let g:vimtex_view_general_options = '--unique file:@pdf\#src:@line@tex' let g:vimtex_compiler_method = 'latexmk' let g:vimtex_compiler_latexmk = {'options': ['-shell-escape']} " nvim-tree nnoremap e :NvimTreeToggle nnoremap t :NvimTreeFocus nnoremap r :NvimTreeRefresh " a list of groups can be found at `:help nvim_tree_highlight` highlight NvimTreeFolderIcon guibg=blue " vim-pencil nnoremap p :PencilToggle let g:pencil#map#suspend_af = 'K' let g:pencil#textwidth = 74 augroup pencil autocmd! autocmd FileType markdown,mkd call pencil#init() " autocmd FileType text call pencil#init() augroup END " vim-workspace nnoremap s :ToggleWorkspace let g:workspace_session_directory = $HOME . '/.vim/sessions/' let g:workspace_session_disable_on_args = 1 let g:workspace_autosave = 0 " vim-cmus nnoremap c :Cmus " duck.nvim nnoremap dd :lua require("duck").hatch() nnoremap dk :lua require("duck").cook()