From 8dc8f2d52338fd87e7763995e6732f5a295300e8 Mon Sep 17 00:00:00 2001 From: mono-b Date: Mon, 26 Dec 2022 04:08:53 -0300 Subject: huh --- nvim/init.vim | 89 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 nvim/init.vim (limited to 'nvim/init.vim') diff --git a/nvim/init.vim b/nvim/init.vim new file mode 100644 index 0000000..0aa9c34 --- /dev/null +++ b/nvim/init.vim @@ -0,0 +1,89 @@ +set nocompatible + +" vim-plugged +call plug#begin() + Plug 'itchyny/lightline.vim' + Plug 'junegunn/goyo.vim' + Plug 'mattn/emmet-vim' + Plug 'neoclide/coc.nvim', {'branch': 'release'} + Plug 'preservim/nerdtree' + Plug 'ryanoasis/vim-devicons' + Plug 'bluz71/vim-nightfly-guicolors' + Plug 'morhetz/gruvbox' + Plug 'dylanaraps/wal.vim' +call plug#end() + +" Lightline Integration + let g:lightline = {'colorscheme': 'nightfly'} + +" General + set laststatus=2 + set encoding=UTF-8 + set bg=dark + syntax on + set nohlsearch + set cursorline + set incsearch + set clipboard=unnamedplus + set tabstop=4 + set softtabstop=4 + set shiftwidth=4 + set expandtab + set autoindent + set fileformat=unix + set number + set relativenumber + set nowrap + set noswapfile + set noshowmode + set incsearch + set scrolloff=8 + +colorscheme wal + +" Autoload +augroup remember_folds + autocmd! + autocmd BufWinLeave * mkview + autocmd BufWinEnter * silent! loadview +augroup END + + +" Keymaps + let mapleader = " " + vnoremap "+y + map "+P + let g:user_emmet_leader_key=',' + map h :wincmd h + map j :wincmd j + map k :wincmd k + map l :wincmd l + nnoremap nt :NERDTreeToggle %:p:h + +" NERDTree + map :NERDTreeToggle + nnoremap nt :NERDTree %:p:h + +" Goyo + nnoremap g :Goyo + +function! s:goyo_enter() + set linebreak + set spell spelllang=en_us + HexokinaseTurnOff +endfunction + +function! s:goyo_leave() + set nolinebreak + set nolinebreak + HexokinaseTurnOn +endfunction + +" CoC +" Tab navigation and confirmation +inoremap pumvisible() ? "\" : "\" +inoremap pumvisible() ? "\" : "\" Tab autocompletion +inoremap pumvisible() ? "\" : "\u\" + +" Remove Whitespaces After Closing File +autocmd BufWritePre *.sh :%s/\s\+$//e -- cgit v1.2.1