" ; ' " \\/\ \\ \\/\\/\\ ,._-_ _-_ " || | || || || || || || " || | || || || || || || " \\/ \\ \\ \\ \\ \\, \\,/ " Install VimPlug let data_dir = has('nvim') ? stdpath('data') . '/site' : '~/.vim' if empty(glob(data_dir . '/autoload/plug.vim')) silent execute '!curl -fLo '.data_dir.'/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim' autocmd VimEnter * PlugInstall --sync | source $MYVIMRC endif " Load plugins call plug#begin('~/.vim/bundle') Plug 'aliva/vim-fish', {'for': 'fish'} Plug 'cocopon/iceberg.vim' Plug 'dhruvasagar/vim-table-mode' Plug 'fadein/vim-FIGlet' Plug 'gkeep/iceberg-dark' Plug 'itchyny/lightline.vim' Plug 'karolbelina/uxntal.vim', {'for': 'uxntal'} Plug 'lambdalisue/fern-git-status.vim' Plug 'lambdalisue/fern-hijack.vim' Plug 'lambdalisue/fern-renderer-nerdfont.vim' Plug 'lambdalisue/fern.vim' Plug 'lilydjwg/colorizer' Plug 'mg979/vim-visual-multi' Plug 'owickstrom/vim-colors-paramount' Plug 'raimondi/delimitmate' Plug 'rust-lang/rust.vim', {'for': 'rust'} Plug 'tpope/vim-commentary' Plug 'vim-scripts/nginx.vim', {'for': 'nginx'} Plug 'yuttie/comfortable-motion.vim' Plug 'lambdalisue/nerdfont.vim' Plug 'ryanoasis/vim-devicons' " don't install these plugins on remote servers if has('nvim') Plug 'airblade/vim-gitgutter' Plug 'dyng/ctrlsf.vim' Plug 'folke/todo-comments.nvim' Plug 'hrsh7th/cmp-calc' Plug 'https://github.com/josa42/nvim-lightline-lsp' Plug 'https://github.com/mfussenegger/nvim-lint' Plug 'j-hui/fidget.nvim' Plug 'jghauser/mkdir.nvim' Plug 'jose-elias-alvarez/null-ls.nvim' Plug 'simrat39/rust-tools.nvim' Plug 'stevearc/dressing.nvim' Plug 'williamboman/nvim-lsp-installer' Plug 'antoinemadec/FixCursorHold.nvim' Plug 'edluffy/specs.nvim' Plug 'folke/lsp-colors.nvim' Plug 'folke/trouble.nvim' Plug 'hrsh7th/cmp-buffer' Plug 'hrsh7th/cmp-cmdline' Plug 'hrsh7th/cmp-nvim-lsp' Plug 'hrsh7th/cmp-path' Plug 'hrsh7th/cmp-vsnip' Plug 'hrsh7th/nvim-cmp' Plug 'hrsh7th/vim-vsnip' Plug 'kyazdani42/nvim-web-devicons' Plug 'neovim/nvim-lspconfig' Plug 'nvim-lua/plenary.nvim' Plug 'nvim-telescope/telescope.nvim' Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'} Plug 'tpope/vim-fugitive' endif call plug#end() " NixOS config if hostname() == "bloodletting" set backupdir=~/.local/state/nvim/backups endif " Lightline config let g:lightline = { \ 'colorscheme': 'icebergDark', \ } " Comfortable Motion config noremap :call comfortable_motion#flick(20) noremap :call comfortable_motion#flick(-20) " VM config let g:VM_maps = {} let g:VM_maps["I BS"] = '' " Fern config let g:fern#renderer = "nerdfont" function FindSessionDirectory() abort if len(argv()) > 0 return fnamemodify(argv()[0], ':p:h') endif return getcwd() endfunction! function! s:init_fern() abort nmap \ (fern-my-expand-or-collapse) \ fern#smart#leaf( \ "\(fern-action-open)", \ "\(fern-action-expand)", \ "\(fern-action-collapse)", \ ) " Define NERDTree like mappings nmap t (fern-action-open:tabedit) nmap T (fern-action-open:tabedit)gT nmap i (fern-action-open:split) nmap gi (fern-action-open:split)p nmap s (fern-action-open:vsplit) nmap gs (fern-action-open:vsplit)p nmap ma (fern-action-new-path) nmap (fern-my-expand-or-collapse) nmap P gg endfunction augroup my-fern-startup autocmd! * autocmd FileType fern call s:init_fern() if has('nvim') autocmd TabNewEntered * ++nested exec 'Fern -reveal=% -drawer -stay ' . FindSessionDirectory() endif augroup END " Aliases command Header FIGlet -f Gothic cmap W w !sudo tee > /dev/null % " nnoremap :NERDTreeTabsToggle nnoremap :exec ':Fern -reveal=% -drawer -toggle -stay ' . FindSessionDirectory() " Colorscheme set background=dark set termguicolors colorscheme paramount let bgcolor = synIDattr(hlID("Normal"), "bg") let fgcolor = synIDattr(hlID("Identifier"), "fg") let colors = "\033]11;" . fgcolor . "\007\033]11;" . bgcolor . "\007" if has('gui_running') || has('nvim') autocmd VimEnter * call chansend(v:stderr, colors) autocmd VimLeave * call chansend(v:stderr, "\033]110\007\033]111\007") else " Set the terminal default background and foreground colors, thereby " improving performance by not needing to set these colors on empty cells. hi Normal guifg=NONE guibg=NONE ctermfg=NONE ctermbg=NONE let &t_ti = &t_ti . colors let &t_te = &t_te . "\033]110\007\033]111\007" endif " Vanilla config syntax on filetype plugin indent on set number set wrap set mouse=a set softtabstop=4 noexpandtab set ts=4 sw=4 set autoindent set smartindent set breakindent set scrolloff=5 set laststatus=2 set noshowmode set whichwrap+=<,>,h,l let &t_SI = "\[6 q" " let &t_SR = "\[4 q" let &t_EI = "\[2 q" set clipboard=unnamedplus nnoremap d "_d vnoremap d "_d " Preserve undo history across editing sessions. if has('persistent_undo') set undodir=~/.vim/undo set undofile endif set ignorecase set smartcase set hlsearch let @/='' " fix search on startup set encoding=utf-8 scriptencoding utf-8 setglobal fileencoding=utf-8 set ffs=unix,dos